com.amazonaws.services.ec2.model
Class DescribeInstanceStatusRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.DescribeInstanceStatusRequest
All Implemented Interfaces:
DryRunSupportedRequest<DescribeInstanceStatusRequest>, java.io.Serializable

public class DescribeInstanceStatusRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<DescribeInstanceStatusRequest>

Container for the parameters to the DescribeInstanceStatus operation.

Describes the status of one or more instances, including any scheduled events.

Instance status has two main components:

Instance status provides information about four types of scheduled events for an instance that may require your attention:

When your instance is retired, it will either be terminated (if its root device type is the instance-store) or stopped (if its root device type is an EBS volume). Instances stopped due to retirement will not be restarted, but you can do so manually. You can also avoid retirement of EBS-backed instances by manually restarting your instance when its event code is instance-retirement . This ensures that your instance is started on a different underlying host.

For more information about failed status checks, see Troubleshooting Instances with Failed Status Checks in the Amazon Elastic Compute Cloud User Guide . For more information about working with scheduled events, see Working with an Instance That Has a Scheduled Event in the Amazon Elastic Compute Cloud User Guide .

See Also:
AmazonEC2.describeInstanceStatus(DescribeInstanceStatusRequest), Serialized Form

Constructor Summary
DescribeInstanceStatusRequest()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Request<DescribeInstanceStatusRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.util.List<Filter> getFilters()
          One or more filters.
 java.lang.Boolean getIncludeAllInstances()
          When true, includes the health status for all instances.
 java.util.List<java.lang.String> getInstanceIds()
          One or more instance IDs.
 java.lang.Integer getMaxResults()
          The maximum number of paginated instance items per response.
 java.lang.String getNextToken()
          The next paginated set of results to return.
 int hashCode()
           
 java.lang.Boolean isIncludeAllInstances()
          When true, includes the health status for all instances.
 void setFilters(java.util.Collection<Filter> filters)
          One or more filters.
 void setIncludeAllInstances(java.lang.Boolean includeAllInstances)
          When true, includes the health status for all instances.
 void setInstanceIds(java.util.Collection<java.lang.String> instanceIds)
          One or more instance IDs.
 void setMaxResults(java.lang.Integer maxResults)
          The maximum number of paginated instance items per response.
 void setNextToken(java.lang.String nextToken)
          The next paginated set of results to return.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 DescribeInstanceStatusRequest withFilters(java.util.Collection<Filter> filters)
          One or more filters.
 DescribeInstanceStatusRequest withFilters(Filter... filters)
          One or more filters.
 DescribeInstanceStatusRequest withIncludeAllInstances(java.lang.Boolean includeAllInstances)
          When true, includes the health status for all instances.
 DescribeInstanceStatusRequest withInstanceIds(java.util.Collection<java.lang.String> instanceIds)
          One or more instance IDs.
 DescribeInstanceStatusRequest withInstanceIds(java.lang.String... instanceIds)
          One or more instance IDs.
 DescribeInstanceStatusRequest withMaxResults(java.lang.Integer maxResults)
          The maximum number of paginated instance items per response.
 DescribeInstanceStatusRequest withNextToken(java.lang.String nextToken)
          The next paginated set of results to return.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DescribeInstanceStatusRequest

public DescribeInstanceStatusRequest()
Method Detail

getInstanceIds

public java.util.List<java.lang.String> getInstanceIds()
One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.

Returns:
One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.


setInstanceIds

public void setInstanceIds(java.util.Collection<java.lang.String> instanceIds)
One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.

Parameters:
instanceIds - One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.


withInstanceIds

public DescribeInstanceStatusRequest withInstanceIds(java.lang.String... instanceIds)
One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceIds - One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.

Returns:
A reference to this updated object so that method calls can be chained together.

withInstanceIds

public DescribeInstanceStatusRequest withInstanceIds(java.util.Collection<java.lang.String> instanceIds)
One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.

Returns a reference to this object so that method calls can be chained together.

Parameters:
instanceIds - One or more instance IDs.

Default: Describes all your instances.

Constraints: Maximum 100 explicitly specified instance IDs.

Returns:
A reference to this updated object so that method calls can be chained together.

getFilters

public java.util.List<Filter> getFilters()
One or more filters.

