Class DescribeHostsRequest

java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.DescribeHostsRequest
All Implemented Interfaces:
ReadLimitInfo, DryRunSupportedRequest<DescribeHostsRequest>, Serializable, Cloneable

public class DescribeHostsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest<DescribeHostsRequest>

Contains the parameters for DescribeHosts.

See Also:
  • Constructor Details

    • DescribeHostsRequest

      public DescribeHostsRequest()
  • Method Details

    • getHostIds

      public List<String> getHostIds()

      The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.

      Returns:
      The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.
    • setHostIds

      public void setHostIds(Collection<String> hostIds)

      The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.

      Parameters:
      hostIds - The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.
    • withHostIds

      public DescribeHostsRequest withHostIds(String... hostIds)

      The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.

      NOTE: This method appends the values to the existing list (if any). Use setHostIds(java.util.Collection) or withHostIds(java.util.Collection) if you want to override the existing values.

      Parameters:
      hostIds - The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • withHostIds

      public DescribeHostsRequest withHostIds(Collection<String> hostIds)

      The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.

      Parameters:
      hostIds - The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setNextToken

      public void setNextToken(String nextToken)

      The token to retrieve the next page of results.

      Parameters:
      nextToken - The token to retrieve the next page of results.
    • getNextToken

      public String getNextToken()

      The token to retrieve the next page of results.

      Returns:
      The token to retrieve the next page of results.
    • withNextToken

      public DescribeHostsRequest withNextToken(String nextToken)

      The token to retrieve the next page of results.

      Parameters:
      nextToken - The token to retrieve the next page of results.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setMaxResults

      public void setMaxResults(Integer maxResults)

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.

      Parameters:
      maxResults - The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.
    • getMaxResults

      public Integer getMaxResults()

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.

      Returns:
      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.
    • withMaxResults

      public DescribeHostsRequest withMaxResults(Integer maxResults)

      The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.

      Parameters:
      maxResults - The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500; if maxResults is given a larger value than 500, you will receive an error. You cannot specify this parameter and the host IDs parameter in the same request.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • getFilter

      public List<Filter> getFilter()

      One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

      Returns:
      One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

    • setFilter

      public void setFilter(Collection<Filter> filter)

      One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

      Parameters:
      filter - One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

    • withFilter

      public DescribeHostsRequest withFilter(Filter... filter)

      One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

      NOTE: This method appends the values to the existing list (if any). Use setFilter(java.util.Collection) or withFilter(java.util.Collection) if you want to override the existing values.

      Parameters:
      filter - One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

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

      public DescribeHostsRequest withFilter(Collection<Filter> filter)

      One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

      Parameters:
      filter - One or more filters.

      • instance-type - The instance type size that the Dedicated host is configured to support.

      • auto-placement - Whether auto-placement is enabled or disabled (on | off).

      • host-reservation-id - The ID of the reservation associated with this host.

      • client-token - The idempotency token you provided when you launched the instance

      • state- The allocation state of the Dedicated host ( available | under-assessment | permanent-failure | released | released-permanent-failure).

      • availability-zone - The Availability Zone of the host.

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

      public Request<DescribeHostsRequest> 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<DescribeHostsRequest>
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public DescribeHostsRequest clone()
      Description copied from class: AmazonWebServiceRequest
      Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.
      Overrides:
      clone in class AmazonWebServiceRequest
      See Also: