Amazon Elastic Compute Cloud

2015/04/02 - Amazon Elastic Compute Cloud - 10 updated api methods

DescribeInstances (updated) Link ¶
Changes (response)
{'Reservations': {'Instances': {'InstanceType': {'d2.2xlarge',
                                                 'd2.4xlarge',
                                                 'd2.8xlarge',
                                                 'd2.xlarge'}}}}

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
)
type DryRun

boolean

param DryRun

type InstanceIds

list

param InstanceIds

One or more instance IDs.

Default: Describes all your instances.

  • (string) --

type Filters

list

param Filters

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 Amazon 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 Amazon EBS volume is deleted on instance termination.

  • block-device-mapping.device-name - The device name for the Amazon EBS volume (for example, /dev/sdh or xvdh ).

  • block-device-mapping.status - The status for the Amazon EBS volume ( attaching | attached | detaching | detached ).

  • block-device-mapping.volume-id - The volume ID of the Amazon 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) --

type NextToken

string

param NextToken

The token to request the next page of results.

type MaxResults

integer

param MaxResults

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.

rtype

dict

returns

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'|'t2.micro'|'t2.small'|'t2.medium'|'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'
                    },
                    'KernelId': 'string',
                    'RamdiskId': 'string',
                    'Platform': 'Windows',
                    'Monitoring': {
                        'State': 'disabled'|'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) --

      One 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.

            • PublicDnsName (string) --

              The public DNS name assigned to the instance. This name is not available until the instance enters the running state.

            • 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.

              • (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.

              • 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.

            • KernelId (string) --

              The kernel associated with this instance.

            • RamdiskId (string) --

              The RAM disk associated with this instance.

            • 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) --

              The ID of the subnet in which the instance is running.

            • VpcId (string) --

              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.

            • 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 Amazon 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 Amazon EBS volumes when the instance is launched.

                  • VolumeId (string) --

                    The ID of the Amazon 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) --

              The ID of the Spot Instance request.

            • ClientToken (string) --

              The idempotency token you provided when you launched the instance.

            • 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.

              • 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.

DescribeReservedInstances (updated) Link ¶
Changes (response)
{'ReservedInstances': {'InstanceType': {'d2.2xlarge',
                                        'd2.4xlarge',
                                        'd2.8xlarge',
                                        'd2.xlarge'}}}

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 for Linux .

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'
)
type DryRun

boolean

param DryRun

type ReservedInstancesIds

list

param ReservedInstancesIds

One or more Reserved Instance IDs.

Default: Describes all your Reserved Instances, or only those otherwise specified.

  • (string) --

type Filters

list