Returns:
One or more filters.
  • availability-zone - The Availability Zone of the instance.

  • event.code - The code identifying the type of event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop).

  • event.description - A description of the event.

  • event.not-after - The latest end time for the scheduled event.

  • event.not-before - The earliest start time for the scheduled event.

  • instance-state-code - A code representing the state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

  • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

  • instance-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data).

  • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

  • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data).

  • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).


setFilters

public void setFilters(java.util.Collection<Filter> filters)
One or more filters.

Parameters:
filters - One or more filters.
  • availability-zone - The Availability Zone of the instance.

  • event.code - The code identifying the type of event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop).

  • event.description - A description of the event.

  • event.not-after - The latest end time for the scheduled event.

  • event.not-before - The earliest start time for the scheduled event.

  • instance-state-code - A code representing the state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

  • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

  • instance-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data).

  • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

  • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data).

  • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).


withFilters

public DescribeInstanceStatusRequest withFilters(Filter... filters)
One or more filters.

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters - One or more filters.
  • availability-zone - The Availability Zone of the instance.

  • event.code - The code identifying the type of event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop).

  • event.description - A description of the event.

  • event.not-after - The latest end time for the scheduled event.

  • event.not-before - The earliest start time for the scheduled event.

  • instance-state-code - A code representing the state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

  • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

  • instance-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data).

  • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

  • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data).

  • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

Returns:
A reference to this updated object so that method calls can be chained together.

withFilters

public DescribeInstanceStatusRequest withFilters(java.util.Collection<Filter> filters)
One or more filters.

Returns a reference to this object so that method calls can be chained together.

Parameters:
filters - One or more filters.
  • availability-zone - The Availability Zone of the instance.

  • event.code - The code identifying the type of event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop).

  • event.description - A description of the event.

  • event.not-after - The latest end time for the scheduled event.

  • event.not-before - The earliest start time for the scheduled event.

  • instance-state-code - A code representing the state of the instance, as a 16-bit unsigned integer. The high byte is an opaque internal value and should be ignored. The low byte is set based on the state represented. The valid values are 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and 80 (stopped).

  • instance-state-name - The state of the instance (pending | running | shutting-down | terminated | stopping | stopped).

  • instance-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data).

  • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

  • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data).

  • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable).

Returns:
A reference to this updated object so that method calls can be chained together.

getNextToken

public java.lang.String getNextToken()
The next paginated set of results to return.

Returns:
The next paginated set of results to return.

setNextToken

public void setNextToken(java.lang.String nextToken)
The next paginated set of results to return.

Parameters:
nextToken - The next paginated set of results to return.

withNextToken

public DescribeInstanceStatusRequest withNextToken(java.lang.String nextToken)
The next paginated set of results to return.

Returns a reference to this object so that method calls can be chained together.

Parameters:
nextToken - The next paginated set of results to return.
Returns:
A reference to this updated object so that method calls can be chained together.

getMaxResults

public java.lang.Integer getMaxResults()
The maximum number of paginated instance items per response.

Default: 1000

Returns:
The maximum number of paginated instance items per response.

Default: 1000


setMaxResults

public void setMaxResults(java.lang.Integer maxResults)
The maximum number of paginated instance items per response.

Default: 1000

Parameters:
maxResults - The maximum number of paginated instance items per response.

Default: 1000


withMaxResults

public DescribeInstanceStatusRequest withMaxResults(java.lang.Integer maxResults)
The maximum number of paginated instance items per response.

Default: 1000

Returns a reference to this object so that method calls can be chained together.

Parameters:
maxResults - The maximum number of paginated instance items per response.

Default: 1000

Returns:
A reference to this updated object so that method calls can be chained together.

isIncludeAllInstances

public java.lang.Boolean isIncludeAllInstances()
When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false

Returns:
When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false


setIncludeAllInstances

public void setIncludeAllInstances(java.lang.Boolean includeAllInstances)
When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false

Parameters:
includeAllInstances - When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false


withIncludeAllInstances

public DescribeInstanceStatusRequest withIncludeAllInstances(java.lang.Boolean includeAllInstances)
When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false

Returns a reference to this object so that method calls can be chained together.

Parameters:
includeAllInstances - When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false

Returns:
A reference to this updated object so that method calls can be chained together.

getIncludeAllInstances

public java.lang.Boolean getIncludeAllInstances()
When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false

Returns:
When true, includes the health status for all instances. When false, includes the health status for running instances only.

Default: false


getDryRunRequest

public Request<DescribeInstanceStatusRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<DescribeInstanceStatusRequest>

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.