public class DescribeInstancesRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<DescribeInstancesRequest>
DescribeInstances operation
.
The DescribeInstances operation returns information about instances that you own.
If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an invalid instance ID, a fault is returned. If you specify an instance that you do not own, it will not be included in the returned results.
Recently terminated instances might appear in the returned results. This interval is usually less than one hour.
Constructor and Description |
---|
DescribeInstancesRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Request<DescribeInstancesRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
List<Filter> |
getFilters()
A list of filters used to match properties for Instances.
|
List<String> |
getInstanceIds()
An optional list of the instances to describe.
|
Integer |
getMaxResults()
Returns the value of the MaxResults property for this object.
|
String |
getNextToken()
Returns the value of the NextToken property for this object.
|
int |
hashCode() |
void |
setFilters(Collection<Filter> filters)
A list of filters used to match properties for Instances.
|
void |
setInstanceIds(Collection<String> instanceIds)
An optional list of the instances to describe.
|
void |
setMaxResults(Integer maxResults)
Sets the value of the MaxResults property for this object.
|
void |
setNextToken(String nextToken)
Sets the value of the NextToken property for this object.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DescribeInstancesRequest |
withFilters(Collection<Filter> filters)
A list of filters used to match properties for Instances.
|
DescribeInstancesRequest |
withFilters(Filter... filters)
A list of filters used to match properties for Instances.
|
DescribeInstancesRequest |
withInstanceIds(Collection<String> instanceIds)
An optional list of the instances to describe.
|
DescribeInstancesRequest |
withInstanceIds(String... instanceIds)
An optional list of the instances to describe.
|
DescribeInstancesRequest |
withMaxResults(Integer maxResults)
Sets the value of the MaxResults property for this object.
|
DescribeInstancesRequest |
withNextToken(String nextToken)
Sets the value of the NextToken property for this object.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public List<String> getInstanceIds()
public void setInstanceIds(Collection<String> instanceIds)
instanceIds
- An optional list of the instances to describe.public DescribeInstancesRequest withInstanceIds(String... instanceIds)
Returns a reference to this object so that method calls can be chained together.
instanceIds
- An optional list of the instances to describe.public DescribeInstancesRequest withInstanceIds(Collection<String> instanceIds)
Returns a reference to this object so that method calls can be chained together.
instanceIds
- An optional list of the instances to describe.public List<Filter> getFilters()
public void setFilters(Collection<Filter> filters)
filters
- A list of filters used to match properties for Instances. For a
complete reference to the available filter keys for this operation,
see the Amazon
EC2 API reference.public DescribeInstancesRequest withFilters(Filter... filters)
Returns a reference to this object so that method calls can be chained together.
filters
- A list of filters used to match properties for Instances. For a
complete reference to the available filter keys for this operation,
see the Amazon
EC2 API reference.public DescribeInstancesRequest withFilters(Collection<Filter> filters)
Returns a reference to this object so that method calls can be chained together.
filters
- A list of filters used to match properties for Instances. For a
complete reference to the available filter keys for this operation,
see the Amazon
EC2 API reference.public String getNextToken()
public void setNextToken(String nextToken)
nextToken
- The new value for the NextToken property for this object.public DescribeInstancesRequest withNextToken(String nextToken)
Returns a reference to this object so that method calls can be chained together.
nextToken
- The new value for the NextToken property for this object.public Integer getMaxResults()
public void setMaxResults(Integer maxResults)
maxResults
- The new value for the MaxResults property for this object.public DescribeInstancesRequest withMaxResults(Integer maxResults)
Returns a reference to this object so that method calls can be chained together.
maxResults
- The new value for the MaxResults property for this object.public Request<DescribeInstancesRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<DescribeInstancesRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.