EC2 / Paginator / DescribeHosts
DescribeHosts#
- class EC2.Paginator.DescribeHosts#
paginator = client.get_paginator('describe_hosts')
- paginate(**kwargs)#
Creates an iterator that will paginate through responses from
EC2.Client.describe_hosts()
.See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( HostIds=[ 'string', ], Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
HostIds (list) –
The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.
(string) –
Filters (list) –
The filters.
auto-placement
- Whether auto-placement is enabled or disabled (on
|off
).availability-zone
- The Availability Zone of the host.client-token
- The idempotency token that you provided when you allocated the host.host-reservation-id
- The ID of the reservation assigned to this host.instance-type
- The instance type size that the Dedicated Host is configured to support.state
- The allocation state of the Dedicated Host (available
|under-assessment
|permanent-failure
|released
|released-permanent-failure
).tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
(dict) –
A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
If you specify multiple filters, the filters are joined with an
AND
, and the request returns only results that match all of the specified filters.For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.
Name (string) –
The name of the filter. Filter names are case-sensitive.
Values (list) –
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an
OR
, and the request returns all results that match any of the specified values.(string) –
PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextToken
will be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextToken
from a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'Hosts': [ { 'AutoPlacement': 'on'|'off', 'AvailabilityZone': 'string', 'AvailableCapacity': { 'AvailableInstanceCapacity': [ { 'AvailableCapacity': 123, 'InstanceType': 'string', 'TotalCapacity': 123 }, ], 'AvailableVCpus': 123 }, 'ClientToken': 'string', 'HostId': 'string', 'HostProperties': { 'Cores': 123, 'InstanceType': 'string', 'InstanceFamily': 'string', 'Sockets': 123, 'TotalVCpus': 123 }, 'HostReservationId': 'string', 'Instances': [ { 'InstanceId': 'string', 'InstanceType': 'string', 'OwnerId': 'string' }, ], 'State': 'available'|'under-assessment'|'permanent-failure'|'released'|'released-permanent-failure'|'pending', 'AllocationTime': datetime(2015, 1, 1), 'ReleaseTime': datetime(2015, 1, 1), 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'HostRecovery': 'on'|'off', 'AllowsMultipleInstanceTypes': 'on'|'off', 'OwnerId': 'string', 'AvailabilityZoneId': 'string', 'MemberOfServiceLinkedResourceGroup': True|False, 'OutpostArn': 'string', 'HostMaintenance': 'on'|'off', 'AssetId': 'string' }, ], }
Response Structure
(dict) –
Hosts (list) –
Information about the Dedicated Hosts.
(dict) –
Describes the properties of the Dedicated Host.
AutoPlacement (string) –
Whether auto-placement is on or off.
AvailabilityZone (string) –
The Availability Zone of the Dedicated Host.
AvailableCapacity (dict) –
Information about the instances running on the Dedicated Host.
AvailableInstanceCapacity (list) –
The number of instances that can be launched onto the Dedicated Host depending on the host’s available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.
(dict) –
Information about the number of instances that can be launched onto the Dedicated Host.
AvailableCapacity (integer) –
The number of instances that can be launched onto the Dedicated Host based on the host’s available capacity.
InstanceType (string) –
The instance type supported by the Dedicated Host.
TotalCapacity (integer) –
The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.
AvailableVCpus (integer) –
The number of vCPUs available for launching instances onto the Dedicated Host.
ClientToken (string) –
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
HostId (string) –
The ID of the Dedicated Host.
HostProperties (dict) –
The hardware specifications of the Dedicated Host.
Cores (integer) –
The number of cores on the Dedicated Host.
InstanceType (string) –
The instance type supported by the Dedicated Host. For example,
m5.large
. If the host supports multiple instance types, no instanceType is returned.InstanceFamily (string) –
The instance family supported by the Dedicated Host. For example,
m5
.Sockets (integer) –
The number of sockets on the Dedicated Host.
TotalVCpus (integer) –
The total number of vCPUs on the Dedicated Host.
HostReservationId (string) –
The reservation ID of the Dedicated Host. This returns a
null
response if the Dedicated Host doesn’t have an associated reservation.Instances (list) –
The IDs and instance type that are currently running on the Dedicated Host.
(dict) –
Describes an instance running on a Dedicated Host.
InstanceId (string) –
The ID of instance that is running on the Dedicated Host.
InstanceType (string) –
The instance type (for example,
m3.medium
) of the running instance.OwnerId (string) –
The ID of the Amazon Web Services account that owns the instance.
State (string) –
The Dedicated Host’s state.
AllocationTime (datetime) –
The time that the Dedicated Host was allocated.
ReleaseTime (datetime) –
The time that the Dedicated Host was released.
Tags (list) –
Any tags assigned to the Dedicated Host.
(dict) –
Describes a tag.
Key (string) –
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with
aws:
.Value (string) –
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.
HostRecovery (string) –
Indicates whether host recovery is enabled or disabled for the Dedicated Host.
AllowsMultipleInstanceTypes (string) –
Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is
on
, the Dedicated Host supports multiple instance types in the instance family. If the value isoff
, the Dedicated Host supports a single instance type only.OwnerId (string) –
The ID of the Amazon Web Services account that owns the Dedicated Host.
AvailabilityZoneId (string) –
The ID of the Availability Zone in which the Dedicated Host is allocated.
MemberOfServiceLinkedResourceGroup (boolean) –
Indicates whether the Dedicated Host is in a host resource group. If memberOfServiceLinkedResourceGroup is
true
, the host is in a host resource group; otherwise, it is not.OutpostArn (string) –
The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.
HostMaintenance (string) –
Indicates whether host maintenance is enabled or disabled for the Dedicated Host.
AssetId (string) –
The ID of the Outpost hardware asset on which the Dedicated Host is allocated.