param Filters

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, 2014-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 product description of the Reserved Instance ( Linux/UNIX | Linux/UNIX (Amazon VPC) | Windows | Windows (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 ( pending-payment | 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) --

type OfferingType

string

param OfferingType

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.

rtype

dict

returns

Response Syntax

{
    'ReservedInstances': [
        {
            'ReservedInstancesId': 'string',
            'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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',
            '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 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.

DescribeReservedInstancesModifications (updated) Link ¶
Changes (response)
{'ReservedInstancesModifications': {'ModificationResults': {'TargetConfiguration': {'InstanceType': {'d2.2xlarge',
                                                                                                     'd2.4xlarge',
                                                                                                     'd2.8xlarge',
                                                                                                     'd2.xlarge'}}}}}

Describes the modifications made to your Reserved Instances. If no parameter is specified, information about all your Reserved Instances modification requests is returned. If a modification ID is specified, only information about the specific modification is returned.

For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide for Linux.

Request Syntax

client.describe_reserved_instances_modifications(
    ReservedInstancesModificationIds=[
        'string',
    ],
    NextToken='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
type ReservedInstancesModificationIds

list

param ReservedInstancesModificationIds

IDs for the submitted modification request.

  • (string) --

type NextToken

string

param NextToken

The token to retrieve the next page of results.

type Filters

list

param Filters

One or more filters.

  • client-token - The idempotency token for the modification request.

  • create-date - The time when the modification request was created.

  • effective-date - The time when the modification becomes effective.

  • modification-result.reserved-instances-id - The ID for the Reserved Instances created as part of the modification request. This ID is only available when the status of the modification is fulfilled .

  • modification-result.target-configuration.availability-zone - The Availability Zone for the new Reserved Instances.

  • modification-result.target-configuration.instance-count - The number of new Reserved Instances.

  • modification-result.target-configuration.instance-type - The instance type of the new Reserved Instances.

  • modification-result.target-configuration.platform - The network platform of the new Reserved Instances ( EC2-Classic | EC2-VPC ).

  • reserved-instances-id - The ID of the Reserved Instances modified.

  • reserved-instances-modification-id - The ID of the modification request.

  • status - The status of the Reserved Instances modification request ( processing | fulfilled | failed ).

  • status-message - The reason for the status.

  • update-date - The time when the modification request was last updated.

  • (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) --

rtype

dict

returns

Response Syntax

{
    'ReservedInstancesModifications': [
        {
            'ReservedInstancesModificationId': 'string',
            'ReservedInstancesIds': [
                {
                    'ReservedInstancesId': 'string'
                },
            ],
            'ModificationResults': [
                {
                    'ReservedInstancesId': 'string',
                    'TargetConfiguration': {
                        'AvailabilityZone': 'string',
                        'Platform': 'string',
                        'InstanceCount': 123,
                        'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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'
                    }
                },
            ],
            'CreateDate': datetime(2015, 1, 1),
            'UpdateDate': datetime(2015, 1, 1),
            'EffectiveDate': datetime(2015, 1, 1),
            'Status': 'string',
            'StatusMessage': 'string',
            'ClientToken': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ReservedInstancesModifications (list) --

      The Reserved Instance modification information.

      • (dict) --

        Describes a Reserved Instance modification.

        • ReservedInstancesModificationId (string) --

          A unique ID for the Reserved Instance modification.

        • ReservedInstancesIds (list) --

          The IDs of one or more Reserved Instances.

          • (dict) --

            Describes the ID of a Reserved Instance.

            • ReservedInstancesId (string) --

              The ID of the Reserved Instance.

        • ModificationResults (list) --

          Contains target configurations along with their corresponding new Reserved Instance IDs.

          • (dict) --

            • ReservedInstancesId (string) --

              The ID for the Reserved Instances that were created as part of the modification request. This field is only available when the modification is fulfilled.

            • TargetConfiguration (dict) --

              The target Reserved Instances configurations supplied as part of the modification request.

              • AvailabilityZone (string) --

                The Availability Zone for the modified Reserved Instances.

              • Platform (string) --

                The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

              • InstanceCount (integer) --

                The number of modified Reserved Instances.

              • InstanceType (string) --

                The instance type for the modified Reserved Instances.

        • CreateDate (datetime) --

          The time when the modification request was created.

        • UpdateDate (datetime) --

          The time when the modification request was last updated.

        • EffectiveDate (datetime) --

          The time for the modification to become effective.

        • Status (string) --

          The status of the Reserved Instances modification request.

        • StatusMessage (string) --

          The reason for the status.

        • ClientToken (string) --

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency.

    • 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.

DescribeReservedInstancesOfferings (updated) Link ¶
Changes (request, response)
Request
{'InstanceType': {'d2.8xlarge', 'd2.xlarge', 'd2.4xlarge', 'd2.2xlarge'}}
Response
{'ReservedInstancesOfferings': {'InstanceType': {'d2.2xlarge',
                                                 'd2.4xlarge',
                                                 'd2.8xlarge',
                                                 'd2.xlarge'}}}

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 for Linux .

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'|'t2.micro'|'t2.small'|'t2.medium'|'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',
    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
)
type DryRun

boolean

param DryRun

type ReservedInstancesOfferingIds

list

param ReservedInstancesOfferingIds

One or more Reserved Instances offering IDs.

  • (string) --

type InstanceType

string

param InstanceType

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 for Linux .

type AvailabilityZone

string

param AvailabilityZone

The Availability Zone in which the Reserved Instance can be used.

type ProductDescription

string

param ProductDescription

The Reserved Instance description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.

type Filters

list

param Filters

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 description of the Reserved Instance ( Linux/UNIX | Linux/UNIX (Amazon VPC) | Windows | Windows (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) --

type InstanceTenancy

string

param InstanceTenancy

The tenancy of the Reserved Instance offering. A Reserved Instance with dedicated tenancy runs on single-tenant hardware and can only be launched within a VPC.

Default: default

type OfferingType

string

param OfferingType

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.

type NextToken

string

param NextToken

The token to retrieve the next page of results.

type MaxResults

integer

param MaxResults

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

type IncludeMarketplace

boolean

param IncludeMarketplace

Include Marketplace offerings in the response.

type MinDuration

integer

param MinDuration

The minimum duration (in seconds) to filter when searching for offerings.

Default: 2592000 (1 month)

type MaxDuration

integer

param MaxDuration

The maximum duration (in seconds) to filter when searching for offerings.

Default: 94608000 (3 years)

type MaxInstanceCount

integer

param MaxInstanceCount

The maximum number of instances to filter when searching for offerings.

Default: 20

rtype

dict

returns

Response Syntax

{
    'ReservedInstancesOfferings': [
        {
            'ReservedInstancesOfferingId': 'string',
            'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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',
            '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 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.

DescribeSpotInstanceRequests (updated) Link ¶
Changes (response)
{'SpotInstanceRequests': {'LaunchSpecification': {'InstanceType': {'d2.2xlarge',
                                                                   'd2.4xlarge',
                                                                   'd2.8xlarge',
                                                                   'd2.xlarge'}}}}

Describes the Spot Instance requests that belong to your account. Spot Instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current Spot Instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide for Linux .

You can use DescribeSpotInstanceRequests to find a running Spot Instance by examining the response. If the status of the Spot Instance is fulfilled , the instance ID appears in the response and contains the identifier of the instance. Alternatively, you can use DescribeInstances with a filter to look for instances where the instance lifecycle is spot .

Request Syntax

client.describe_spot_instance_requests(
    DryRun=True|False,
    SpotInstanceRequestIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
type DryRun

boolean

param DryRun

type SpotInstanceRequestIds

list

param SpotInstanceRequestIds

One or more Spot Instance request IDs.

  • (string) --

type Filters

list

param Filters

One or more filters.

  • availability-zone-group - The Availability Zone group.

  • create-time - The time stamp when the Spot Instance request was created.

  • fault-code - The fault code related to the request.

  • fault-message - The fault message related to the request.

  • instance-id - The ID of the instance that fulfilled the request.

  • launch-group - The Spot Instance launch group.

  • launch.block-device-mapping.delete-on-termination - Indicates whether the Amazon EBS volume is deleted on instance termination.

  • launch.block-device-mapping.device-name - The device name for the Amazon EBS volume (for example, /dev/sdh ).

  • launch.block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.

  • launch.block-device-mapping.volume-size - The size of the Amazon EBS volume, in GiB.

  • launch.block-device-mapping.volume-type - The type of the Amazon EBS volume ( gp2 | standard | io1 ).

  • launch.group-id - The security group for the instance.

  • launch.image-id - The ID of the AMI.

  • launch.instance-type - The type of instance (for example, m1.small ).

  • launch.kernel-id - The kernel ID.

  • launch.key-name - The name of the key pair the instance launched with.

  • launch.monitoring-enabled - Whether monitoring is enabled for the Spot Instance.

  • launch.ramdisk-id - The RAM disk ID.

  • network-interface.network-interface-id - The ID of the network interface.

  • network-interface.device-index - The index of the device for the network interface attachment on the instance.

  • network-interface.subnet-id - The ID of the subnet for the instance.

  • network-interface.description - A description of the network interface.

  • network-interface.private-ip-address - The primary private IP address of the network interface.

  • network-interface.delete-on-termination - Indicates whether the network interface is deleted when the instance is terminated.

  • network-interface.group-id - The ID of the security group associated with the network interface.

  • network-interface.group-name - The name of the security group associated with the network interface.

  • network-interface.addresses.primary - Indicates whether the IP address is the primary private IP address.

  • product-description - The product description associated with the instance ( Linux/UNIX | Windows ).

  • spot-instance-request-id - The Spot Instance request ID.

  • spot-price - The maximum hourly price for any Spot Instance launched to fulfill the request.

  • state - The state of the Spot Instance request ( open | active | closed | cancelled | failed ). Spot bid status information can help you track your Amazon EC2 Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux.

  • status-code - The short code describing the most recent evaluation of your Spot Instance request.

  • status-message - The message explaining the status of the Spot Instance request.

  • 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.

  • type - The type of Spot Instance request ( one-time | persistent ).

  • launched-availability-zone - The Availability Zone in which the bid is launched.

  • valid-from - The start date of the request.

  • valid-until - The end date of the request.

  • (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) --

rtype

dict

returns

Response Syntax

{
    'SpotInstanceRequests': [
        {
            'SpotInstanceRequestId': 'string',
            'SpotPrice': 'string',
            'Type': 'one-time'|'persistent',
            'State': 'open'|'active'|'closed'|'cancelled'|'failed',
            'Fault': {
                'Code': 'string',
                'Message': 'string'
            },
            'Status': {
                'Code': 'string',
                'UpdateTime': datetime(2015, 1, 1),
                'Message': 'string'
            },
            'ValidFrom': datetime(2015, 1, 1),
            'ValidUntil': datetime(2015, 1, 1),
            'LaunchGroup': 'string',
            'AvailabilityZoneGroup': 'string',
            'LaunchSpecification': {
                'ImageId': 'string',
                'KeyName': 'string',
                'SecurityGroups': [
                    {
                        'GroupName': 'string',
                        'GroupId': 'string'
                    },
                ],
                'UserData': 'string',
                'AddressingType': 'string',
                'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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'
                },
                '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'
                    },
                ],
                'SubnetId': '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,
                'Monitoring': {
                    'Enabled': True|False
                }
            },
            'InstanceId': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'LaunchedAvailabilityZone': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • SpotInstanceRequests (list) --

      One or more Spot Instance requests.

      • (dict) --

        Describe a Spot Instance request.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • SpotPrice (string) --

          The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.

        • Type (string) --

          The Spot Instance request type.

        • State (string) --

          The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux .

        • Fault (dict) --

          The fault codes for the Spot Instance request, if any.

          • Code (string) --

            The reason code for the Spot Instance state change.

          • Message (string) --

            The message for the Spot Instance state change.

        • Status (dict) --

          The status code and status message describing the Spot Instance request.

          • Code (string) --

            The status code.

          • UpdateTime (datetime) --

            The time of the most recent status update.

          • Message (string) --

            The description for the status code.

        • ValidFrom (datetime) --

          The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

        • ValidUntil (datetime) --

          The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

        • LaunchGroup (string) --

          The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

        • AvailabilityZoneGroup (string) --

          The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

        • LaunchSpecification (dict) --

          Additional information for launching instances.

          • ImageId (string) --

            The ID of the AMI.

          • KeyName (string) --

            The name of the key pair.

          • SecurityGroups (list) --

            One or more security groups. To request an instance in a nondefault VPC, you must specify the ID of the security group. To request an instance in EC2-Classic or a default VPC, you can specify the name or the ID of the security group.

            • (dict) --

              Describes a security group.

              • GroupName (string) --

                The name of the security group.

              • GroupId (string) --

                The ID of the security group.

          • UserData (string) --

            The Base64-encoded MIME user data to make available to the instances.

          • AddressingType (string) --

            Deprecated.

          • InstanceType (string) --

            The instance type.

          • Placement (dict) --

            The placement information for the instance.

            • AvailabilityZone (string) --

              The Availability Zone.

            • GroupName (string) --

              The name of the placement group (for cluster instances).

          • KernelId (string) --

            The ID of the kernel.

          • RamdiskId (string) --

            The ID of the RAM disk.

          • BlockDeviceMappings (list) --

            One or more block device mapping entries.

            • (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 Amazon 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 Amazon 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 for Linux .

                  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 Amazon 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.

          • SubnetId (string) --

            The ID of the subnet in which to launch the instance.

          • NetworkInterfaces (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) --

                    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 .

          • IamInstanceProfile (dict) --

            The IAM instance profile.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the instance profile.

            • Name (string) --

              The name 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 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

          • Monitoring (dict) --

            Describes the monitoring for the instance.

            • Enabled (boolean) --

              Indicates whether monitoring is enabled for the instance.

        • InstanceId (string) --

          The instance ID, if an instance has been launched to fulfill the Spot Instance request.

        • CreateTime (datetime) --

          The time stamp when the Spot Instance request was created.

        • ProductDescription (string) --

          The product description associated with the Spot Instance.

        • 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.

        • LaunchedAvailabilityZone (string) --

          The Availability Zone in which the bid is launched.

DescribeSpotPriceHistory (updated) Link ¶
Changes (request, response)
Request
{'InstanceTypes': {'d2.8xlarge', 'd2.xlarge', 'd2.4xlarge', 'd2.2xlarge'}}
Response
{'SpotPriceHistory': {'InstanceType': {'d2.2xlarge',
                                       'd2.4xlarge',
                                       'd2.8xlarge',
                                       'd2.xlarge'}}}

Describes the Spot Price history. The prices returned are listed in chronological order, from the oldest to the most recent, for up to the past 90 days. For more information, see Spot Instance Pricing History in the Amazon Elastic Compute Cloud User Guide for Linux .

When you specify a start and end time, this operation returns the prices of the instance types within the time range that you specified and the time when the price changed. The price is valid within the time period that you specified; the response merely indicates the last time that the price changed.

Request Syntax

client.describe_spot_price_history(
    DryRun=True|False,
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    InstanceTypes=[
        't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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',
    ],
    ProductDescriptions=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    AvailabilityZone='string',
    MaxResults=123,
    NextToken='string'
)
type DryRun

boolean

param DryRun

type StartTime

datetime

param StartTime

The date and time, up to the past 90 days, from which to start retrieving the price history data.

type EndTime

datetime

param EndTime

The date and time, up to the current date, from which to stop retrieving the price history data.

type InstanceTypes

list

param InstanceTypes

Filters the results by the specified instance types.

  • (string) --

type ProductDescriptions

list

param ProductDescriptions

Filters the results by the specified basic product descriptions.

  • (string) --

type Filters

list

param Filters

One or more filters.

  • availability-zone - The Availability Zone for which prices should be returned.

  • instance-type - The type of instance (for example, m1.small ).

  • product-description - The product description for the Spot Price ( Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC) ).

  • spot-price - The Spot Price. The value must match exactly (or use wildcards; greater than or less than comparison is not supported).

  • timestamp - The timestamp of the Spot Price history (for example, 2010-08-16T05:06:11.000Z). You can use wildcards (* and ?). Greater than or less than comparison is not supported.

  • (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) --

type AvailabilityZone

string

param AvailabilityZone

Filters the results by the specified Availability Zone.

type MaxResults

integer

param MaxResults

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.

type NextToken

string

param NextToken

The token to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'SpotPriceHistory': [
        {
            'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'SpotPrice': 'string',
            'Timestamp': datetime(2015, 1, 1),
            'AvailabilityZone': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SpotPriceHistory (list) --

      The historical Spot Prices.

      • (dict) --

        Describes the maximum hourly price (bid) for any Spot Instance launched to fulfill the request.

        • InstanceType (string) --

          The instance type.

        • ProductDescription (string) --

          A general description of the AMI.

        • SpotPrice (string) --

          The maximum price (bid) that you are willing to pay for a Spot Instance.

        • Timestamp (datetime) --

          The date and time the request was created.

        • AvailabilityZone (string) --

          The Availability Zone.

    • 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.

ImportInstance (updated) Link ¶
Changes (request)
{'LaunchSpecification': {'InstanceType': {'d2.2xlarge',
                                          'd2.4xlarge',
                                          'd2.8xlarge',
                                          'd2.xlarge'}}}

Creates an import instance task using metadata from the specified disk image. 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 for Linux .

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'|'t2.micro'|'t2.small'|'t2.medium'|'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'
        },
        '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'
)
type DryRun

boolean

param DryRun

type Description

string

param Description

A description for the instance being imported.

type LaunchSpecification

dict

param LaunchSpecification
  • 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) --

  • UserData (dict) --

    User data to be made available to the instance.

    • Data (string) --

  • InstanceType (string) --

    The instance type. This is not supported for VMs imported into a VPC, which are assigned the default security group. After a VM is imported into a VPC, you can specify another security group using the AWS Management Console. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide for Linux . For more information about the Linux instance types you can import, see Before You Get Started in the Amazon Elastic Compute Cloud User Guide for Linux.

  • Placement (dict) --

    Describes 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.

  • Monitoring (boolean) --

  • SubnetId (string) --

    [EC2-VPC] The ID of the subnet to launch the instance into.

  • 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] Optionally, you can use this parameter to assign the instance a specific available IP address from the IP address range of the subnet.

type DiskImages

list

param DiskImages
  • (dict) --

    Describes a disk image.

    • Image (dict) --

      • Format (string) -- [REQUIRED]

        The disk image format.

      • Bytes (integer) -- [REQUIRED]

      • 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) --

    • Volume (dict) --

      Describes an Amazon EBS volume.

      • Size (integer) -- [REQUIRED]

        The size of the volume, in GiB.

type Platform

string

param Platform

[REQUIRED]

The instance operating system.

rtype

dict

returns

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) --

      Describes a 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) --

          • (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.

              • 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.

              • 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) --

        • InstanceId (string) --

        • Platform (string) --

          The instance operating system.

        • Description (string) --

      • 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.

          • 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.

          • 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) --

        • (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.

ModifyReservedInstances (updated) Link ¶
Changes (request)
{'TargetConfigurations': {'InstanceType': {'d2.2xlarge',
                                           'd2.4xlarge',
                                           'd2.8xlarge',
                                           'd2.xlarge'}}}

Modifies the Availability Zone, instance count, instance type, or network platform (EC2-Classic or EC2-VPC) of your Reserved Instances. The Reserved Instances to be modified must be identical, except for Availability Zone, network platform, and instance type.

For more information, see Modifying Reserved Instances in the Amazon Elastic Compute Cloud User Guide for Linux.

Request Syntax

client.modify_reserved_instances(
    ClientToken='string',
    ReservedInstancesIds=[
        'string',
    ],
    TargetConfigurations=[
        {
            'AvailabilityZone': 'string',
            'Platform': 'string',
            'InstanceCount': 123,
            'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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'
        },
    ]
)
type ClientToken

string

param ClientToken

A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency.

type ReservedInstancesIds

list

param ReservedInstancesIds

[REQUIRED]

The IDs of the Reserved Instances to modify.

  • (string) --

type TargetConfigurations

list

param TargetConfigurations

[REQUIRED]

The configuration settings for the Reserved Instances to modify.

  • (dict) --

    Describes the configuration settings for the modified Reserved Instances.

    • AvailabilityZone (string) --

      The Availability Zone for the modified Reserved Instances.

    • Platform (string) --

      The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

    • InstanceCount (integer) --

      The number of modified Reserved Instances.

    • InstanceType (string) --

      The instance type for the modified Reserved Instances.

rtype

dict

returns

Response Syntax

{
    'ReservedInstancesModificationId': 'string'
}

Response Structure

  • (dict) --

    • ReservedInstancesModificationId (string) --

      The ID for the modification.

RequestSpotInstances (updated) Link ¶
Changes (request, response)
Request
{'LaunchSpecification': {'InstanceType': {'d2.2xlarge',
                                          'd2.4xlarge',
                                          'd2.8xlarge',
                                          'd2.xlarge'}}}
Response
{'SpotInstanceRequests': {'LaunchSpecification': {'InstanceType': {'d2.2xlarge',
                                                                   'd2.4xlarge',
                                                                   'd2.8xlarge',
                                                                   'd2.xlarge'}}}}

Creates a Spot Instance request. Spot Instances are instances that Amazon EC2 launches when the bid price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current Spot Instance requests. For more information, see Spot Instance Requests in the Amazon Elastic Compute Cloud User Guide for Linux .

Request Syntax

client.request_spot_instances(
    DryRun=True|False,
    SpotPrice='string',
    InstanceCount=123,
    Type='one-time'|'persistent',
    ValidFrom=datetime(2015, 1, 1),
    ValidUntil=datetime(2015, 1, 1),
    LaunchGroup='string',
    AvailabilityZoneGroup='string',
    LaunchSpecification={
        'ImageId': 'string',
        'KeyName': 'string',
        'SecurityGroups': [
            'string',
        ],
        'UserData': 'string',
        'AddressingType': 'string',
        'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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'
        },
        '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'
            },
        ],
        'SubnetId': '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,
        'Monitoring': {
            'Enabled': True|False
        },
        'SecurityGroupIds': [
            'string',
        ]
    }
)
type DryRun

boolean

param DryRun

type SpotPrice

string

param SpotPrice

[REQUIRED]

The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.

type InstanceCount

integer

param InstanceCount

The maximum number of Spot Instances to launch.

Default: 1

type Type

string

param Type

The Spot Instance request type.

Default: one-time

type ValidFrom

datetime

param ValidFrom

The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

Default: The request is effective indefinitely.

type ValidUntil

datetime

param ValidUntil

The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached.

Default: The request is effective indefinitely.

type LaunchGroup

string

param LaunchGroup

The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

Default: Instances are launched and terminated individually

type AvailabilityZoneGroup

string

param AvailabilityZoneGroup

The user-specified name for a logical grouping of bids.

When you specify an Availability Zone group in a Spot Instance request, all Spot Instances in the request are launched in the same Availability Zone. Instance proximity is maintained with this parameter, but the choice of Availability Zone is not. The group applies only to bids for Spot Instances of the same instance type. Any additional Spot Instance requests that are specified with the same Availability Zone group name are launched in that same Availability Zone, as long as at least one instance from the group is still active.

If there is no active instance running in the Availability Zone group that you specify for a new Spot Instance request (all instances are terminated, the bid is expired, or the bid falls below current market), then Amazon EC2 launches the instance in any Availability Zone where the constraint can be met. Consequently, the subsequent set of Spot Instances could be placed in a different zone from the original request, even if you specified the same Availability Zone group.

Default: Instances are launched in any available Availability Zone.

type LaunchSpecification

dict

param LaunchSpecification

Describes the launch specification for an instance.

  • ImageId (string) --

    The ID of the AMI.

  • KeyName (string) --

    The name of the key pair.

  • SecurityGroups (list) --

    • (string) --

  • UserData (string) --

    The Base64-encoded MIME user data to make available to the instances.

  • AddressingType (string) --

    Deprecated.

  • InstanceType (string) --

    The instance type.

  • Placement (dict) --

    The placement information for the instance.

    • AvailabilityZone (string) --

      The Availability Zone.

    • GroupName (string) --

      The name of the placement group (for cluster instances).

  • KernelId (string) --

    The ID of the kernel.

  • RamdiskId (string) --

    The ID of the RAM disk.

  • BlockDeviceMappings (list) --

    One or more block device mapping entries.

    • (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 Amazon 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 Amazon 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 for Linux .

          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 Amazon 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.

  • SubnetId (string) --

    The ID of the subnet in which to launch the instance.

  • NetworkInterfaces (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 .

  • IamInstanceProfile (dict) --

    The IAM instance profile.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the instance profile.

    • Name (string) --

      The name 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 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

  • Monitoring (dict) --

    Describes the monitoring for the instance.

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether monitoring is enabled for the instance.

  • SecurityGroupIds (list) --

    • (string) --

rtype

dict

returns

Response Syntax

{
    'SpotInstanceRequests': [
        {
            'SpotInstanceRequestId': 'string',
            'SpotPrice': 'string',
            'Type': 'one-time'|'persistent',
            'State': 'open'|'active'|'closed'|'cancelled'|'failed',
            'Fault': {
                'Code': 'string',
                'Message': 'string'
            },
            'Status': {
                'Code': 'string',
                'UpdateTime': datetime(2015, 1, 1),
                'Message': 'string'
            },
            'ValidFrom': datetime(2015, 1, 1),
            'ValidUntil': datetime(2015, 1, 1),
            'LaunchGroup': 'string',
            'AvailabilityZoneGroup': 'string',
            'LaunchSpecification': {
                'ImageId': 'string',
                'KeyName': 'string',
                'SecurityGroups': [
                    {
                        'GroupName': 'string',
                        'GroupId': 'string'
                    },
                ],
                'UserData': 'string',
                'AddressingType': 'string',
                'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'t2.micro'|'t2.small'|'t2.medium'|'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'
                },
                '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'
                    },
                ],
                'SubnetId': '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,
                'Monitoring': {
                    'Enabled': True|False
                }
            },
            'InstanceId': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'LaunchedAvailabilityZone': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • SpotInstanceRequests (list) --

      One or more Spot Instance requests.

      • (dict) --

        Describe a Spot Instance request.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • SpotPrice (string) --

          The maximum hourly price (bid) for any Spot Instance launched to fulfill the request.

        • Type (string) --

          The Spot Instance request type.

        • State (string) --

          The state of the Spot Instance request. Spot bid status information can help you track your Spot Instance requests. For more information, see Spot Bid Status in the Amazon Elastic Compute Cloud User Guide for Linux .

        • Fault (dict) --

          The fault codes for the Spot Instance request, if any.

          • Code (string) --

            The reason code for the Spot Instance state change.

          • Message (string) --

            The message for the Spot Instance state change.

        • Status (dict) --

          The status code and status message describing the Spot Instance request.

          • Code (string) --

            The status code.

          • UpdateTime (datetime) --

            The time of the most recent status update.

          • Message (string) --

            The description for the status code.

        • ValidFrom (datetime) --

          The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

        • ValidUntil (datetime) --

          The end date of the request. If this is a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date is reached.

        • LaunchGroup (string) --

          The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

        • AvailabilityZoneGroup (string) --

          The Availability Zone group. If you specify the same Availability Zone group for all Spot Instance requests, all Spot Instances are launched in the same Availability Zone.

        • LaunchSpecification (dict) --

          Additional information for launching instances.

          • ImageId (string) --

            The ID of the AMI.

          • KeyName (string) --

            The name of the key pair.

          • SecurityGroups (list) --

            One or more security groups. To request an instance in a nondefault VPC, you must specify the ID of the security group. To request an instance in EC2-Classic or a default VPC, you can specify the name or the ID of the security group.

            • (dict) --

              Describes a security group.

              • GroupName (string) --

                The name of the security group.

              • GroupId (string) --

                The ID of the security group.

          • UserData (string) --

            The Base64-encoded MIME user data to make available to the instances.

          • AddressingType (string) --

            Deprecated.

          • InstanceType (string) --

            The instance type.

          • Placement (dict) --

            The placement information for the instance.

            • AvailabilityZone (string) --

              The Availability Zone.

            • GroupName (string) --

              The name of the placement group (for cluster instances).

          • KernelId (string) --

            The ID of the kernel.

          • RamdiskId (string) --

            The ID of the RAM disk.

          • BlockDeviceMappings (list) --

            One or more block device mapping entries.

            • (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 Amazon 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 Amazon 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 for Linux .

                  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 Amazon 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.

          • SubnetId (string) --

            The ID of the subnet in which to launch the instance.

          • NetworkInterfaces (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) --

                    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 .

          • IamInstanceProfile (dict) --

            The IAM instance profile.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the instance profile.

            • Name (string) --

              The name 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 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

          • Monitoring (dict) --

            Describes the monitoring for the instance.

            • Enabled (boolean) --

              Indicates whether monitoring is enabled for the instance.

        • InstanceId (string) --

          The instance ID, if an instance has been launched to fulfill the Spot Instance request.

        • CreateTime (datetime) --

          The time stamp when the Spot Instance request was created.

        • ProductDescription (string) --

          The product description associated with the Spot Instance.

        • 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.

        • LaunchedAvailabilityZone (string) --

          The Availability Zone in which the bid is launched.

RunInstances (updated) Link ¶
Changes (request, response)
Request
{'InstanceType': {'d2.8xlarge', 'd2.xlarge', 'd2.4xlarge', 'd2.2xlarge'}}
Response
{'Instances': {'InstanceType': {'d2.2xlarge',
                                'd2.4xlarge',
                                'd2.8xlarge',
                                'd2.xlarge'}}}

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 for Linux .

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 for Linux .

You can provide optional user data when launching an instance. For more information, see Instance Metadata in the Amazon Elastic Compute Cloud User Guide for Linux .

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 for Linux .

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'|'t2.micro'|'t2.small'|'t2.medium'|'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'
    },
    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
)
type DryRun

boolean

param DryRun

type ImageId

string

param ImageId

[REQUIRED]

The ID of the AMI, which you can get by calling DescribeImages.

type MinCount

integer

param MinCount

[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.

type MaxCount

integer

param MaxCount

[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.

type KeyName

string

param KeyName

The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

Warning

If you launch an instance without specifying a key pair, you can't connect to the instance.

type SecurityGroups

list

param SecurityGroups

[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) --

type SecurityGroupIds

list

param SecurityGroupIds

One or more security group IDs. You can create a security group using CreateSecurityGroup.

Default: Amazon EC2 uses the default security group.

  • (string) --

type UserData

string

param UserData

The Base64-encoded MIME user data for the instances.

type InstanceType

string

param InstanceType

The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide for Linux .

Default: m1.small

type Placement

dict

param Placement

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.

type KernelId

string

param KernelId

The ID of the kernel.

Warning

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide for Linux .

type RamdiskId

string

param RamdiskId

The ID of the RAM disk.

Warning

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon Elastic Compute Cloud User Guide for Linux .

type BlockDeviceMappings

list

param BlockDeviceMappings

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 Amazon 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 Amazon 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 for Linux .

        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 Amazon 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.

type Monitoring

dict

param Monitoring

The monitoring for the instance.

  • Enabled (boolean) -- [REQUIRED]

    Indicates whether monitoring is enabled for the instance.

type SubnetId

string

param SubnetId

[EC2-VPC] The ID of the subnet to launch the instance into.

type DisableApiTermination

boolean

param DisableApiTermination

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

type InstanceInitiatedShutdownBehavior

string

param InstanceInitiatedShutdownBehavior

Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

Default: stop

type PrivateIpAddress

string

param PrivateIpAddress

[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.

type ClientToken

string

param ClientToken

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.

Constraints: Maximum 64 ASCII characters

type AdditionalInfo

string

param AdditionalInfo

Reserved.

type NetworkInterfaces

list

param NetworkInterfaces

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 .

type IamInstanceProfile

dict

param IamInstanceProfile

The IAM instance profile.

  • Arn (string) --

    The Amazon Resource Name (ARN) of the instance profile.

  • Name (string) --

    The name of the instance profile.

type EbsOptimized

boolean

param EbsOptimized

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 Amazon 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

rtype

dict

returns

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'|'t2.micro'|'t2.small'|'t2.medium'|'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'
            },
            'KernelId': 'string',
            'RamdiskId': 'string',
            'Platform': 'Windows',
            'Monitoring': {
                'State': 'disabled'|'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) --

    One 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.

        • PublicDnsName (string) --

          The public DNS name assigned to the instance. This name is not available until the instance enters the running state.

        • 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.

          • (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.

          • 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.

        • KernelId (string) --

          The kernel associated with this instance.

        • RamdiskId (string) --

          The RAM disk associated with this instance.

        • 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) --

          The ID of the subnet in which the instance is running.

        • VpcId (string) --

          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.

        • 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 Amazon 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 Amazon EBS volumes when the instance is launched.

              • VolumeId (string) --

                The ID of the Amazon 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) --

          The ID of the Spot Instance request.

        • ClientToken (string) --

          The idempotency token you provided when you launched the instance.

        • 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.

          • 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.