2015/11/24 - Amazon Elastic Compute Cloud - 7 new7 updated api methods
Modify the auto-placement setting of a Dedicated host. When auto-placement is enabled, AWS will place instances that you launch with a tenancy of host, but without targeting a specific host ID, onto any available Dedicated host in your account which has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID if you want the instance to launch onto a specific host. If no host ID is provided, the instance will be launched onto a suitable host which has auto-placement enabled.
Request Syntax
client.modify_hosts( HostIds=[ 'string', ], AutoPlacement='on'|'off' )
list
[REQUIRED]
The host IDs of the Dedicated hosts you want to modify.
(string) --
string
[REQUIRED]
Specify whether to enable or disable auto-placement.
dict
Response Syntax
{ 'Successful': [ 'string', ], 'Unsuccessful': [ { 'Error': { 'Code': 'string', 'Message': 'string' }, 'ResourceId': 'string' }, ] }
Response Structure
(dict) --
Successful (list) --
The IDs of the Dedicated hosts that were successfully modified.
(string) --
Unsuccessful (list) --
The IDs of the Dedicated hosts that could not be modified. Check whether the setting you requested can be used.
(dict) --
Information about items that were not successfully processed in a batch call.
Error (dict) --
Information about the error.
Code (string) --
The error code.
Message (string) --
The error message accompanying the error code.
ResourceId (string) --
The ID of the resource.
Important: This command is reserved for future use, and is currently not available for you to use.
Modifies the ID format for the specified resource. You can specify that resources should receive longer IDs (17-character IDs) when they are created. The following resource types support longer IDs: instance | reservation.
This setting applies to the IAM user who makes the request; it does not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running this request. These settings are applied on a per-region basis.
Request Syntax
client.modify_id_format( Resource='string', UseLongIds=True|False )
string
[REQUIRED]
The type of resource.
boolean
[REQUIRED]
Indicate whether the resource should use longer IDs (17-character IDs).
None
When you no longer want to use a Dedicated host it can be released. On-Demand billing is stopped and the host goes into "released" state. The host ID of Dedicated hosts that have been released can no longer be specified in another request, e.g., ModifyHosts. You must stop or terminate all instances on a host before it can be released.
When Dedicated hosts are released, it make take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated hosts. Try waiting a few minutes, and then try again.
Released hosts will still appear in a DescribeHosts response.
Request Syntax
client.release_hosts( HostIds=[ 'string', ] )
list
[REQUIRED]
The IDs of the Dedicated hosts you want to release.
(string) --
dict
Response Syntax
{ 'Successful': [ 'string', ], 'Unsuccessful': [ { 'Error': { 'Code': 'string', 'Message': 'string' }, 'ResourceId': 'string' }, ] }
Response Structure
(dict) --
Successful (list) --
The IDs of the Dedicated hosts that were successfully released.
(string) --
Unsuccessful (list) --
The IDs of the Dedicated hosts that could not be released, including an error message.
(dict) --
Information about items that were not successfully processed in a batch call.
Error (dict) --
Information about the error.
Code (string) --
The error code.
Message (string) --
The error message accompanying the error code.
ResourceId (string) --
The ID of the resource.
Allocates a Dedicated host to your account. At minimum you need to specify the instance size type, Availability Zone, and quantity of hosts you want to allocate.
Request Syntax
client.allocate_hosts( AutoPlacement='on'|'off', ClientToken='string', InstanceType='string', Quantity=123, AvailabilityZone='string' )
string
This is enabled by default. This property allows instances to be automatically placed onto available Dedicated hosts, when you are launching instances without specifying a host ID.
Default: Enabled
string
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
string
[REQUIRED]
Specify the instance type that you want your Dedicated hosts to be configured for. When you specify the instance type, that is the only instance type that you can launch onto that host.
integer
[REQUIRED]
The number of Dedicated hosts you want to allocate to your account with these parameters.
string
[REQUIRED]
The Availability Zone for the Dedicated hosts.
dict
Response Syntax
{ 'HostIds': [ 'string', ] }
Response Structure
(dict) --
HostIds (list) --
The ID of the allocated Dedicated host. This is used when you want to launch an instance onto a specific host.
(string) --
Set the instance affinity value for a specific stopped instance and modify the instance tenancy setting.
Instance affinity is disabled by default. When instance affinity is host and it is not associated with a specific Dedicated host, the next time it is launched it will automatically be associated with the host it lands on. This relationship will persist if the instance is stopped/started, or rebooted.
You can modify the host ID associated with a stopped instance. If a stopped instance has a new host ID association, the instance will target that host when restarted.
You can modify the tenancy of a stopped instance with a tenancy of host or dedicated.
Affinity, hostID, and tenancy are not required parameters, but at least one of them must be specified in the request. Affinity and tenancy can be modified in the same request, but tenancy can only be modified on instances that are stopped.
Request Syntax
client.modify_instance_placement( InstanceId='string', Tenancy='dedicated'|'host', Affinity='default'|'host', HostId='string' )
string
[REQUIRED]
The ID of the instance that you are modifying.
string
The tenancy of the instance that you are modifying.
string
The new affinity setting for the instance.
string
The ID of the Dedicated host that the instance will have affinity with.
dict
Response Syntax
{ 'Return': True|False }
Response Structure
(dict) --
Return (boolean) --
Is true if the request succeeds, and an error otherwise.
Describes one or more of your Dedicated hosts.
The results describe only the Dedicated hosts in the region you're currently using. All listed instances consume capacity on your Dedicated host. Dedicated hosts that have recently been released will be listed with the status "released".
Request Syntax
client.describe_hosts( HostIds=[ 'string', ], NextToken='string', MaxResults=123, Filter=[ { 'Name': 'string', 'Values': [ 'string', ] }, ] )
list
The IDs of the Dedicated hosts. The IDs are used for targeted instance launches.
(string) --
string
The token to retrieve the next page of results.
integer
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.
list
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.
(dict) --
A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
One or more filter values. Filter values are case-sensitive.
(string) --
dict
Response Syntax
{ 'Hosts': [ { 'HostId': 'string', 'AutoPlacement': 'on'|'off', 'HostReservationId': 'string', 'ClientToken': 'string', 'HostProperties': { 'Sockets': 123, 'Cores': 123, 'TotalVCpus': 123, 'InstanceType': 'string' }, 'State': 'available'|'under-assessment'|'permanent-failure'|'released'|'released-permanent-failure', 'AvailabilityZone': 'string', 'Instances': [ { 'InstanceId': 'string', 'InstanceType': 'string' }, ], 'AvailableCapacity': { 'AvailableInstanceCapacity': [ { 'InstanceType': 'string', 'AvailableCapacity': 123, 'TotalCapacity': 123 }, ], 'AvailableVCpus': 123 } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Hosts (list) --
Information about the Dedicated hosts.
(dict) --
HostId (string) --
The ID of the Dedicated host.
AutoPlacement (string) --
Whether auto-placement is on or off.
HostReservationId (string) --
The reservation ID of the Dedicated host. This returns a "null" response if the Dedicated host doesn't have an associated reservation.
ClientToken (string) --
Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide.
HostProperties (dict) --
The hardware specifications of the Dedicated host.
Sockets (integer) --
The number of sockets on the Dedicated host.
Cores (integer) --
The number of cores on the Dedicated host.
TotalVCpus (integer) --
The number of vCPUs on the Dedicated host.
InstanceType (string) --
The instance type size that the Dedicated host supports (e.g., m3.medium).
State (string) --
The Dedicated host's state. Can be "available", "under assessment, or "released".
AvailabilityZone (string) --
The Availability Zone of the Dedicated host.
Instances (list) --
The IDs and instance type that are currently running on the Dedicated host.
(dict) --
InstanceId (string) --
the IDs of instances that are running on the Dedicated host.
InstanceType (string) --
The instance type size (e.g., m3.medium) of the running instance.
AvailableCapacity (dict) --
The number of new instances that can be launched onto the Dedicated host.
AvailableInstanceCapacity (list) --
The total number of instances that the Dedicated host supports.
(dict) --
InstanceType (string) --
The instance type size supported by the Dedicated host.
AvailableCapacity (integer) --
The number of instances that can still be launched onto the Dedicated host.
TotalCapacity (integer) --
The total number of instances that can be launched onto the Dedicated host.
AvailableVCpus (integer) --
The number of vCPUs available on the Dedicated host.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
Important: This command is reserved for future use, and is currently not available for you to use.
Describes the ID format settings for your resources, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.
The following resource types support longer IDs: instance | reservation.
These settings apply to the IAM user who makes the request; they do not apply to the entire AWS account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the ModifyIdFormat command. These settings are applied on a per-region basis.
Request Syntax
client.describe_id_format( Resource='string' )
string
The type of resource.
dict
Response Syntax
{ 'Statuses': [ { 'Resource': 'string', 'UseLongIds': True|False, 'Deadline': datetime(2015, 1, 1) }, ] }
Response Structure
(dict) --
Statuses (list) --
Information about the ID format for the resource.
(dict) --
Describes the ID format for a resource.
Resource (string) --
The type of resource.
UseLongIds (boolean) --
Indicates whether longer IDs (17-character IDs) are enabled for the resource.
Deadline (datetime) --
The date in UTC at which you are permanently switched over to using longer IDs.
{'InstanceTenancy': {'host'}}Response
{'Vpc': {'InstanceTenancy': {'host'}}}
Creates a VPC with the specified CIDR block.
The smallest VPC you can create uses a /28 netmask (16 IP addresses), and the largest uses a /16 netmask (65,536 IP addresses). To help you decide how big to make your VPC, see Your VPC and Subnets in the Amazon Virtual Private Cloud User Guide.
By default, each instance you launch in the VPC has the default DHCP options, which includes only a default DNS server that we provide (AmazonProvidedDNS). For more information about DHCP options, see DHCP Options Sets in the Amazon Virtual Private Cloud User Guide.
Request Syntax
client.create_vpc( DryRun=True|False, CidrBlock='string', InstanceTenancy='default'|'dedicated'|'host' )
boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
string
[REQUIRED]
The network range for the VPC, in CIDR notation. For example, 10.0.0.0/16.
string
The supported tenancy options for instances launched into the VPC. A value of default means that instances can be launched with any tenancy; a value of dedicated means all instances launched into the VPC are launched as dedicated tenancy instances regardless of the tenancy assigned to the instance at launch. Dedicated tenancy instances run on single-tenant hardware.
Important: The host value cannot be used with this parameter. Use the default or dedicated values only.
Default: default
dict
Response Syntax
{ 'Vpc': { 'VpcId': 'string', 'State': 'pending'|'available', 'CidrBlock': 'string', 'DhcpOptionsId': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'InstanceTenancy': 'default'|'dedicated'|'host', 'IsDefault': True|False } }
Response Structure
(dict) --
Vpc (dict) --
Information about the VPC.
VpcId (string) --
The ID of the VPC.
State (string) --
The current state of the VPC.
CidrBlock (string) --
The CIDR block for the VPC.
DhcpOptionsId (string) --
The ID of the set of DHCP options you've associated with the VPC (or default if the default options are associated with the VPC).
Tags (list) --
Any tags assigned to the VPC.
(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 255 Unicode characters.
InstanceTenancy (string) --
The allowed tenancy of instances launched into the VPC.
IsDefault (boolean) --
Indicates whether the VPC is the default VPC.
{'Reservations': {'Instances': {'Placement': {'Affinity': 'string', 'HostId': 'string', 'Tenancy': {'host'}}}}}
Describes one or more of your instances.
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 instance ID that is not valid, an error is returned. If you specify an instance that you do not own, it is not included in the returned results.
Recently terminated instances might appear in the returned results. This interval is usually less than one hour.
Request Syntax
client.describe_instances( DryRun=True|False, InstanceIds=[ 'string', ], Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], NextToken='string', MaxResults=123 )
boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
list
One or more instance IDs.
Default: Describes all your instances.
(string) --
list
One or more filters.
architecture - The instance architecture ( i386 | x86_64).
availability-zone - The Availability Zone of the instance.
block-device-mapping.attach-time - The attach time for an EBS volume mapped to the instance, for example, 2010-09-15T17:15:20.000Z.
block-device-mapping.delete-on-termination - A Boolean that indicates whether the EBS volume is deleted on instance termination.
block-device-mapping.device-name - The device name for the EBS volume (for example, /dev/sdh or xvdh).
block-device-mapping.status - The status for the EBS volume ( attaching | attached | detaching | detached).
block-device-mapping.volume-id - The volume ID of the EBS volume.
client-token - The idempotency token you provided when you launched the instance.
dns-name - The public DNS name of the instance.
group-id - The ID of the security group for the instance. EC2-Classic only.
group-name - The name of the security group for the instance. EC2-Classic only.
hypervisor - The hypervisor type of the instance ( ovm | xen).
iam-instance-profile.arn - The instance profile associated with the instance. Specified as an ARN.
image-id - The ID of the image used to launch the instance.
instance-id - The ID of the instance.
instance-lifecycle - Indicates whether this is a Spot Instance ( spot).
instance-state-code - 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-type - The type of instance (for example, t2.micro).
instance.group-id - The ID of the security group for the instance.
instance.group-name - The name of the security group for the instance.
ip-address - The public IP address of the instance.
kernel-id - The kernel ID.
key-name - The name of the key pair used when the instance was launched.
launch-index - When launching multiple instances, this is the index for the instance in the launch group (for example, 0, 1, 2, and so on).
launch-time - The time when the instance was launched.
monitoring-state - Indicates whether monitoring is enabled for the instance ( disabled | enabled).
owner-id - The AWS account ID of the instance owner.
placement-group-name - The name of the placement group for the instance.
platform - The platform. Use windows if you have Windows instances; otherwise, leave blank.
private-dns-name - The private DNS name of the instance.
private-ip-address - The private IP address of the instance.
product-code - The product code associated with the AMI used to launch the instance.
product-code.type - The type of product code ( devpay | marketplace).
ramdisk-id - The RAM disk ID.
reason - The reason for the current state of the instance (for example, shows "User Initiated [date]" when you stop or terminate the instance). Similar to the state-reason-code filter.
requester-id - The ID of the entity that launched the instance on your behalf (for example, AWS Management Console, Auto Scaling, and so on).
reservation-id - The ID of the instance's reservation. A reservation ID is created any time you launch an instance. A reservation ID has a one-to-one relationship with an instance launch request, but can be associated with more than one instance if you launch multiple instances using the same launch request. For example, if you launch one instance, you'll get one reservation ID. If you launch ten instances using the same launch request, you'll also get one reservation ID.
root-device-name - The name of the root device for the instance (for example, /dev/sda1 or /dev/xvda).
root-device-type - The type of root device that the instance uses ( ebs | instance-store).
source-dest-check - Indicates whether the instance performs source/destination checking. A value of true means that checking is enabled, and false means checking is disabled. The value must be false for the instance to perform network address translation (NAT) in your VPC.
spot-instance-request-id - The ID of the Spot instance request.
state-reason-code - The reason code for the state change.
state-reason-message - A message that describes the state change.
subnet-id - The ID of the subnet for the instance.
tag:key*=*value - The key/value combination of a tag assigned to the resource, where tag:key is the tag's key.
tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key*=*value filter.
tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.
tenancy - The tenancy of an instance ( dedicated | default).
virtualization-type - The virtualization type of the instance ( paravirtual | hvm).
vpc-id - The ID of the VPC that the instance is running in.
network-interface.description - The description of the network interface.
network-interface.subnet-id - The ID of the subnet for the network interface.
network-interface.vpc-id - The ID of the VPC for the network interface.
network-interface.network-interface-id - The ID of the network interface.
network-interface.owner-id - The ID of the owner of the network interface.
network-interface.availability-zone - The Availability Zone for the network interface.
network-interface.requester-id - The requester ID for the network interface.
network-interface.requester-managed - Indicates whether the network interface is being managed by AWS.
network-interface.status - The status of the network interface ( available) | in-use).
network-interface.mac-address - The MAC address of the network interface.
network-interface-private-dns-name - The private DNS name of the network interface.
network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
network-interface.group-id - The ID of a security group associated with the network interface.
network-interface.group-name - The name of a security group associated with the network interface.
network-interface.attachment.attachment-id - The ID of the interface attachment.
network-interface.attachment.instance-id - The ID of the instance to which the network interface is attached.
network-interface.attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.
network-interface.addresses.private-ip-address - The private IP address associated with the network interface.
network-interface.attachment.device-index - The device index to which the network interface is attached.
network-interface.attachment.status - The status of the attachment ( attaching | attached | detaching | detached).
network-interface.attachment.attach-time - The time that the network interface was attached to an instance.
network-interface.attachment.delete-on-termination - Specifies whether the attachment is deleted when an instance is terminated.
network-interface.addresses.primary - Specifies whether the IP address of the network interface is the primary private IP address.
network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address with a network interface.
network-interface.addresses.association.ip-owner-id - The owner ID of the private IP address associated with the network interface.
association.public-ip - The address of the Elastic IP address bound to the network interface.
association.ip-owner-id - The owner of the Elastic IP address associated with the network interface.
association.allocation-id - The allocation ID returned when you allocated the Elastic IP address for your network interface.
association.association-id - The association ID returned when the network interface was associated with an IP address.
(dict) --
A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
One or more filter values. Filter values are case-sensitive.
(string) --
string
The token to request the next page of results.
integer
The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value larger than 1000, only 1000 results are returned. You cannot specify this parameter and the instance IDs parameter in the same request.
dict
Response Syntax
{ 'Reservations': [ { 'ReservationId': 'string', 'OwnerId': 'string', 'RequesterId': 'string', 'Groups': [ { 'GroupName': 'string', 'GroupId': 'string' }, ], 'Instances': [ { 'InstanceId': 'string', 'ImageId': 'string', 'State': { 'Code': 123, 'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped' }, 'PrivateDnsName': 'string', 'PublicDnsName': 'string', 'StateTransitionReason': 'string', 'KeyName': 'string', 'AmiLaunchIndex': 123, 'ProductCodes': [ { 'ProductCodeId': 'string', 'ProductCodeType': 'devpay'|'marketplace' }, ], 'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge', 'LaunchTime': datetime(2015, 1, 1), 'Placement': { 'AvailabilityZone': 'string', 'GroupName': 'string', 'Tenancy': 'default'|'dedicated'|'host', 'HostId': 'string', 'Affinity': 'string' }, 'KernelId': 'string', 'RamdiskId': 'string', 'Platform': 'Windows', 'Monitoring': { 'State': 'disabled'|'disabling'|'enabled'|'pending' }, 'SubnetId': 'string', 'VpcId': 'string', 'PrivateIpAddress': 'string', 'PublicIpAddress': 'string', 'StateReason': { 'Code': 'string', 'Message': 'string' }, 'Architecture': 'i386'|'x86_64', 'RootDeviceType': 'ebs'|'instance-store', 'RootDeviceName': 'string', 'BlockDeviceMappings': [ { 'DeviceName': 'string', 'Ebs': { 'VolumeId': 'string', 'Status': 'attaching'|'attached'|'detaching'|'detached', 'AttachTime': datetime(2015, 1, 1), 'DeleteOnTermination': True|False } }, ], 'VirtualizationType': 'hvm'|'paravirtual', 'InstanceLifecycle': 'spot', 'SpotInstanceRequestId': 'string', 'ClientToken': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'SecurityGroups': [ { 'GroupName': 'string', 'GroupId': 'string' }, ], 'SourceDestCheck': True|False, 'Hypervisor': 'ovm'|'xen', 'NetworkInterfaces': [ { 'NetworkInterfaceId': 'string', 'SubnetId': 'string', 'VpcId': 'string', 'Description': 'string', 'OwnerId': 'string', 'Status': 'available'|'attaching'|'in-use'|'detaching', 'MacAddress': 'string', 'PrivateIpAddress': 'string', 'PrivateDnsName': 'string', 'SourceDestCheck': True|False, 'Groups': [ { 'GroupName': 'string', 'GroupId': 'string' }, ], 'Attachment': { 'AttachmentId': 'string', 'DeviceIndex': 123, 'Status': 'attaching'|'attached'|'detaching'|'detached', 'AttachTime': datetime(2015, 1, 1), 'DeleteOnTermination': True|False }, 'Association': { 'PublicIp': 'string', 'PublicDnsName': 'string', 'IpOwnerId': 'string' }, 'PrivateIpAddresses': [ { 'PrivateIpAddress': 'string', 'PrivateDnsName': 'string', 'Primary': True|False, 'Association': { 'PublicIp': 'string', 'PublicDnsName': 'string', 'IpOwnerId': 'string' } }, ] }, ], 'IamInstanceProfile': { 'Arn': 'string', 'Id': 'string' }, 'EbsOptimized': True|False, 'SriovNetSupport': 'string' }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Reservations (list) --
Zero or more reservations.
(dict) --
Describes a reservation.
ReservationId (string) --
The ID of the reservation.
OwnerId (string) --
The ID of the AWS account that owns the reservation.
RequesterId (string) --
The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).
Groups (list) --
One or more security groups.
(dict) --
Describes a security group.
GroupName (string) --
The name of the security group.
GroupId (string) --
The ID of the security group.
Instances (list) --
One or more instances.
(dict) --
Describes an instance.
InstanceId (string) --
The ID of the instance.
ImageId (string) --
The ID of the AMI used to launch the instance.
State (dict) --
The current state of the instance.
Code (integer) --
The low byte represents the state. The high byte is an opaque internal value and should be ignored.
0 : pending
16 : running
32 : shutting-down
48 : terminated
64 : stopping
80 : stopped
Name (string) --
The current state of the instance.
PrivateDnsName (string) --
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
PublicDnsName (string) --
The public DNS name assigned to the instance. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
StateTransitionReason (string) --
The reason for the most recent state transition. This might be an empty string.
KeyName (string) --
The name of the key pair, if this instance was launched with an associated key pair.
AmiLaunchIndex (integer) --
The AMI launch index, which can be used to find this instance in the launch group.
ProductCodes (list) --
The product codes attached to this instance, if applicable.
(dict) --
Describes a product code.
ProductCodeId (string) --
The product code.
ProductCodeType (string) --
The type of product code.
InstanceType (string) --
The instance type.
LaunchTime (datetime) --
The time the instance was launched.
Placement (dict) --
The location where the instance launched, if applicable.
AvailabilityZone (string) --
The Availability Zone of the instance.
GroupName (string) --
The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --
The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --
The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.
Affinity (string) --
The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.
KernelId (string) --
The kernel associated with this instance, if applicable.
RamdiskId (string) --
The RAM disk associated with this instance, if applicable.
Platform (string) --
The value is Windows for Windows instances; otherwise blank.
Monitoring (dict) --
The monitoring information for the instance.
State (string) --
Indicates whether monitoring is enabled for the instance.
SubnetId (string) --
[EC2-VPC] The ID of the subnet in which the instance is running.
VpcId (string) --
[EC2-VPC] The ID of the VPC in which the instance is running.
PrivateIpAddress (string) --
The private IP address assigned to the instance.
PublicIpAddress (string) --
The public IP address assigned to the instance, if applicable.
StateReason (dict) --
The reason for the most recent state transition.
Code (string) --
The reason code for the state change.
Message (string) --
The message for the state change.
Server.SpotInstanceTermination: A Spot instance was terminated due to an increase in the market price.
Server.InternalError: An internal error occurred during instance launch, resulting in termination.
Server.InsufficientInstanceCapacity: There was insufficient instance capacity to satisfy the launch request.
Client.InternalError: A client error caused the instance to terminate on launch.
Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.
Client.UserInitiatedShutdown: The instance was shut down using the Amazon EC2 API.
Client.VolumeLimitExceeded: The volume limit was exceeded.
Client.InvalidSnapshot.NotFound: The specified snapshot was not found.
Architecture (string) --
The architecture of the image.
RootDeviceType (string) --
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
RootDeviceName (string) --
The root device name (for example, /dev/sda1 or /dev/xvda).
BlockDeviceMappings (list) --
Any block device mapping entries for the instance.
(dict) --
Describes a block device mapping.
DeviceName (string) --
The device name exposed to the instance (for example, /dev/sdh or xvdh).
Ebs (dict) --
Parameters used to automatically set up EBS volumes when the instance is launched.
VolumeId (string) --
The ID of the EBS volume.
Status (string) --
The attachment state.
AttachTime (datetime) --
The time stamp when the attachment initiated.
DeleteOnTermination (boolean) --
Indicates whether the volume is deleted on instance termination.
VirtualizationType (string) --
The virtualization type of the instance.
InstanceLifecycle (string) --
Indicates whether this is a Spot instance.
SpotInstanceRequestId (string) --
If the request is a Spot instance request, the ID of the request.
ClientToken (string) --
The idempotency token you provided when you launched the instance, if applicable.
Tags (list) --
Any tags assigned to the instance.
(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 255 Unicode characters.
SecurityGroups (list) --
One or more security groups for the instance.
(dict) --
Describes a security group.
GroupName (string) --
The name of the security group.
GroupId (string) --
The ID of the security group.
SourceDestCheck (boolean) --
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
Hypervisor (string) --
The hypervisor type of the instance.
NetworkInterfaces (list) --
[EC2-VPC] One or more network interfaces for the instance.
(dict) --
Describes a network interface.
NetworkInterfaceId (string) --
The ID of the network interface.
SubnetId (string) --
The ID of the subnet.
VpcId (string) --
The ID of the VPC.
Description (string) --
The description.
OwnerId (string) --
The ID of the AWS account that created the network interface.
Status (string) --
The status of the network interface.
MacAddress (string) --
The MAC address.
PrivateIpAddress (string) --
The IP address of the network interface within the subnet.
PrivateDnsName (string) --
The private DNS name.
SourceDestCheck (boolean) --
Indicates whether to validate network traffic to or from this network interface.
Groups (list) --
One or more security groups.
(dict) --
Describes a security group.
GroupName (string) --
The name of the security group.
GroupId (string) --
The ID of the security group.
Attachment (dict) --
The network interface attachment.
AttachmentId (string) --
The ID of the network interface attachment.
DeviceIndex (integer) --
The index of the device on the instance for the network interface attachment.
Status (string) --
The attachment state.
AttachTime (datetime) --
The time stamp when the attachment initiated.
DeleteOnTermination (boolean) --
Indicates whether the network interface is deleted when the instance is terminated.
Association (dict) --
The association information for an Elastic IP associated with the network interface.
PublicIp (string) --
The public IP address or Elastic IP address bound to the network interface.
PublicDnsName (string) --
The public DNS name.
IpOwnerId (string) --
The ID of the owner of the Elastic IP address.
PrivateIpAddresses (list) --
The private IP addresses associated with the network interface.
(dict) --
Describes a private IP address.
PrivateIpAddress (string) --
The private IP address of the network interface.
PrivateDnsName (string) --
The private DNS name.
Primary (boolean) --
Indicates whether this IP address is the primary private IP address of the network interface.
Association (dict) --
The association information for an Elastic IP address for the network interface.
PublicIp (string) --
The public IP address or Elastic IP address bound to the network interface.
PublicDnsName (string) --
The public DNS name.
IpOwnerId (string) --
The ID of the owner of the Elastic IP address.
IamInstanceProfile (dict) --
The IAM instance profile associated with the instance, if applicable.
Arn (string) --
The Amazon Resource Name (ARN) of the instance profile.
Id (string) --
The ID of the instance profile.
EbsOptimized (boolean) --
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
SriovNetSupport (string) --
Specifies whether enhanced networking is enabled.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
{'ReservedInstances': {'InstanceTenancy': {'host'}}}
Describes one or more of the Reserved instances that you purchased.
For more information about Reserved instances, see Reserved Instances in the Amazon Elastic Compute Cloud User Guide.
Request Syntax
client.describe_reserved_instances( DryRun=True|False, ReservedInstancesIds=[ 'string', ], Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront' )
boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
list
One or more Reserved instance IDs.
Default: Describes all your Reserved instances, or only those otherwise specified.
(string) --
list
One or more filters.
availability-zone - The Availability Zone where the Reserved instance can be used.
duration - The duration of the Reserved instance (one year or three years), in seconds ( 31536000 | 94608000).
end - The time when the Reserved instance expires (for example, 2015-08-07T11:54:42.000Z).
fixed-price - The purchase price of the Reserved instance (for example, 9800.0).
instance-type - The instance type on which the Reserved instance can be used.
product-description - The Reserved instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. ( Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC)).
reserved-instances-id - The ID of the Reserved instance.
start - The time at which the Reserved instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).
state - The state of the Reserved instance ( payment-pending | active | payment-failed | retired).
tag:key*=*value - The key/value combination of a tag assigned to the resource.
tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key*=*value filter.
tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.
usage-price - The usage price of the Reserved instance, per hour (for example, 0.84).
(dict) --
A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
One or more filter values. Filter values are case-sensitive.
(string) --
string
The Reserved instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved instance offering type.
dict
Response Syntax
{ 'ReservedInstances': [ { 'ReservedInstancesId': 'string', 'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge', 'AvailabilityZone': 'string', 'Start': datetime(2015, 1, 1), 'End': datetime(2015, 1, 1), 'Duration': 123, 'UsagePrice': ..., 'FixedPrice': ..., 'InstanceCount': 123, 'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)', 'State': 'payment-pending'|'active'|'payment-failed'|'retired', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'InstanceTenancy': 'default'|'dedicated'|'host', 'CurrencyCode': 'USD', 'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront', 'RecurringCharges': [ { 'Frequency': 'Hourly', 'Amount': 123.0 }, ] }, ] }
Response Structure
(dict) --
ReservedInstances (list) --
A list of Reserved instances.
(dict) --
Describes a Reserved instance.
ReservedInstancesId (string) --
The ID of the Reserved instance.
InstanceType (string) --
The instance type on which the Reserved instance can be used.
AvailabilityZone (string) --
The Availability Zone in which the Reserved instance can be used.
Start (datetime) --
The date and time the Reserved instance started.
End (datetime) --
The time when the Reserved instance expires.
Duration (integer) --
The duration of the Reserved instance, in seconds.
UsagePrice (float) --
The usage price of the Reserved instance, per hour.
FixedPrice (float) --
The purchase price of the Reserved instance.
InstanceCount (integer) --
The number of Reserved instances purchased.
ProductDescription (string) --
The Reserved instance product platform description.
State (string) --
The state of the Reserved instance purchase.
Tags (list) --
Any tags assigned to the resource.
(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 255 Unicode characters.
InstanceTenancy (string) --
The tenancy of the reserved instance.
CurrencyCode (string) --
The currency of the Reserved instance. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD.
OfferingType (string) --
The Reserved instance offering type.
RecurringCharges (list) --
The recurring charge tag assigned to the resource.
(dict) --
Describes a recurring charge.
Frequency (string) --
The frequency of the recurring charge.
Amount (float) --
The amount of the recurring charge.
{'InstanceTenancy': {'host'}}Response
{'ReservedInstancesOfferings': {'InstanceTenancy': {'host'}}}
Describes Reserved instance offerings that are available for purchase. With Reserved instances, you purchase the right to launch instances for a period of time. During that time period, you do not receive insufficient capacity errors, and you pay a lower usage rate than the rate charged for On-Demand instances for the actual time used.
For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide.
Request Syntax
client.describe_reserved_instances_offerings( DryRun=True|False, ReservedInstancesOfferingIds=[ 'string', ], InstanceType='t1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge', AvailabilityZone='string', ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)', Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], InstanceTenancy='default'|'dedicated'|'host', OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront', NextToken='string', MaxResults=123, IncludeMarketplace=True|False, MinDuration=123, MaxDuration=123, MaxInstanceCount=123 )
boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
list
One or more Reserved instances offering IDs.
(string) --
string
The instance type on which the Reserved instance can be used. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
string
The Availability Zone in which the Reserved instance can be used.
string
The Reserved instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.
list
One or more filters.
availability-zone - The Availability Zone where the Reserved instance can be used.
duration - The duration of the Reserved instance (for example, one year or three years), in seconds ( 31536000 | 94608000).
fixed-price - The purchase price of the Reserved instance (for example, 9800.0).
instance-type - The instance type on which the Reserved instance can be used.
marketplace - Set to true to show only Reserved Instance Marketplace offerings. When this filter is not used, which is the default behavior, all offerings from AWS and Reserved Instance Marketplace are listed.
product-description - The Reserved instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. ( Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC))
reserved-instances-offering-id - The Reserved instances offering ID.
usage-price - The usage price of the Reserved instance, per hour (for example, 0.84).
(dict) --
A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
One or more filter values. Filter values are case-sensitive.
(string) --
string
The tenancy of the Reserved instance offering. A Reserved instance with dedicated tenancy is applied to instances that run on single-tenant hardware and can only be launched within a VPC.
Default: default
string
The Reserved instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved instance offering type.
string
The token to retrieve the next page of results.
integer
The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. The maximum is 100.
Default: 100
boolean
Include Reserved Instance Marketplace offerings in the response.
integer
The minimum duration (in seconds) to filter when searching for offerings.
Default: 2592000 (1 month)
integer
The maximum duration (in seconds) to filter when searching for offerings.
Default: 94608000 (3 years)
integer
The maximum number of instances to filter when searching for offerings.
Default: 20
dict
Response Syntax
{ 'ReservedInstancesOfferings': [ { 'ReservedInstancesOfferingId': 'string', 'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge', 'AvailabilityZone': 'string', 'Duration': 123, 'UsagePrice': ..., 'FixedPrice': ..., 'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)', 'InstanceTenancy': 'default'|'dedicated'|'host', 'CurrencyCode': 'USD', 'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront', 'RecurringCharges': [ { 'Frequency': 'Hourly', 'Amount': 123.0 }, ], 'Marketplace': True|False, 'PricingDetails': [ { 'Price': 123.0, 'Count': 123 }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
ReservedInstancesOfferings (list) --
A list of Reserved instances offerings.
(dict) --
Describes a Reserved instance offering.
ReservedInstancesOfferingId (string) --
The ID of the Reserved instance offering.
InstanceType (string) --
The instance type on which the Reserved instance can be used.
AvailabilityZone (string) --
The Availability Zone in which the Reserved instance can be used.
Duration (integer) --
The duration of the Reserved instance, in seconds.
UsagePrice (float) --
The usage price of the Reserved instance, per hour.
FixedPrice (float) --
The purchase price of the Reserved instance.
ProductDescription (string) --
The Reserved instance product platform description.
InstanceTenancy (string) --
The tenancy of the reserved instance.
CurrencyCode (string) --
The currency of the Reserved instance offering you are purchasing. It's specified using ISO 4217 standard currency codes. At this time, the only supported currency is USD.
OfferingType (string) --
The Reserved instance offering type.
RecurringCharges (list) --
The recurring charge tag assigned to the resource.
(dict) --
Describes a recurring charge.
Frequency (string) --
The frequency of the recurring charge.
Amount (float) --
The amount of the recurring charge.
Marketplace (boolean) --
Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, this is true.
PricingDetails (list) --
The pricing details of the Reserved instance offering.
(dict) --
Describes a Reserved instance offering.
Price (float) --
The price per instance.
Count (integer) --
The number of instances available for the price.
NextToken (string) --
The token to use to retrieve the next page of results. This value is null when there are no more results to return.
{'Vpcs': {'InstanceTenancy': {'host'}}}
Describes one or more of your VPCs.
Request Syntax
client.describe_vpcs( DryRun=True|False, VpcIds=[ 'string', ], Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ] )
boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
list
One or more VPC IDs.
Default: Describes all your VPCs.
(string) --
list
One or more filters.
cidr - The CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28).
dhcp-options-id - The ID of a set of DHCP options.
isDefault - Indicates whether the VPC is the default VPC.
state - The state of the VPC ( pending | available).
tag:key*=*value - The key/value combination of a tag assigned to the resource.
tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag:key*=*value filter.
tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.
vpc-id - The ID of the VPC.
(dict) --
A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.
Name (string) --
The name of the filter. Filter names are case-sensitive.
Values (list) --
One or more filter values. Filter values are case-sensitive.
(string) --
dict
Response Syntax
{ 'Vpcs': [ { 'VpcId': 'string', 'State': 'pending'|'available', 'CidrBlock': 'string', 'DhcpOptionsId': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'InstanceTenancy': 'default'|'dedicated'|'host', 'IsDefault': True|False }, ] }
Response Structure
(dict) --
Vpcs (list) --
Information about one or more VPCs.
(dict) --
Describes a VPC.
VpcId (string) --
The ID of the VPC.
State (string) --
The current state of the VPC.
CidrBlock (string) --
The CIDR block for the VPC.
DhcpOptionsId (string) --
The ID of the set of DHCP options you've associated with the VPC (or default if the default options are associated with the VPC).
Tags (list) --
Any tags assigned to the VPC.
(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 255 Unicode characters.
InstanceTenancy (string) --
The allowed tenancy of instances launched into the VPC.
IsDefault (boolean) --
Indicates whether the VPC is the default VPC.
{'LaunchSpecification': {'Placement': {'Affinity': 'string', 'HostId': 'string', 'Tenancy': {'host'}}}}
Creates an import instance task using metadata from the specified disk image. ImportInstance only supports single-volume VMs. To import multi-volume VMs, use ImportImage. After importing the image, you then upload it using the ec2-import-volume command in the EC2 command line tools. For more information, see Using the Command Line Tools to Import Your Virtual Machine to Amazon EC2 in the Amazon Elastic Compute Cloud User Guide.
Request Syntax
client.import_instance( DryRun=True|False, Description='string', LaunchSpecification={ 'Architecture': 'i386'|'x86_64', 'GroupNames': [ 'string', ], 'GroupIds': [ 'string', ], 'AdditionalInfo': 'string', 'UserData': { 'Data': 'string' }, 'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge', 'Placement': { 'AvailabilityZone': 'string', 'GroupName': 'string', 'Tenancy': 'default'|'dedicated'|'host', 'HostId': 'string', 'Affinity': 'string' }, 'Monitoring': True|False, 'SubnetId': 'string', 'InstanceInitiatedShutdownBehavior': 'stop'|'terminate', 'PrivateIpAddress': 'string' }, DiskImages=[ { 'Image': { 'Format': 'VMDK'|'RAW'|'VHD', 'Bytes': 123, 'ImportManifestUrl': 'string' }, 'Description': 'string', 'Volume': { 'Size': 123 } }, ], Platform='Windows' )
boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
string
A description for the instance being imported.
dict
The launch specification.
Architecture (string) --
The architecture of the instance.
GroupNames (list) --
One or more security group names.
(string) --
GroupIds (list) --
One or more security group IDs.
(string) --
AdditionalInfo (string) --
Reserved.
UserData (dict) --
The Base64-encoded MIME user data to be made available to the instance.
Data (string) --
The Base64-encoded MIME user data for the instance.
InstanceType (string) --
The instance type. For more information about the instance types that you can import, see Before You Get Started in the Amazon Elastic Compute Cloud User Guide.
Placement (dict) --
The placement information for the instance.
AvailabilityZone (string) --
The Availability Zone of the instance.
GroupName (string) --
The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --
The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --
The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.
Affinity (string) --
The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.
Monitoring (boolean) --
Indicates whether monitoring is enabled.
SubnetId (string) --
[EC2-VPC] The ID of the subnet in which to launch the instance.
InstanceInitiatedShutdownBehavior (string) --
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
PrivateIpAddress (string) --
[EC2-VPC] An available IP address from the IP address range of the subnet.
list
The disk image.
(dict) --
Describes a disk image.
Image (dict) --
Information about the disk image.
Format (string) -- [REQUIRED]
The disk image format.
Bytes (integer) -- [REQUIRED]
The size of the disk image, in GiB.
ImportManifestUrl (string) -- [REQUIRED]
A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
Description (string) --
A description of the disk image.
Volume (dict) --
Information about the volume.
Size (integer) -- [REQUIRED]
The size of the volume, in GiB.
string
[REQUIRED]
The instance operating system.
dict
Response Syntax
{ 'ConversionTask': { 'ConversionTaskId': 'string', 'ExpirationTime': 'string', 'ImportInstance': { 'Volumes': [ { 'BytesConverted': 123, 'AvailabilityZone': 'string', 'Image': { 'Format': 'VMDK'|'RAW'|'VHD', 'Size': 123, 'ImportManifestUrl': 'string', 'Checksum': 'string' }, 'Volume': { 'Size': 123, 'Id': 'string' }, 'Status': 'string', 'StatusMessage': 'string', 'Description': 'string' }, ], 'InstanceId': 'string', 'Platform': 'Windows', 'Description': 'string' }, 'ImportVolume': { 'BytesConverted': 123, 'AvailabilityZone': 'string', 'Description': 'string', 'Image': { 'Format': 'VMDK'|'RAW'|'VHD', 'Size': 123, 'ImportManifestUrl': 'string', 'Checksum': 'string' }, 'Volume': { 'Size': 123, 'Id': 'string' } }, 'State': 'active'|'cancelling'|'cancelled'|'completed', 'StatusMessage': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }
Response Structure
(dict) --
ConversionTask (dict) --
Information about the conversion task.
ConversionTaskId (string) --
The ID of the conversion task.
ExpirationTime (string) --
The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.
ImportInstance (dict) --
If the task is for importing an instance, this contains information about the import instance task.
Volumes (list) --
One or more volumes.
(dict) --
Describes an import volume task.
BytesConverted (integer) --
The number of bytes converted so far.
AvailabilityZone (string) --
The Availability Zone where the resulting instance will reside.
Image (dict) --
The image.
Format (string) --
The disk image format.
Size (integer) --
The size of the disk image, in GiB.
ImportManifestUrl (string) --
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
Checksum (string) --
The checksum computed for the disk image.
Volume (dict) --
The volume.
Size (integer) --
The size of the volume, in GiB.
Id (string) --
The volume identifier.
Status (string) --
The status of the import of this particular disk image.
StatusMessage (string) --
The status information or errors related to the disk image.
Description (string) --
A description of the task.
InstanceId (string) --
The ID of the instance.
Platform (string) --
The instance operating system.
Description (string) --
A description of the task.
ImportVolume (dict) --
If the task is for importing a volume, this contains information about the import volume task.
BytesConverted (integer) --
The number of bytes converted so far.
AvailabilityZone (string) --
The Availability Zone where the resulting volume will reside.
Description (string) --
The description you provided when starting the import volume task.
Image (dict) --
The image.
Format (string) --
The disk image format.
Size (integer) --
The size of the disk image, in GiB.
ImportManifestUrl (string) --
A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide.
Checksum (string) --
The checksum computed for the disk image.
Volume (dict) --
The volume.
Size (integer) --
The size of the volume, in GiB.
Id (string) --
The volume identifier.
State (string) --
The state of the conversion task.
StatusMessage (string) --
The status message related to the conversion task.
Tags (list) --
Any tags assigned to the task.
(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 255 Unicode characters.
{'Placement': {'Affinity': 'string', 'HostId': 'string', 'Tenancy': {'host'}}}Response
{'Instances': {'Placement': {'Affinity': 'string', 'HostId': 'string', 'Tenancy': {'host'}}}}
Launches the specified number of instances using an AMI for which you have permissions.
When you launch an instance, it enters the pending state. After the instance is ready for you, it enters the running state. To check the state of your instance, call DescribeInstances.
If you don't specify a security group when launching an instance, Amazon EC2 uses the default security group. For more information, see Security Groups in the Amazon Elastic Compute Cloud User Guide.
[EC2-VPC only accounts] If you don't specify a subnet in the request, we choose a default subnet from your default VPC for you.
[EC2-Classic accounts] If you're launching into EC2-Classic and you don't specify an Availability Zone, we choose one for you.
Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide.
You can provide optional user data when launching an instance. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide.
If any of the AMIs have a product code attached for which the user has not subscribed, RunInstances fails.
T2 instance types can only be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID in the request, RunInstances fails.
For more information about troubleshooting, see What To Do If An Instance Immediately Terminates, and Troubleshooting Connecting to Your Instance in the Amazon Elastic Compute Cloud User Guide.
Request Syntax
client.run_instances( DryRun=True|False, ImageId='string', MinCount=123, MaxCount=123, KeyName='string', SecurityGroups=[ 'string', ], SecurityGroupIds=[ 'string', ], UserData='string', InstanceType='t1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge', Placement={ 'AvailabilityZone': 'string', 'GroupName': 'string', 'Tenancy': 'default'|'dedicated'|'host', 'HostId': 'string', 'Affinity': 'string' }, KernelId='string', RamdiskId='string', BlockDeviceMappings=[ { 'VirtualName': 'string', 'DeviceName': 'string', 'Ebs': { 'SnapshotId': 'string', 'VolumeSize': 123, 'DeleteOnTermination': True|False, 'VolumeType': 'standard'|'io1'|'gp2', 'Iops': 123, 'Encrypted': True|False }, 'NoDevice': 'string' }, ], Monitoring={ 'Enabled': True|False }, SubnetId='string', DisableApiTermination=True|False, InstanceInitiatedShutdownBehavior='stop'|'terminate', PrivateIpAddress='string', ClientToken='string', AdditionalInfo='string', NetworkInterfaces=[ { 'NetworkInterfaceId': 'string', 'DeviceIndex': 123, 'SubnetId': 'string', 'Description': 'string', 'PrivateIpAddress': 'string', 'Groups': [ 'string', ], 'DeleteOnTermination': True|False, 'PrivateIpAddresses': [ { 'PrivateIpAddress': 'string', 'Primary': True|False }, ], 'SecondaryPrivateIpAddressCount': 123, 'AssociatePublicIpAddress': True|False }, ], IamInstanceProfile={ 'Arn': 'string', 'Name': 'string' }, EbsOptimized=True|False )
boolean
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
string
[REQUIRED]
The ID of the AMI, which you can get by calling DescribeImages.
integer
[REQUIRED]
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
integer
[REQUIRED]
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
string
The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.
list
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead.
Default: Amazon EC2 uses the default security group.
(string) --
list
One or more security group IDs. You can create a security group using CreateSecurityGroup.
Default: Amazon EC2 uses the default security group.
(string) --
string
The Base64-encoded MIME user data for the instances.
string
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
dict
The placement for the instance.
AvailabilityZone (string) --
The Availability Zone of the instance.
GroupName (string) --
The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --
The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --
The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.
Affinity (string) --
The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.
string
The ID of the kernel.
string
The ID of the RAM disk.
list
The block device mapping.
(dict) --
Describes a block device mapping.
VirtualName (string) --
The virtual device name ( ephemeral``N). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ``ephemeral0 and ephemeral1.The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
Constraints: For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI.
DeviceName (string) --
The device name exposed to the instance (for example, /dev/sdh or xvdh).
Ebs (dict) --
Parameters used to automatically set up EBS volumes when the instance is launched.
SnapshotId (string) --
The ID of the snapshot.
VolumeSize (integer) --
The size of the volume, in GiB.
Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.
Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.
DeleteOnTermination (boolean) --
Indicates whether the EBS volume is deleted on instance termination.
VolumeType (string) --
The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic volumes.
Default: standard
Iops (integer) --
The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose (SSD) volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose (SSD) baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide.
Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and 3 to 10000 for General Purpose (SSD) volumes.
Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create standard or gp2 volumes.
Encrypted (boolean) --
Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.
NoDevice (string) --
Suppresses the specified device included in the block device mapping of the AMI.
dict
The monitoring for the instance.
Enabled (boolean) -- [REQUIRED]
Indicates whether monitoring is enabled for the instance.
string
[EC2-VPC] The ID of the subnet to launch the instance into.
boolean
If you set this parameter to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. If you set this parameter to true and then later want to be able to terminate the instance, you must first change the value of the disableApiTermination attribute to false using ModifyInstanceAttribute. Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate, you can terminate the instance by running the shutdown command from the instance.
Default: false
string
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
string
[EC2-VPC] The primary IP address. You must specify a value from the IP address range of the subnet.
Only one private IP address can be designated as primary. Therefore, you can't specify this parameter if PrivateIpAddresses.n.Primary is set to true and PrivateIpAddresses.n.PrivateIpAddress is set to an IP address.
Default: We select an IP address from the IP address range of the subnet.
string
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
string
Reserved.
list
One or more network interfaces.
(dict) --
Describes a network interface.
NetworkInterfaceId (string) --
The ID of the network interface.
DeviceIndex (integer) --
The index of the device on the instance for the network interface attachment. If you are specifying a network interface in a RunInstances request, you must provide the device index.
SubnetId (string) --
The ID of the subnet associated with the network string. Applies only if creating a network interface when launching an instance.
Description (string) --
The description of the network interface. Applies only if creating a network interface when launching an instance.
PrivateIpAddress (string) --
The private IP address of the network interface. Applies only if creating a network interface when launching an instance.
Groups (list) --
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
(string) --
DeleteOnTermination (boolean) --
If set to true, the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
PrivateIpAddresses (list) --
One or more private IP addresses to assign to the network interface. Only one private IP address can be designated as primary.
(dict) --
Describes a secondary private IP address for a network interface.
PrivateIpAddress (string) -- [REQUIRED]
The private IP addresses.
Primary (boolean) --
Indicates whether the private IP address is the primary private IP address. Only one IP address can be designated as primary.
SecondaryPrivateIpAddressCount (integer) --
The number of secondary private IP addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option.
AssociatePublicIpAddress (boolean) --
Indicates whether to assign a public IP address to an instance you launch in a VPC. The public IP address can only be assigned to a network interface for eth0, and can only be assigned to a new network interface, not an existing one. You cannot specify more than one network interface in the request. If launching into a default subnet, the default value is true.
dict
The IAM instance profile.
Arn (string) --
The Amazon Resource Name (ARN) of the instance profile.
Name (string) --
The name of the instance profile.
boolean
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
Default: false
dict
Response Syntax
{ 'ReservationId': 'string', 'OwnerId': 'string', 'RequesterId': 'string', 'Groups': [ { 'GroupName': 'string', 'GroupId': 'string' }, ], 'Instances': [ { 'InstanceId': 'string', 'ImageId': 'string', 'State': { 'Code': 123, 'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped' }, 'PrivateDnsName': 'string', 'PublicDnsName': 'string', 'StateTransitionReason': 'string', 'KeyName': 'string', 'AmiLaunchIndex': 123, 'ProductCodes': [ { 'ProductCodeId': 'string', 'ProductCodeType': 'devpay'|'marketplace' }, ], 'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge', 'LaunchTime': datetime(2015, 1, 1), 'Placement': { 'AvailabilityZone': 'string', 'GroupName': 'string', 'Tenancy': 'default'|'dedicated'|'host', 'HostId': 'string', 'Affinity': 'string' }, 'KernelId': 'string', 'RamdiskId': 'string', 'Platform': 'Windows', 'Monitoring': { 'State': 'disabled'|'disabling'|'enabled'|'pending' }, 'SubnetId': 'string', 'VpcId': 'string', 'PrivateIpAddress': 'string', 'PublicIpAddress': 'string', 'StateReason': { 'Code': 'string', 'Message': 'string' }, 'Architecture': 'i386'|'x86_64', 'RootDeviceType': 'ebs'|'instance-store', 'RootDeviceName': 'string', 'BlockDeviceMappings': [ { 'DeviceName': 'string', 'Ebs': { 'VolumeId': 'string', 'Status': 'attaching'|'attached'|'detaching'|'detached', 'AttachTime': datetime(2015, 1, 1), 'DeleteOnTermination': True|False } }, ], 'VirtualizationType': 'hvm'|'paravirtual', 'InstanceLifecycle': 'spot', 'SpotInstanceRequestId': 'string', 'ClientToken': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ], 'SecurityGroups': [ { 'GroupName': 'string', 'GroupId': 'string' }, ], 'SourceDestCheck': True|False, 'Hypervisor': 'ovm'|'xen', 'NetworkInterfaces': [ { 'NetworkInterfaceId': 'string', 'SubnetId': 'string', 'VpcId': 'string', 'Description': 'string', 'OwnerId': 'string', 'Status': 'available'|'attaching'|'in-use'|'detaching', 'MacAddress': 'string', 'PrivateIpAddress': 'string', 'PrivateDnsName': 'string', 'SourceDestCheck': True|False, 'Groups': [ { 'GroupName': 'string', 'GroupId': 'string' }, ], 'Attachment': { 'AttachmentId': 'string', 'DeviceIndex': 123, 'Status': 'attaching'|'attached'|'detaching'|'detached', 'AttachTime': datetime(2015, 1, 1), 'DeleteOnTermination': True|False }, 'Association': { 'PublicIp': 'string', 'PublicDnsName': 'string', 'IpOwnerId': 'string' }, 'PrivateIpAddresses': [ { 'PrivateIpAddress': 'string', 'PrivateDnsName': 'string', 'Primary': True|False, 'Association': { 'PublicIp': 'string', 'PublicDnsName': 'string', 'IpOwnerId': 'string' } }, ] }, ], 'IamInstanceProfile': { 'Arn': 'string', 'Id': 'string' }, 'EbsOptimized': True|False, 'SriovNetSupport': 'string' }, ] }
Response Structure
(dict) --
Zero or more reservations.
ReservationId (string) --
The ID of the reservation.
OwnerId (string) --
The ID of the AWS account that owns the reservation.
RequesterId (string) --
The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).
Groups (list) --
One or more security groups.
(dict) --
Describes a security group.
GroupName (string) --
The name of the security group.
GroupId (string) --
The ID of the security group.
Instances (list) --
One or more instances.
(dict) --
Describes an instance.
InstanceId (string) --
The ID of the instance.
ImageId (string) --
The ID of the AMI used to launch the instance.
State (dict) --
The current state of the instance.
Code (integer) --
The low byte represents the state. The high byte is an opaque internal value and should be ignored.
0 : pending
16 : running
32 : shutting-down
48 : terminated
64 : stopping
80 : stopped
Name (string) --
The current state of the instance.
PrivateDnsName (string) --
The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
PublicDnsName (string) --
The public DNS name assigned to the instance. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.
StateTransitionReason (string) --
The reason for the most recent state transition. This might be an empty string.
KeyName (string) --
The name of the key pair, if this instance was launched with an associated key pair.
AmiLaunchIndex (integer) --
The AMI launch index, which can be used to find this instance in the launch group.
ProductCodes (list) --
The product codes attached to this instance, if applicable.
(dict) --
Describes a product code.
ProductCodeId (string) --
The product code.
ProductCodeType (string) --
The type of product code.
InstanceType (string) --
The instance type.
LaunchTime (datetime) --
The time the instance was launched.
Placement (dict) --
The location where the instance launched, if applicable.
AvailabilityZone (string) --
The Availability Zone of the instance.
GroupName (string) --
The name of the placement group the instance is in (for cluster compute instances).
Tenancy (string) --
The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.
HostId (string) --
The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.
Affinity (string) --
The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.
KernelId (string) --
The kernel associated with this instance, if applicable.
RamdiskId (string) --
The RAM disk associated with this instance, if applicable.
Platform (string) --
The value is Windows for Windows instances; otherwise blank.
Monitoring (dict) --
The monitoring information for the instance.
State (string) --
Indicates whether monitoring is enabled for the instance.
SubnetId (string) --
[EC2-VPC] The ID of the subnet in which the instance is running.
VpcId (string) --
[EC2-VPC] The ID of the VPC in which the instance is running.
PrivateIpAddress (string) --
The private IP address assigned to the instance.
PublicIpAddress (string) --
The public IP address assigned to the instance, if applicable.
StateReason (dict) --
The reason for the most recent state transition.
Code (string) --
The reason code for the state change.
Message (string) --
The message for the state change.
Server.SpotInstanceTermination: A Spot instance was terminated due to an increase in the market price.
Server.InternalError: An internal error occurred during instance launch, resulting in termination.
Server.InsufficientInstanceCapacity: There was insufficient instance capacity to satisfy the launch request.
Client.InternalError: A client error caused the instance to terminate on launch.
Client.InstanceInitiatedShutdown: The instance was shut down using the shutdown -h command from the instance.
Client.UserInitiatedShutdown: The instance was shut down using the Amazon EC2 API.
Client.VolumeLimitExceeded: The volume limit was exceeded.
Client.InvalidSnapshot.NotFound: The specified snapshot was not found.
Architecture (string) --
The architecture of the image.
RootDeviceType (string) --
The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.
RootDeviceName (string) --
The root device name (for example, /dev/sda1 or /dev/xvda).
BlockDeviceMappings (list) --
Any block device mapping entries for the instance.
(dict) --
Describes a block device mapping.
DeviceName (string) --
The device name exposed to the instance (for example, /dev/sdh or xvdh).
Ebs (dict) --
Parameters used to automatically set up EBS volumes when the instance is launched.
VolumeId (string) --
The ID of the EBS volume.
Status (string) --
The attachment state.
AttachTime (datetime) --
The time stamp when the attachment initiated.
DeleteOnTermination (boolean) --
Indicates whether the volume is deleted on instance termination.
VirtualizationType (string) --
The virtualization type of the instance.
InstanceLifecycle (string) --
Indicates whether this is a Spot instance.
SpotInstanceRequestId (string) --
If the request is a Spot instance request, the ID of the request.
ClientToken (string) --
The idempotency token you provided when you launched the instance, if applicable.
Tags (list) --
Any tags assigned to the instance.
(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 255 Unicode characters.
SecurityGroups (list) --
One or more security groups for the instance.
(dict) --
Describes a security group.
GroupName (string) --
The name of the security group.
GroupId (string) --
The ID of the security group.
SourceDestCheck (boolean) --
Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide.
Hypervisor (string) --
The hypervisor type of the instance.
NetworkInterfaces (list) --
[EC2-VPC] One or more network interfaces for the instance.
(dict) --
Describes a network interface.
NetworkInterfaceId (string) --
The ID of the network interface.
SubnetId (string) --
The ID of the subnet.
VpcId (string) --
The ID of the VPC.
Description (string) --
The description.
OwnerId (string) --
The ID of the AWS account that created the network interface.
Status (string) --
The status of the network interface.
MacAddress (string) --
The MAC address.
PrivateIpAddress (string) --
The IP address of the network interface within the subnet.
PrivateDnsName (string) --
The private DNS name.
SourceDestCheck (boolean) --
Indicates whether to validate network traffic to or from this network interface.
Groups (list) --
One or more security groups.
(dict) --
Describes a security group.
GroupName (string) --
The name of the security group.
GroupId (string) --
The ID of the security group.
Attachment (dict) --
The network interface attachment.
AttachmentId (string) --
The ID of the network interface attachment.
DeviceIndex (integer) --
The index of the device on the instance for the network interface attachment.
Status (string) --
The attachment state.
AttachTime (datetime) --
The time stamp when the attachment initiated.
DeleteOnTermination (boolean) --
Indicates whether the network interface is deleted when the instance is terminated.
Association (dict) --
The association information for an Elastic IP associated with the network interface.
PublicIp (string) --
The public IP address or Elastic IP address bound to the network interface.
PublicDnsName (string) --
The public DNS name.
IpOwnerId (string) --
The ID of the owner of the Elastic IP address.
PrivateIpAddresses (list) --
The private IP addresses associated with the network interface.
(dict) --
Describes a private IP address.
PrivateIpAddress (string) --
The private IP address of the network interface.
PrivateDnsName (string) --
The private DNS name.
Primary (boolean) --
Indicates whether this IP address is the primary private IP address of the network interface.
Association (dict) --
The association information for an Elastic IP address for the network interface.
PublicIp (string) --
The public IP address or Elastic IP address bound to the network interface.
PublicDnsName (string) --
The public DNS name.
IpOwnerId (string) --
The ID of the owner of the Elastic IP address.
IamInstanceProfile (dict) --
The IAM instance profile associated with the instance, if applicable.
Arn (string) --
The Amazon Resource Name (ARN) of the instance profile.
Id (string) --
The ID of the instance profile.
EbsOptimized (boolean) --
Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
SriovNetSupport (string) --
Specifies whether enhanced networking is enabled.