Amazon Elastic Compute Cloud

2016/03/03 - Amazon Elastic Compute Cloud - 17 updated api methods

AuthorizeSecurityGroupEgress (updated) Link ¶
Changes (request)
{'IpPermissions': {'UserIdGroupPairs': {'PeeringStatus': 'string',
                                        'VpcId': 'string',
                                        'VpcPeeringConnectionId': 'string'}}}

[EC2-VPC only] Adds one or more egress rules to a security group for use with a VPC. Specifically, this action permits instances to send traffic to one or more destination CIDR IP address ranges, or to one or more destination security groups for the same VPC. This action doesn't apply to security groups for use in EC2-Classic. For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide .

Warning

You can have up to 50 rules per security group (covering both ingress and egress rules).

Each rule consists of the protocol (for example, TCP), plus either a CIDR range or a source group. For the TCP and UDP protocols, you must also specify the destination port or port range. For the ICMP protocol, you must also specify the ICMP type and code. You can use -1 for the type or code to mean all types or all codes.

Rule changes are propagated to affected instances as quickly as possible. However, a small delay might occur.

Request Syntax

client.authorize_security_group_egress(
    DryRun=True|False,
    GroupId='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    IpProtocol='string',
    FromPort=123,
    ToPort=123,
    CidrIp='string',
    IpPermissions=[
        {
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'UserId': 'string',
                    'GroupName': 'string',
                    'GroupId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string',
                    'PeeringStatus': 'string'
                },
            ],
            'IpRanges': [
                {
                    'CidrIp': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'PrefixListId': 'string'
                },
            ]
        },
    ]
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type GroupId

string

param GroupId

[REQUIRED]

The ID of the security group.

type SourceSecurityGroupName

string

param SourceSecurityGroupName

The name of a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

type SourceSecurityGroupOwnerId

string

param SourceSecurityGroupOwnerId

The AWS account number for a destination security group. To authorize outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

type IpProtocol

string

param IpProtocol

The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.

type FromPort

integer

param FromPort

The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

type ToPort

integer

param ToPort

The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

type CidrIp

string

param CidrIp

The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.

type IpPermissions

list

param IpPermissions

A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.

  • (dict) --

    Describes a security group rule.

    • IpProtocol (string) --

      The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers ).

      [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

    • FromPort (integer) --

      The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

    • ToPort (integer) --

      The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

    • UserIdGroupPairs (list) --

      One or more security group and AWS account ID pairs.

      • (dict) --

        Describes a security group and AWS account ID pair.

        • UserId (string) --

          The ID of an AWS account.

        • GroupName (string) --

          The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use GroupId .

        • GroupId (string) --

          The ID of the security group.

        • VpcId (string) --

          The ID of the VPC for the referenced security group, if applicable.

        • VpcPeeringConnectionId (string) --

          The ID of the VPC peering connection, if applicable.

        • PeeringStatus (string) --

          The status of a VPC peering connection, if applicable.

    • IpRanges (list) --

      One or more IP ranges.

      • (dict) --

        Describes an IP range.

        • CidrIp (string) --

          The CIDR range. You can either specify a CIDR range or a source security group, not both.

    • PrefixListIds (list) --

      (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

      • (dict) --

        The ID of the prefix.

        • PrefixListId (string) --

          The ID of the prefix.

returns

None

AuthorizeSecurityGroupIngress (updated) Link ¶
Changes (request)
{'IpPermissions': {'UserIdGroupPairs': {'PeeringStatus': 'string',
                                        'VpcId': 'string',
                                        'VpcPeeringConnectionId': 'string'}}}

Adds one or more ingress rules to a security group.

Warning

EC2-Classic: You can have up to 100 rules per group.

EC2-VPC: You can have up to 50 rules per group (covering both ingress and egress rules).

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

[EC2-Classic] This action gives one or more CIDR IP address ranges permission to access a security group in your account, or gives one or more security groups (called the source groups ) permission to access a security group for your account. A source group can be for your own AWS account, or another.

[EC2-VPC] This action gives one or more CIDR IP address ranges permission to access a security group in your VPC, or gives one or more other security groups (called the source groups ) permission to access a security group for your VPC. The security groups must all be for the same VPC.

Request Syntax

client.authorize_security_group_ingress(
    DryRun=True|False,
    GroupName='string',
    GroupId='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    IpProtocol='string',
    FromPort=123,
    ToPort=123,
    CidrIp='string',
    IpPermissions=[
        {
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'UserId': 'string',
                    'GroupName': 'string',
                    'GroupId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string',
                    'PeeringStatus': 'string'
                },
            ],
            'IpRanges': [
                {
                    'CidrIp': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'PrefixListId': 'string'
                },
            ]
        },
    ]
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type GroupName

string

param GroupName

[EC2-Classic, default VPC] The name of the security group.

type GroupId

string

param GroupId

The ID of the security group. Required for a nondefault VPC.

type SourceSecurityGroupName

string

param SourceSecurityGroupName

[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC.

type SourceSecurityGroupOwnerId

string

param SourceSecurityGroupOwnerId

[EC2-Classic, default VPC] The AWS account number for the source security group. For EC2-VPC, the source security group must be in the same VPC. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.

type IpProtocol

string

param IpProtocol

The IP protocol name ( tcp , udp , icmp ) or number (see Protocol Numbers ). (VPC only) Use -1 to specify all.

type FromPort

integer

param FromPort

The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all ICMP types.

type ToPort

integer

param ToPort

The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.

type CidrIp

string

param CidrIp

The CIDR IP address range. You can't specify this parameter when specifying a source security group.

type IpPermissions

list

param IpPermissions

A set of IP permissions. Can be used to specify multiple rules in a single command.

  • (dict) --

    Describes a security group rule.

    • IpProtocol (string) --

      The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers ).

      [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

    • FromPort (integer) --

      The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

    • ToPort (integer) --

      The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

    • UserIdGroupPairs (list) --

      One or more security group and AWS account ID pairs.

      • (dict) --

        Describes a security group and AWS account ID pair.

        • UserId (string) --

          The ID of an AWS account.

        • GroupName (string) --

          The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use GroupId .

        • GroupId (string) --

          The ID of the security group.

        • VpcId (string) --

          The ID of the VPC for the referenced security group, if applicable.

        • VpcPeeringConnectionId (string) --

          The ID of the VPC peering connection, if applicable.

        • PeeringStatus (string) --

          The status of a VPC peering connection, if applicable.

    • IpRanges (list) --

      One or more IP ranges.

      • (dict) --

        Describes an IP range.

        • CidrIp (string) --

          The CIDR range. You can either specify a CIDR range or a source security group, not both.

    • PrefixListIds (list) --

      (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

      • (dict) --

        The ID of the prefix.

        • PrefixListId (string) --

          The ID of the prefix.

returns

None

DescribeInstances (updated) Link ¶
Changes (response)
{'Reservations': {'Instances': {'InstanceLifecycle': {'scheduled'},
                                'InstanceType': {'g2.8xlarge'}}}}

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

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

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.

  • affinity - The affinity setting for an instance running on a Dedicated host ( default | host ).

  • architecture - The instance architecture ( i386 | x86_64 ).

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

  • block-device-mapping.attach-time - The attach time for an EBS volume mapped to the instance, for example, 2010-09-15T17:15:20.000Z .

  • block-device-mapping.delete-on-termination - A Boolean that indicates whether the EBS volume is deleted on instance termination.

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

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

  • block-device-mapping.volume-id - The volume ID of the EBS volume.

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

  • dns-name - The public DNS name of the instance.

  • group-id - The ID of the security group for the instance. EC2-Classic only.

  • group-name - The name of the security group for the instance. EC2-Classic only.

  • host-Id - The ID of the Dedicated host on which the instance is running, if applicable.

  • 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 or a Scheduled Instance ( spot | scheduled ).

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

  • 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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge',
                    'LaunchTime': datetime(2015, 1, 1),
                    'Placement': {
                        'AvailabilityZone': 'string',
                        'GroupName': 'string',
                        'Tenancy': 'default'|'dedicated'|'host',
                        'HostId': 'string',
                        'Affinity': 'string'
                    },
                    'KernelId': 'string',
                    'RamdiskId': 'string',
                    'Platform': 'Windows',
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    },
                    'SubnetId': 'string',
                    'VpcId': 'string',
                    'PrivateIpAddress': 'string',
                    'PublicIpAddress': 'string',
                    'StateReason': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'Architecture': 'i386'|'x86_64',
                    'RootDeviceType': 'ebs'|'instance-store',
                    'RootDeviceName': 'string',
                    'BlockDeviceMappings': [
                        {
                            'DeviceName': 'string',
                            'Ebs': {
                                'VolumeId': 'string',
                                'Status': 'attaching'|'attached'|'detaching'|'detached',
                                'AttachTime': datetime(2015, 1, 1),
                                'DeleteOnTermination': True|False
                            }
                        },
                    ],
                    'VirtualizationType': 'hvm'|'paravirtual',
                    'InstanceLifecycle': 'spot'|'scheduled',
                    'SpotInstanceRequestId': 'string',
                    'ClientToken': 'string',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'SecurityGroups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'SourceDestCheck': True|False,
                    'Hypervisor': 'ovm'|'xen',
                    'NetworkInterfaces': [
                        {
                            'NetworkInterfaceId': 'string',
                            'SubnetId': 'string',
                            'VpcId': 'string',
                            'Description': 'string',
                            'OwnerId': 'string',
                            'Status': 'available'|'attaching'|'in-use'|'detaching',
                            'MacAddress': 'string',
                            'PrivateIpAddress': 'string',
                            'PrivateDnsName': 'string',
                            'SourceDestCheck': True|False,
                            'Groups': [
                                {
                                    'GroupName': 'string',
                                    'GroupId': 'string'
                                },
                            ],
                            'Attachment': {
                                'AttachmentId': 'string',
                                'DeviceIndex': 123,
                                'Status': 'attaching'|'attached'|'detaching'|'detached',
                                'AttachTime': datetime(2015, 1, 1),
                                'DeleteOnTermination': True|False
                            },
                            'Association': {
                                'PublicIp': 'string',
                                'PublicDnsName': 'string',
                                'IpOwnerId': 'string'
                            },
                            'PrivateIpAddresses': [
                                {
                                    'PrivateIpAddress': 'string',
                                    'PrivateDnsName': 'string',
                                    'Primary': True|False,
                                    'Association': {
                                        'PublicIp': 'string',
                                        'PublicDnsName': 'string',
                                        'IpOwnerId': 'string'
                                    }
                                },
                            ]
                        },
                    ],
                    'IamInstanceProfile': {
                        'Arn': 'string',
                        'Id': 'string'
                    },
                    'EbsOptimized': True|False,
                    'SriovNetSupport': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Reservations (list) --

      Zero or more reservations.

      • (dict) --

        Describes a reservation.

        • ReservationId (string) --

          The ID of the reservation.

        • OwnerId (string) --

          The ID of the AWS account that owns the reservation.

        • RequesterId (string) --

          The ID of the requester that launched the instances on your behalf (for example, AWS Management Console or Auto Scaling).

        • Groups (list) --

          [EC2-Classic only] One or more security groups.

          • (dict) --

            Describes a security group.

            • GroupName (string) --

              The name of the security group.

            • GroupId (string) --

              The ID of the security group.

        • Instances (list) --

          One or more instances.

          • (dict) --

            Describes an instance.

            • InstanceId (string) --

              The ID of the instance.

            • ImageId (string) --

              The ID of the AMI used to launch the instance.

            • State (dict) --

              The current state of the instance.

              • Code (integer) --

                The low byte represents the state. The high byte is an opaque internal value and should be ignored.

                • 0 : pending

                • 16 : running

                • 32 : shutting-down

                • 48 : terminated

                • 64 : stopping

                • 80 : stopped

              • Name (string) --

                The current state of the instance.

            • PrivateDnsName (string) --

              The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

            • PublicDnsName (string) --

              The public DNS name assigned to the instance. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

            • StateTransitionReason (string) --

              The reason for the most recent state transition. This might be an empty string.

            • KeyName (string) --

              The name of the key pair, if this instance was launched with an associated key pair.

            • AmiLaunchIndex (integer) --

              The AMI launch index, which can be used to find this instance in the launch group.

            • ProductCodes (list) --

              The product codes attached to this instance, if applicable.

              • (dict) --

                Describes a product code.

                • ProductCodeId (string) --

                  The product code.

                • ProductCodeType (string) --

                  The type of product code.

            • InstanceType (string) --

              The instance type.

            • LaunchTime (datetime) --

              The time the instance was launched.

            • Placement (dict) --

              The location where the instance launched, if applicable.

              • AvailabilityZone (string) --

                The Availability Zone of the instance.

              • GroupName (string) --

                The name of the placement group the instance is in (for cluster compute instances).

              • Tenancy (string) --

                The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.

              • HostId (string) --

                The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.

              • Affinity (string) --

                The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.

            • KernelId (string) --

              The kernel associated with this instance, if applicable.

            • RamdiskId (string) --

              The RAM disk associated with this instance, if applicable.

            • Platform (string) --

              The value is Windows for Windows instances; otherwise blank.

            • Monitoring (dict) --

              The monitoring information for the instance.

              • State (string) --

                Indicates whether monitoring is enabled for the instance.

            • SubnetId (string) --

              [EC2-VPC] The ID of the subnet in which the instance is running.

            • VpcId (string) --

              [EC2-VPC] The ID of the VPC in which the instance is running.

            • PrivateIpAddress (string) --

              The private IP address assigned to the instance.

            • PublicIpAddress (string) --

              The public IP address assigned to the instance, if applicable.

            • StateReason (dict) --

              The reason for the most recent state transition.

              • Code (string) --

                The reason code for the state change.

              • Message (string) --

                The message for the state change.

                • Server.SpotInstanceTermination : A Spot instance was terminated due to an increase in the market price.

                • Server.InternalError : An internal error occurred during instance launch, resulting in termination.

                • Server.InsufficientInstanceCapacity : There was insufficient instance capacity to satisfy the launch request.

                • Client.InternalError : A client error caused the instance to terminate on launch.

                • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.

                • Client.UserInitiatedShutdown : The instance was shut down using the Amazon EC2 API.

                • Client.VolumeLimitExceeded : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits.

                • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.

            • Architecture (string) --

              The architecture of the image.

            • RootDeviceType (string) --

              The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

            • RootDeviceName (string) --

              The root device name (for example, /dev/sda1 or /dev/xvda ).

            • BlockDeviceMappings (list) --

              Any block device mapping entries for the instance.

              • (dict) --

                Describes a block device mapping.

                • DeviceName (string) --

                  The device name exposed to the instance (for example, /dev/sdh or xvdh ).

                • Ebs (dict) --

                  Parameters used to automatically set up EBS volumes when the instance is launched.

                  • VolumeId (string) --

                    The ID of the EBS volume.

                  • Status (string) --

                    The attachment state.

                  • AttachTime (datetime) --

                    The time stamp when the attachment initiated.

                  • DeleteOnTermination (boolean) --

                    Indicates whether the volume is deleted on instance termination.

            • VirtualizationType (string) --

              The virtualization type of the instance.

            • InstanceLifecycle (string) --

              Indicates whether this is a Spot instance or a Scheduled Instance.

            • SpotInstanceRequestId (string) --

              If the request is a Spot instance request, the ID of the request.

            • ClientToken (string) --

              The idempotency token you provided when you launched the instance, if applicable.

            • Tags (list) --

              Any tags assigned to the instance.

              • (dict) --

                Describes a tag.

                • Key (string) --

                  The key of the tag.

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

                • Value (string) --

                  The value of the tag.

                  Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

            • SecurityGroups (list) --

              One or more security groups for the instance.

              • (dict) --

                Describes a security group.

                • GroupName (string) --

                  The name of the security group.

                • GroupId (string) --

                  The ID of the security group.

            • SourceDestCheck (boolean) --

              Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide .

            • Hypervisor (string) --

              The hypervisor type of the instance.

            • NetworkInterfaces (list) --

              [EC2-VPC] One or more network interfaces for the instance.

              • (dict) --

                Describes a network interface.

                • NetworkInterfaceId (string) --

                  The ID of the network interface.

                • SubnetId (string) --

                  The ID of the subnet.

                • VpcId (string) --

                  The ID of the VPC.

                • Description (string) --

                  The description.

                • OwnerId (string) --

                  The ID of the AWS account that created the network interface.

                • Status (string) --

                  The status of the network interface.

                • MacAddress (string) --

                  The MAC address.

                • PrivateIpAddress (string) --

                  The IP address of the network interface within the subnet.

                • PrivateDnsName (string) --

                  The private DNS name.

                • SourceDestCheck (boolean) --

                  Indicates whether to validate network traffic to or from this network interface.

                • Groups (list) --

                  One or more security groups.

                  • (dict) --

                    Describes a security group.

                    • GroupName (string) --

                      The name of the security group.

                    • GroupId (string) --

                      The ID of the security group.

                • Attachment (dict) --

                  The network interface attachment.

                  • AttachmentId (string) --

                    The ID of the network interface attachment.

                  • DeviceIndex (integer) --

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

                  • Status (string) --

                    The attachment state.

                  • AttachTime (datetime) --

                    The time stamp when the attachment initiated.

                  • DeleteOnTermination (boolean) --

                    Indicates whether the network interface is deleted when the instance is terminated.

                • Association (dict) --

                  The association information for an Elastic IP associated with the network interface.

                  • PublicIp (string) --

                    The public IP address or Elastic IP address bound to the network interface.

                  • PublicDnsName (string) --

                    The public DNS name.

                  • IpOwnerId (string) --

                    The ID of the owner of the Elastic IP address.

                • PrivateIpAddresses (list) --

                  The private IP addresses associated with the network interface.

                  • (dict) --

                    Describes a private IP address.

                    • PrivateIpAddress (string) --

                      The private IP address of the network interface.

                    • PrivateDnsName (string) --

                      The private DNS name.

                    • Primary (boolean) --

                      Indicates whether this IP address is the primary private IP address of the network interface.

                    • Association (dict) --

                      The association information for an Elastic IP address for the network interface.

                      • PublicIp (string) --

                        The public IP address or Elastic IP address bound to the network interface.

                      • PublicDnsName (string) --

                        The public DNS name.

                      • IpOwnerId (string) --

                        The ID of the owner of the Elastic IP address.

            • IamInstanceProfile (dict) --

              The IAM instance profile associated with the instance, if applicable.

              • Arn (string) --

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

              • Id (string) --

                The ID of the instance profile.

            • EbsOptimized (boolean) --

              Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

            • SriovNetSupport (string) --

              Specifies whether enhanced networking is enabled.

    • NextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

DescribeReservedInstances (updated) Link ¶
Changes (response)
{'ReservedInstances': {'InstanceType': {'g2.8xlarge'}}}

Describes one or more of the Reserved Instances that you purchased.

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

Request Syntax

client.describe_reserved_instances(
    DryRun=True|False,
    ReservedInstancesIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront'
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

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, 2015-08-07T11:54:42.000Z).

  • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).

  • instance-type - The instance type that is covered by the reservation.

  • product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC ( Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC) ).

  • reserved-instances-id - The ID of the Reserved Instance.

  • start - The time at which the Reserved Instance purchase request was placed (for example, 2014-08-07T11:54:42.000Z).

  • state - The state of the Reserved Instance ( payment-pending | active | payment-failed | retired ).

  • tag :key =*value* - The key/value combination of a tag assigned to the resource.

  • tag-key - The key of a tag assigned to the resource. This filter is independent of the tag-value filter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the tag :key =*value* filter.

  • tag-value - The value of a tag assigned to the resource. This filter is independent of the tag-key filter.

  • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge',
            'AvailabilityZone': 'string',
            'Start': datetime(2015, 1, 1),
            'End': datetime(2015, 1, 1),
            'Duration': 123,
            'UsagePrice': ...,
            'FixedPrice': ...,
            'InstanceCount': 123,
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'State': 'payment-pending'|'active'|'payment-failed'|'retired',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'CurrencyCode': 'USD',
            'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
            'RecurringCharges': [
                {
                    'Frequency': 'Hourly',
                    'Amount': 123.0
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • ReservedInstances (list) --

      A list of Reserved Instances.

      • (dict) --

        Describes a Reserved Instance.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

        • InstanceType (string) --

          The instance type on which the Reserved Instance can be used.

        • AvailabilityZone (string) --

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

        • Start (datetime) --

          The date and time the Reserved Instance started.

        • End (datetime) --

          The time when the Reserved Instance expires.

        • Duration (integer) --

          The duration of the Reserved Instance, in seconds.

        • UsagePrice (float) --

          The usage price of the Reserved Instance, per hour.

        • FixedPrice (float) --

          The purchase price of the Reserved Instance.

        • InstanceCount (integer) --

          The number of reservations purchased.

        • ProductDescription (string) --

          The Reserved Instance product platform description.

        • State (string) --

          The state of the Reserved Instance purchase.

        • Tags (list) --

          Any tags assigned to the resource.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • InstanceTenancy (string) --

          The tenancy of the 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': {'g2.8xlarge'}}}}}

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.

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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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': {'g2.8xlarge'}}
Response
{'ReservedInstancesOfferings': {'InstanceType': {'g2.8xlarge'}}}

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.

If you have listed your own Reserved Instances for sale in the Reserved Instance Marketplace, they will be excluded from these results. This is to ensure that you do not purchase your own Reserved Instances.

For more information, see Reserved Instance Marketplace in the Amazon Elastic Compute Cloud User Guide .

Request Syntax

client.describe_reserved_instances_offerings(
    DryRun=True|False,
    ReservedInstancesOfferingIds=[
        'string',
    ],
    InstanceType='t1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge',
    AvailabilityZone='string',
    ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceTenancy='default'|'dedicated'|'host',
    OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
    NextToken='string',
    MaxResults=123,
    IncludeMarketplace=True|False,
    MinDuration=123,
    MaxDuration=123,
    MaxInstanceCount=123
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type ReservedInstancesOfferingIds

list

param ReservedInstancesOfferingIds

One or more Reserved Instances offering IDs.

  • (string) --

type InstanceType

string

param InstanceType

The instance type that the reservation will cover (for example, m1.small ). For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide .

type AvailabilityZone

string

param AvailabilityZone

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

type ProductDescription

string

param ProductDescription

The Reserved Instance product platform 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 that is covered by the reservation.

  • 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 both AWS and the Reserved Instance Marketplace are listed.

  • product-description - The Reserved Instance product platform description. Instances that include (Amazon VPC) in the product platform description will only be displayed to EC2-Classic account holders and are for use with Amazon VPC. ( Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC) )

  • reserved-instances-offering-id - The Reserved Instances offering ID.

  • usage-price - The usage price of the Reserved Instance, per hour (for example, 0.84).

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria, such as tags, attributes, or IDs.

    • Name (string) --

      The name of the filter. Filter names are case-sensitive.

    • Values (list) --

      One or more filter values. Filter values are case-sensitive.

      • (string) --

type InstanceTenancy

string

param InstanceTenancy

The tenancy of the instances covered by the reservation. A Reserved Instance with a tenancy of dedicated is applied to instances that run in a VPC on single-tenant hardware (i.e., Dedicated Instances).

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 Reserved Instance 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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge',
            'AvailabilityZone': 'string',
            'Duration': 123,
            'UsagePrice': ...,
            'FixedPrice': ...,
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'CurrencyCode': 'USD',
            'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
            'RecurringCharges': [
                {
                    'Frequency': 'Hourly',
                    'Amount': 123.0
                },
            ],
            'Marketplace': True|False,
            'PricingDetails': [
                {
                    'Price': 123.0,
                    'Count': 123
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ReservedInstancesOfferings (list) --

      A list of Reserved Instances offerings.

      • (dict) --

        Describes a Reserved Instance offering.

        • ReservedInstancesOfferingId (string) --

          The ID of the Reserved Instance offering.

        • InstanceType (string) --

          The instance type on which the Reserved Instance can be used.

        • AvailabilityZone (string) --

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

        • Duration (integer) --

          The duration of the Reserved Instance, in seconds.

        • UsagePrice (float) --

          The usage price of the Reserved Instance, per hour.

        • FixedPrice (float) --

          The purchase price of the Reserved Instance.

        • ProductDescription (string) --

          The Reserved Instance product platform description.

        • InstanceTenancy (string) --

          The tenancy of the 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 reservations 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.

DescribeSecurityGroups (updated) Link ¶
Changes (response)
{'SecurityGroups': {'IpPermissions': {'UserIdGroupPairs': {'PeeringStatus': 'string',
                                                           'VpcId': 'string',
                                                           'VpcPeeringConnectionId': 'string'}},
                    'IpPermissionsEgress': {'UserIdGroupPairs': {'PeeringStatus': 'string',
                                                                 'VpcId': 'string',
                                                                 'VpcPeeringConnectionId': 'string'}}}}

Describes one or more of your security groups.

A security group is for use with instances either in the EC2-Classic platform or in a specific VPC. For more information, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide and Security Groups for Your VPC in the Amazon Virtual Private Cloud User Guide .

Request Syntax

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

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type GroupNames

list

param GroupNames

[EC2-Classic and default VPC only] One or more security group names. You can specify either the security group name or the security group ID. For security groups in a nondefault VPC, use the group-name filter to describe security groups by name.

Default: Describes all your security groups.

  • (string) --

type GroupIds

list

param GroupIds

One or more security group IDs. Required for security groups in a nondefault VPC.

Default: Describes all your security groups.

  • (string) --

type Filters

list

param Filters

One or more filters. If using multiple filters for rules, the results include security groups for which any combination of rules - not necessarily a single rule - match all filters.

  • description - The description of the security group.

  • egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service to which the security group allows access.

  • group-id - The ID of the security group.

  • group-name - The name of the security group.

  • ip-permission.cidr - A CIDR range that has been granted permission.

  • ip-permission.from-port - The start of port range for the TCP and UDP protocols, or an ICMP type number.

  • ip-permission.group-id - The ID of a security group that has been granted permission.

  • ip-permission.group-name - The name of a security group that has been granted permission.

  • ip-permission.protocol - The IP protocol for the permission ( tcp | udp | icmp or a protocol number).

  • ip-permission.to-port - The end of port range for the TCP and UDP protocols, or an ICMP code.

  • ip-permission.user-id - The ID of an AWS account that has been granted permission.

  • owner-id - The AWS account ID of the owner of the security group.

  • tag-key - The key of a tag assigned to the security group.

  • tag-value - The value of a tag assigned to the security group.

  • vpc-id - The ID of the VPC specified when the security group was created.

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

{
    'SecurityGroups': [
        {
            'OwnerId': 'string',
            'GroupName': 'string',
            'GroupId': 'string',
            'Description': 'string',
            'IpPermissions': [
                {
                    'IpProtocol': 'string',
                    'FromPort': 123,
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'UserId': 'string',
                            'GroupName': 'string',
                            'GroupId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string',
                            'PeeringStatus': 'string'
                        },
                    ],
                    'IpRanges': [
                        {
                            'CidrIp': 'string'
                        },
                    ],
                    'PrefixListIds': [
                        {
                            'PrefixListId': 'string'
                        },
                    ]
                },
            ],
            'IpPermissionsEgress': [
                {
                    'IpProtocol': 'string',
                    'FromPort': 123,
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'UserId': 'string',
                            'GroupName': 'string',
                            'GroupId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string',
                            'PeeringStatus': 'string'
                        },
                    ],
                    'IpRanges': [
                        {
                            'CidrIp': 'string'
                        },
                    ],
                    'PrefixListIds': [
                        {
                            'PrefixListId': 'string'
                        },
                    ]
                },
            ],
            'VpcId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • SecurityGroups (list) --

      Information about one or more security groups.

      • (dict) --

        Describes a security group

        • OwnerId (string) --

          The AWS account ID of the owner of the security group.

        • GroupName (string) --

          The name of the security group.

        • GroupId (string) --

          The ID of the security group.

        • Description (string) --

          A description of the security group.

        • IpPermissions (list) --

          One or more inbound rules associated with the security group.

          • (dict) --

            Describes a security group rule.

            • IpProtocol (string) --

              The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers ).

              [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

            • FromPort (integer) --

              The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

            • ToPort (integer) --

              The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

            • UserIdGroupPairs (list) --

              One or more security group and AWS account ID pairs.

              • (dict) --

                Describes a security group and AWS account ID pair.

                • UserId (string) --

                  The ID of an AWS account.

                • GroupName (string) --

                  The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use GroupId .

                • GroupId (string) --

                  The ID of the security group.

                • VpcId (string) --

                  The ID of the VPC for the referenced security group, if applicable.

                • VpcPeeringConnectionId (string) --

                  The ID of the VPC peering connection, if applicable.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

            • IpRanges (list) --

              One or more IP ranges.

              • (dict) --

                Describes an IP range.

                • CidrIp (string) --

                  The CIDR range. You can either specify a CIDR range or a source security group, not both.

            • PrefixListIds (list) --

              (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

              • (dict) --

                The ID of the prefix.

                • PrefixListId (string) --

                  The ID of the prefix.

        • IpPermissionsEgress (list) --

          [EC2-VPC] One or more outbound rules associated with the security group.

          • (dict) --

            Describes a security group rule.

            • IpProtocol (string) --

              The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers ).

              [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

            • FromPort (integer) --

              The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

            • ToPort (integer) --

              The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

            • UserIdGroupPairs (list) --

              One or more security group and AWS account ID pairs.

              • (dict) --

                Describes a security group and AWS account ID pair.

                • UserId (string) --

                  The ID of an AWS account.

                • GroupName (string) --

                  The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use GroupId .

                • GroupId (string) --

                  The ID of the security group.

                • VpcId (string) --

                  The ID of the VPC for the referenced security group, if applicable.

                • VpcPeeringConnectionId (string) --

                  The ID of the VPC peering connection, if applicable.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

            • IpRanges (list) --

              One or more IP ranges.

              • (dict) --

                Describes an IP range.

                • CidrIp (string) --

                  The CIDR range. You can either specify a CIDR range or a source security group, not both.

            • PrefixListIds (list) --

              (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

              • (dict) --

                The ID of the prefix.

                • PrefixListId (string) --

                  The ID of the prefix.

        • VpcId (string) --

          [EC2-VPC] The ID of the VPC for the security group.

        • Tags (list) --

          Any tags assigned to the security group.

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

DescribeSpotFleetRequests (updated) Link ¶
Changes (response)
{'SpotFleetRequestConfigs': {'SpotFleetRequestConfig': {'LaunchSpecifications': {'InstanceType': {'g2.8xlarge'}}}}}

Describes your Spot fleet requests.

Request Syntax

client.describe_spot_fleet_requests(
    DryRun=True|False,
    SpotFleetRequestIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type SpotFleetRequestIds

list

param SpotFleetRequestIds

The IDs of the Spot fleet requests.

  • (string) --

type NextToken

string

param NextToken

The token for the next set of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

rtype

dict

returns

Response Syntax

{
    'SpotFleetRequestConfigs': [
        {
            'SpotFleetRequestId': 'string',
            'SpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying',
            'SpotFleetRequestConfig': {
                'ClientToken': 'string',
                'SpotPrice': 'string',
                'TargetCapacity': 123,
                'ValidFrom': datetime(2015, 1, 1),
                'ValidUntil': datetime(2015, 1, 1),
                'TerminateInstancesWithExpiration': True|False,
                'IamFleetRole': 'string',
                'LaunchSpecifications': [
                    {
                        '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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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'
                            },
                        ],
                        'Monitoring': {
                            'Enabled': True|False
                        },
                        '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,
                        'WeightedCapacity': 123.0,
                        'SpotPrice': 'string'
                    },
                ],
                'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
                'AllocationStrategy': 'lowestPrice'|'diversified'
            },
            'CreateTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotFleetRequests.

    • SpotFleetRequestConfigs (list) --

      Information about the configuration of your Spot fleet.

      • (dict) --

        Describes a Spot fleet request.

        • SpotFleetRequestId (string) --

          The ID of the Spot fleet request.

        • SpotFleetRequestState (string) --

          The state of the Spot fleet request.

        • SpotFleetRequestConfig (dict) --

          Information about the configuration of the Spot fleet request.

          • ClientToken (string) --

            A unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency.

          • SpotPrice (string) --

            The bid price per unit hour.

          • TargetCapacity (integer) --

            The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.

          • ValidFrom (datetime) --

            The start date and time of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). The default is to start fulfilling the request immediately.

          • ValidUntil (datetime) --

            The end date and time of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). At this point, no new Spot instance requests are placed or enabled to fulfill the request.

          • TerminateInstancesWithExpiration (boolean) --

            Indicates whether running Spot instances should be terminated when the Spot fleet request expires.

          • IamFleetRole (string) --

            Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration .

          • LaunchSpecifications (list) --

            Information about the launch specifications for the Spot fleet request.

            • (dict) --

              Describes the launch specification for one or more Spot instances.

              • ImageId (string) --

                The ID of the AMI.

              • KeyName (string) --

                The name of the key pair.

              • SecurityGroups (list) --

                One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

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

                • AvailabilityZone (string) --

                  The Availability Zone.

                  [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

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

                    • SnapshotId (string) --

                      The ID of the snapshot.

                    • VolumeSize (integer) --

                      The size of the volume, in GiB.

                      Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                      Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                    • DeleteOnTermination (boolean) --

                      Indicates whether the EBS volume is deleted on instance termination.

                    • VolumeType (string) --

                      The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic volumes.

                      Default: standard

                    • Iops (integer) --

                      The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose (SSD) volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose (SSD) baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .

                      Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and 3 to 10000 for General Purpose (SSD) volumes.

                      Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create standard or gp2 volumes.

                    • Encrypted (boolean) --

                      Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

                  • NoDevice (string) --

                    Suppresses the specified device included in the block device mapping of the AMI.

              • Monitoring (dict) --

                Enable or disable monitoring for the instances.

                • Enabled (boolean) --

                  Enables monitoring for the instance.

                  Default: false

              • SubnetId (string) --

                The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".

              • 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 instances are 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

              • WeightedCapacity (float) --

                The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).

                If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.

              • SpotPrice (string) --

                The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of WeightedCapacity .

          • ExcessCapacityTerminationPolicy (string) --

            Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.

          • AllocationStrategy (string) --

            Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is lowestPrice .

        • CreateTime (datetime) --

          The creation date and time of the request.

    • NextToken (string) --

      The token required to retrieve the next set of results. This value is null when there are no more results to return.

DescribeSpotInstanceRequests (updated) Link ¶
Changes (response)
{'SpotInstanceRequests': {'LaunchSpecification': {'InstanceType': {'g2.8xlarge'}}}}

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 .

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

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

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, m3.medium ).

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

  • 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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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)',
            'BlockDurationMinutes': 123,
            'ActualBlockHourlyPrice': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'LaunchedAvailabilityZone': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotInstanceRequests.

    • SpotInstanceRequests (list) --

      One or more Spot instance requests.

      • (dict) --

        Describes a Spot instance request.

        • SpotInstanceRequestId (string) --

          The ID of the Spot instance request.

        • SpotPrice (string) --

          The maximum hourly price (bid) for the 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 .

        • 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. For a list of status codes, see Spot Bid Status Codes in the Amazon Elastic Compute Cloud User Guide .

          • UpdateTime (datetime) --

            The date and time of the most recent status update, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

          • Message (string) --

            The description for the status code.

        • ValidFrom (datetime) --

          The start date of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). The request becomes active at this date and time.

        • ValidUntil (datetime) --

          The end date of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). If this is a one-time request, it 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. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

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

              [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

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

                • SnapshotId (string) --

                  The ID of the snapshot.

                • VolumeSize (integer) --

                  The size of the volume, in GiB.

                  Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                  Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                • DeleteOnTermination (boolean) --

                  Indicates whether the EBS volume is deleted on instance termination.

                • VolumeType (string) --

                  The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic volumes.

                  Default: standard

                • Iops (integer) --

                  The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose (SSD) volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose (SSD) baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .

                  Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and 3 to 10000 for General Purpose (SSD) volumes.

                  Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create standard or gp2 volumes.

                • Encrypted (boolean) --

                  Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

              • NoDevice (string) --

                Suppresses the specified device included in the block device mapping of the AMI.

          • 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 date and time when the Spot instance request was created, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

        • ProductDescription (string) --

          The product description associated with the Spot instance.

        • BlockDurationMinutes (integer) --

          The duration for the Spot instance, in minutes.

        • ActualBlockHourlyPrice (string) --

          If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.

        • 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': {'g2.8xlarge'}}
Response
{'SpotPriceHistory': {'InstanceType': {'g2.8xlarge'}}}

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 .

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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type StartTime

datetime

param StartTime

The date and time, up to the past 90 days, from which to start retrieving the price history data, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

type EndTime

datetime

param EndTime

The date and time, up to the current date, from which to stop retrieving the price history data, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

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, m3.medium ).

  • 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, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). 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 in a single call. Specify a value between 1 and 1000. The default value is 1000. To retrieve the remaining results, make another call with the returned NextToken value.

type NextToken

string

param NextToken

The token for the next set 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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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) --

    Contains the output of DescribeSpotPriceHistory.

    • 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, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

        • AvailabilityZone (string) --

          The Availability Zone.

    • NextToken (string) --

      The token required to retrieve the next set of results. This value is null when there are no more results to return.

ImportInstance (updated) Link ¶
Changes (request)
{'LaunchSpecification': {'InstanceType': {'g2.8xlarge'}}}

Creates an import instance task using metadata from the specified disk image. ImportInstance only supports single-volume VMs. To import multi-volume VMs, use ImportImage. After importing the image, you then upload it using the ec2-import-volume command in the EC2 command line tools. For more information, see Using the Command Line Tools to Import Your Virtual Machine to Amazon EC2 in the Amazon Elastic Compute Cloud User Guide .

For information about the import manifest referenced by this API action, see VM Import Manifest.

Request Syntax

client.import_instance(
    DryRun=True|False,
    Description='string',
    LaunchSpecification={
        'Architecture': 'i386'|'x86_64',
        'GroupNames': [
            'string',
        ],
        'GroupIds': [
            'string',
        ],
        'AdditionalInfo': 'string',
        'UserData': {
            'Data': 'string'
        },
        'InstanceType': 't1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge',
        'Placement': {
            'AvailabilityZone': 'string',
            'GroupName': 'string',
            'Tenancy': 'default'|'dedicated'|'host',
            'HostId': 'string',
            'Affinity': 'string'
        },
        'Monitoring': True|False,
        'SubnetId': 'string',
        'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
        'PrivateIpAddress': 'string'
    },
    DiskImages=[
        {
            'Image': {
                'Format': 'VMDK'|'RAW'|'VHD',
                'Bytes': 123,
                'ImportManifestUrl': 'string'
            },
            'Description': 'string',
            'Volume': {
                'Size': 123
            }
        },
    ],
    Platform='Windows'
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type Description

string

param Description

A description for the instance being imported.

type LaunchSpecification

dict

param LaunchSpecification

The launch specification.

  • Architecture (string) --

    The architecture of the instance.

  • GroupNames (list) --

    One or more security group names.

    • (string) --

  • GroupIds (list) --

    One or more security group IDs.

    • (string) --

  • AdditionalInfo (string) --

    Reserved.

  • UserData (dict) --

    The Base64-encoded MIME user data to be made available to the instance.

    • Data (string) --

      The Base64-encoded MIME user data for the instance.

  • InstanceType (string) --

    The instance type. For more information about the instance types that you can import, see Before You Get Started in the Amazon Elastic Compute Cloud User Guide.

  • Placement (dict) --

    The placement information for the instance.

    • AvailabilityZone (string) --

      The Availability Zone of the instance.

    • GroupName (string) --

      The name of the placement group the instance is in (for cluster compute instances).

    • Tenancy (string) --

      The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.

    • HostId (string) --

      The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.

    • Affinity (string) --

      The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.

  • Monitoring (boolean) --

    Indicates whether monitoring is enabled.

  • SubnetId (string) --

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

  • InstanceInitiatedShutdownBehavior (string) --

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

  • PrivateIpAddress (string) --

    [EC2-VPC] An available IP address from the IP address range of the subnet.

type DiskImages

list

param DiskImages

The disk image.

  • (dict) --

    Describes a disk image.

    • Image (dict) --

      Information about the disk image.

      • Format (string) -- [REQUIRED]

        The disk image format.

      • Bytes (integer) -- [REQUIRED]

        The size of the disk image, in GiB.

      • ImportManifestUrl (string) -- [REQUIRED]

        A presigned URL for the import manifest stored in Amazon S3 and presented here as an Amazon S3 presigned URL. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide .

        For information about the import manifest referenced by this API action, see VM Import Manifest.

    • Description (string) --

      A description of the disk image.

    • Volume (dict) --

      Information about the 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) --

      Information about the conversion task.

      • ConversionTaskId (string) --

        The ID of the conversion task.

      • ExpirationTime (string) --

        The time when the task expires. If the upload isn't complete before the expiration time, we automatically cancel the task.

      • ImportInstance (dict) --

        If the task is for importing an instance, this contains information about the import instance task.

        • Volumes (list) --

          One or more volumes.

          • (dict) --

            Describes an import volume task.

            • BytesConverted (integer) --

              The number of bytes converted so far.

            • AvailabilityZone (string) --

              The Availability Zone where the resulting instance will reside.

            • Image (dict) --

              The image.

              • Format (string) --

                The disk image format.

              • Size (integer) --

                The size of the disk image, in GiB.

              • ImportManifestUrl (string) --

                A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide .

                For information about the import manifest referenced by this API action, see VM Import Manifest.

              • Checksum (string) --

                The checksum computed for the disk image.

            • Volume (dict) --

              The volume.

              • Size (integer) --

                The size of the volume, in GiB.

              • Id (string) --

                The volume identifier.

            • Status (string) --

              The status of the import of this particular disk image.

            • StatusMessage (string) --

              The status information or errors related to the disk image.

            • Description (string) --

              A description of the task.

        • InstanceId (string) --

          The ID of the instance.

        • Platform (string) --

          The instance operating system.

        • Description (string) --

          A description of the task.

      • ImportVolume (dict) --

        If the task is for importing a volume, this contains information about the import volume task.

        • BytesConverted (integer) --

          The number of bytes converted so far.

        • AvailabilityZone (string) --

          The Availability Zone where the resulting volume will reside.

        • Description (string) --

          The description you provided when starting the import volume task.

        • Image (dict) --

          The image.

          • Format (string) --

            The disk image format.

          • Size (integer) --

            The size of the disk image, in GiB.

          • ImportManifestUrl (string) --

            A presigned URL for the import manifest stored in Amazon S3. For information about creating a presigned URL for an Amazon S3 object, read the "Query String Request Authentication Alternative" section of the Authenticating REST Requests topic in the Amazon Simple Storage Service Developer Guide .

            For information about the import manifest referenced by this API action, see VM Import Manifest.

          • Checksum (string) --

            The checksum computed for the disk image.

        • Volume (dict) --

          The volume.

          • Size (integer) --

            The size of the volume, in GiB.

          • Id (string) --

            The volume identifier.

      • State (string) --

        The state of the conversion task.

      • StatusMessage (string) --

        The status message related to the conversion task.

      • Tags (list) --

        Any tags assigned to the task.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

ModifyReservedInstances (updated) Link ¶
Changes (request)
{'TargetConfigurations': {'InstanceType': {'g2.8xlarge'}}}

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.

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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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.

RequestSpotFleet (updated) Link ¶
Changes (request)
{'SpotFleetRequestConfig': {'LaunchSpecifications': {'InstanceType': {'g2.8xlarge'}}}}

Creates a Spot fleet request.

You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.

By default, the Spot fleet requests Spot instances in the Spot pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.

Alternatively, you can specify that the Spot fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot instances in your Spot fleet are in different Spot pools, you can improve the availability of your fleet.

For more information, see Spot Fleet Requests in the Amazon Elastic Compute Cloud User Guide .

Request Syntax

client.request_spot_fleet(
    DryRun=True|False,
    SpotFleetRequestConfig={
        'ClientToken': 'string',
        'SpotPrice': 'string',
        'TargetCapacity': 123,
        'ValidFrom': datetime(2015, 1, 1),
        'ValidUntil': datetime(2015, 1, 1),
        'TerminateInstancesWithExpiration': True|False,
        'IamFleetRole': 'string',
        'LaunchSpecifications': [
            {
                '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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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'
                    },
                ],
                'Monitoring': {
                    'Enabled': True|False
                },
                '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,
                'WeightedCapacity': 123.0,
                'SpotPrice': 'string'
            },
        ],
        'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
        'AllocationStrategy': 'lowestPrice'|'diversified'
    }
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type SpotFleetRequestConfig

dict

param SpotFleetRequestConfig

[REQUIRED]

The configuration for the Spot fleet request.

  • ClientToken (string) --

    A unique, case-sensitive identifier you provide to ensure idempotency of your listings. This helps avoid duplicate listings. For more information, see Ensuring Idempotency.

  • SpotPrice (string) -- [REQUIRED]

    The bid price per unit hour.

  • TargetCapacity (integer) -- [REQUIRED]

    The number of units to request. You can choose to set the target capacity in terms of instances or a performance characteristic that is important to your application workload, such as vCPUs, memory, or I/O.

  • ValidFrom (datetime) --

    The start date and time of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). The default is to start fulfilling the request immediately.

  • ValidUntil (datetime) --

    The end date and time of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). At this point, no new Spot instance requests are placed or enabled to fulfill the request.

  • TerminateInstancesWithExpiration (boolean) --

    Indicates whether running Spot instances should be terminated when the Spot fleet request expires.

  • IamFleetRole (string) -- [REQUIRED]

    Grants the Spot fleet permission to terminate Spot instances on your behalf when you cancel its Spot fleet request using CancelSpotFleetRequests or when the Spot fleet request expires, if you set terminateInstancesWithExpiration .

  • LaunchSpecifications (list) -- [REQUIRED]

    Information about the launch specifications for the Spot fleet request.

    • (dict) --

      Describes the launch specification for one or more Spot instances.

      • ImageId (string) --

        The ID of the AMI.

      • KeyName (string) --

        The name of the key pair.

      • SecurityGroups (list) --

        One or more security groups. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

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

        • AvailabilityZone (string) --

          The Availability Zone.

          [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

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

            • SnapshotId (string) --

              The ID of the snapshot.

            • VolumeSize (integer) --

              The size of the volume, in GiB.

              Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

              Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

            • DeleteOnTermination (boolean) --

              Indicates whether the EBS volume is deleted on instance termination.

            • VolumeType (string) --

              The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic volumes.

              Default: standard

            • Iops (integer) --

              The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose (SSD) volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose (SSD) baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .

              Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and 3 to 10000 for General Purpose (SSD) volumes.

              Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create standard or gp2 volumes.

            • Encrypted (boolean) --

              Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

          • NoDevice (string) --

            Suppresses the specified device included in the block device mapping of the AMI.

      • Monitoring (dict) --

        Enable or disable monitoring for the instances.

        • Enabled (boolean) --

          Enables monitoring for the instance.

          Default: false

      • SubnetId (string) --

        The ID of the subnet in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08".

      • 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 instances are 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

      • WeightedCapacity (float) --

        The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms (instances or a performance characteristic such as vCPUs, memory, or I/O).

        If the target capacity divided by this value is not a whole number, we round the number of instances to the next whole number. If this value is not specified, the default is 1.

      • SpotPrice (string) --

        The bid price per unit hour for the specified instance type. If this value is not specified, the default is the Spot bid price specified for the fleet. To determine the bid price per unit hour, divide the Spot bid price by the value of WeightedCapacity .

  • ExcessCapacityTerminationPolicy (string) --

    Indicates whether running Spot instances should be terminated if the target capacity of the Spot fleet request is decreased below the current size of the Spot fleet.

  • AllocationStrategy (string) --

    Indicates how to allocate the target capacity across the Spot pools specified by the Spot fleet request. The default is lowestPrice .

rtype

dict

returns

Response Syntax

{
    'SpotFleetRequestId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of RequestSpotFleet.

    • SpotFleetRequestId (string) --

      The ID of the Spot fleet request.

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

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 .

Request Syntax

client.request_spot_instances(
    DryRun=True|False,
    SpotPrice='string',
    ClientToken='string',
    InstanceCount=123,
    Type='one-time'|'persistent',
    ValidFrom=datetime(2015, 1, 1),
    ValidUntil=datetime(2015, 1, 1),
    LaunchGroup='string',
    AvailabilityZoneGroup='string',
    BlockDurationMinutes=123,
    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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type SpotPrice

string

param SpotPrice

[REQUIRED]

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

type ClientToken

string

param ClientToken

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency in the Amazon Elastic Compute Cloud User Guide .

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 BlockDurationMinutes

integer

param BlockDurationMinutes

The required duration for the Spot instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

The duration period starts as soon as your Spot instance receives its instance ID. At the end of the duration period, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.

Note that you can't specify an Availability Zone group or a launch group if you specify a duration.

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.

      [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

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

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiB.

          Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

          Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination.

        • VolumeType (string) --

          The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic volumes.

          Default: standard

        • Iops (integer) --

          The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose (SSD) volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose (SSD) baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .

          Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and 3 to 10000 for General Purpose (SSD) volumes.

          Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create standard or gp2 volumes.

        • Encrypted (boolean) --

          Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

      • NoDevice (string) --

        Suppresses the specified device included in the block device mapping of the AMI.

  • 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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'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)',
            'BlockDurationMinutes': 123,
            'ActualBlockHourlyPrice': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'LaunchedAvailabilityZone': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of RequestSpotInstances.

    • SpotInstanceRequests (list) --

      One or more Spot instance requests.

      • (dict) --

        Describes a Spot instance request.

        • SpotInstanceRequestId (string) --

          The ID of the Spot instance request.

        • SpotPrice (string) --

          The maximum hourly price (bid) for the 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 .

        • 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. For a list of status codes, see Spot Bid Status Codes in the Amazon Elastic Compute Cloud User Guide .

          • UpdateTime (datetime) --

            The date and time of the most recent status update, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

          • Message (string) --

            The description for the status code.

        • ValidFrom (datetime) --

          The start date of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). The request becomes active at this date and time.

        • ValidUntil (datetime) --

          The end date of the request, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). If this is a one-time request, it 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. When requesting instances in a VPC, you must specify the IDs of the security groups. When requesting instances in EC2-Classic, you can specify the names or the IDs of the security groups.

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

              [Spot fleet only] To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

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

                • SnapshotId (string) --

                  The ID of the snapshot.

                • VolumeSize (integer) --

                  The size of the volume, in GiB.

                  Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

                  Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

                • DeleteOnTermination (boolean) --

                  Indicates whether the EBS volume is deleted on instance termination.

                • VolumeType (string) --

                  The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic volumes.

                  Default: standard

                • Iops (integer) --

                  The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose (SSD) volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose (SSD) baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .

                  Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and 3 to 10000 for General Purpose (SSD) volumes.

                  Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create standard or gp2 volumes.

                • Encrypted (boolean) --

                  Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

              • NoDevice (string) --

                Suppresses the specified device included in the block device mapping of the AMI.

          • 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 date and time when the Spot instance request was created, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

        • ProductDescription (string) --

          The product description associated with the Spot instance.

        • BlockDurationMinutes (integer) --

          The duration for the Spot instance, in minutes.

        • ActualBlockHourlyPrice (string) --

          If you specified a duration and your Spot instance request was fulfilled, this is the fixed hourly price in effect for the Spot instance while it runs.

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

RevokeSecurityGroupEgress (updated) Link ¶
Changes (request)
{'IpPermissions': {'UserIdGroupPairs': {'PeeringStatus': 'string',
                                        'VpcId': 'string',
                                        'VpcPeeringConnectionId': 'string'}}}

[EC2-VPC only] Removes one or more egress rules from a security group for EC2-VPC. This action doesn't apply to security groups for use in EC2-Classic. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be revoked.

Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Request Syntax

client.revoke_security_group_egress(
    DryRun=True|False,
    GroupId='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    IpProtocol='string',
    FromPort=123,
    ToPort=123,
    CidrIp='string',
    IpPermissions=[
        {
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'UserId': 'string',
                    'GroupName': 'string',
                    'GroupId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string',
                    'PeeringStatus': 'string'
                },
            ],
            'IpRanges': [
                {
                    'CidrIp': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'PrefixListId': 'string'
                },
            ]
        },
    ]
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type GroupId

string

param GroupId

[REQUIRED]

The ID of the security group.

type SourceSecurityGroupName

string

param SourceSecurityGroupName

The name of a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

type SourceSecurityGroupOwnerId

string

param SourceSecurityGroupOwnerId

The AWS account number for a destination security group. To revoke outbound access to a destination security group, we recommend that you use a set of IP permissions instead.

type IpProtocol

string

param IpProtocol

The IP protocol name or number. We recommend that you specify the protocol in a set of IP permissions instead.

type FromPort

integer

param FromPort

The start of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

type ToPort

integer

param ToPort

The end of port range for the TCP and UDP protocols, or an ICMP type number. We recommend that you specify the port range in a set of IP permissions instead.

type CidrIp

string

param CidrIp

The CIDR IP address range. We recommend that you specify the CIDR range in a set of IP permissions instead.

type IpPermissions

list

param IpPermissions

A set of IP permissions. You can't specify a destination security group and a CIDR IP address range.

  • (dict) --

    Describes a security group rule.

    • IpProtocol (string) --

      The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers ).

      [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

    • FromPort (integer) --

      The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

    • ToPort (integer) --

      The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

    • UserIdGroupPairs (list) --

      One or more security group and AWS account ID pairs.

      • (dict) --

        Describes a security group and AWS account ID pair.

        • UserId (string) --

          The ID of an AWS account.

        • GroupName (string) --

          The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use GroupId .

        • GroupId (string) --

          The ID of the security group.

        • VpcId (string) --

          The ID of the VPC for the referenced security group, if applicable.

        • VpcPeeringConnectionId (string) --

          The ID of the VPC peering connection, if applicable.

        • PeeringStatus (string) --

          The status of a VPC peering connection, if applicable.

    • IpRanges (list) --

      One or more IP ranges.

      • (dict) --

        Describes an IP range.

        • CidrIp (string) --

          The CIDR range. You can either specify a CIDR range or a source security group, not both.

    • PrefixListIds (list) --

      (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

      • (dict) --

        The ID of the prefix.

        • PrefixListId (string) --

          The ID of the prefix.

returns

None

RevokeSecurityGroupIngress (updated) Link ¶
Changes (request)
{'IpPermissions': {'UserIdGroupPairs': {'PeeringStatus': 'string',
                                        'VpcId': 'string',
                                        'VpcPeeringConnectionId': 'string'}}}

Removes one or more ingress rules from a security group. The values that you specify in the revoke request (for example, ports) must match the existing rule's values for the rule to be removed.

Each rule consists of the protocol and the CIDR range or source security group. For the TCP and UDP protocols, you must also specify the destination port or range of ports. For the ICMP protocol, you must also specify the ICMP type and code.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Request Syntax

client.revoke_security_group_ingress(
    DryRun=True|False,
    GroupName='string',
    GroupId='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    IpProtocol='string',
    FromPort=123,
    ToPort=123,
    CidrIp='string',
    IpPermissions=[
        {
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'UserId': 'string',
                    'GroupName': 'string',
                    'GroupId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string',
                    'PeeringStatus': 'string'
                },
            ],
            'IpRanges': [
                {
                    'CidrIp': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'PrefixListId': 'string'
                },
            ]
        },
    ]
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type GroupName

string

param GroupName

[EC2-Classic, default VPC] The name of the security group.

type GroupId

string

param GroupId

The ID of the security group. Required for a security group in a nondefault VPC.

type SourceSecurityGroupName

string

param SourceSecurityGroupName

[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. For EC2-VPC, the source security group must be in the same VPC.

type SourceSecurityGroupOwnerId

string

param SourceSecurityGroupOwnerId

[EC2-Classic, default VPC] The AWS account ID of the source security group. For EC2-VPC, the source security group must be in the same VPC. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.

type IpProtocol

string

param IpProtocol

The IP protocol name ( tcp , udp , icmp ) or number (see Protocol Numbers ). Use -1 to specify all.

type FromPort

integer

param FromPort

The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all ICMP types.

type ToPort

integer

param ToPort

The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all ICMP codes for the ICMP type.

type CidrIp

string

param CidrIp

The CIDR IP address range. You can't specify this parameter when specifying a source security group.

type IpPermissions

list

param IpPermissions

A set of IP permissions. You can't specify a source security group and a CIDR IP address range.

  • (dict) --

    Describes a security group rule.

    • IpProtocol (string) --

      The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers ).

      [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

    • FromPort (integer) --

      The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

    • ToPort (integer) --

      The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

    • UserIdGroupPairs (list) --

      One or more security group and AWS account ID pairs.

      • (dict) --

        Describes a security group and AWS account ID pair.

        • UserId (string) --

          The ID of an AWS account.

        • GroupName (string) --

          The name of the security group. In a request, use this parameter for a security group in EC2-Classic or a default VPC only. For a security group in a nondefault VPC, use GroupId .

        • GroupId (string) --

          The ID of the security group.

        • VpcId (string) --

          The ID of the VPC for the referenced security group, if applicable.

        • VpcPeeringConnectionId (string) --

          The ID of the VPC peering connection, if applicable.

        • PeeringStatus (string) --

          The status of a VPC peering connection, if applicable.

    • IpRanges (list) --

      One or more IP ranges.

      • (dict) --

        Describes an IP range.

        • CidrIp (string) --

          The CIDR range. You can either specify a CIDR range or a source security group, not both.

    • PrefixListIds (list) --

      (Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

      • (dict) --

        The ID of the prefix.

        • PrefixListId (string) --

          The ID of the prefix.

returns

None

RunInstances (updated) Link ¶
Changes (request, response)
Request
{'InstanceType': {'g2.8xlarge'}}
Response
{'Instances': {'InstanceLifecycle': {'scheduled'},
               'InstanceType': {'g2.8xlarge'}}}

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.

To ensure faster instance launches, break up large requests into smaller batches. For example, create five separate launch requests for 100 instances each instead of one launch request for 500 instances.

If you don't specify a security group when launching an instance, Amazon EC2 uses the default security group. For more information, see Security Groups in the Amazon Elastic Compute Cloud User Guide .

[EC2-VPC only accounts] If you don't specify a subnet in the request, we choose a default subnet from your default VPC for you.

[EC2-Classic accounts] If you're launching into EC2-Classic and you don't specify an Availability Zone, we choose one for you.

Linux instances have access to the public key of the key pair at boot. You can use this key to provide secure access to the instance. Amazon EC2 public images use this feature to provide secure access without passwords. For more information, see Key Pairs in the Amazon Elastic Compute Cloud User Guide .

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

If any of the AMIs have a product code attached for which the user has not subscribed, RunInstances fails.

Some 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, see Instance Types Available Only in a VPC.

For more information about troubleshooting, see What To Do If An Instance Immediately Terminates, and Troubleshooting Connecting to Your Instance in the Amazon Elastic Compute Cloud User Guide .

Request Syntax

client.run_instances(
    DryRun=True|False,
    ImageId='string',
    MinCount=123,
    MaxCount=123,
    KeyName='string',
    SecurityGroups=[
        'string',
    ],
    SecurityGroupIds=[
        'string',
    ],
    UserData='string',
    InstanceType='t1.micro'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge',
    Placement={
        'AvailabilityZone': 'string',
        'GroupName': 'string',
        'Tenancy': 'default'|'dedicated'|'host',
        'HostId': 'string',
        'Affinity': 'string'
    },
    KernelId='string',
    RamdiskId='string',
    BlockDeviceMappings=[
        {
            'VirtualName': 'string',
            'DeviceName': 'string',
            'Ebs': {
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'DeleteOnTermination': True|False,
                'VolumeType': 'standard'|'io1'|'gp2',
                'Iops': 123,
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    Monitoring={
        'Enabled': True|False
    },
    SubnetId='string',
    DisableApiTermination=True|False,
    InstanceInitiatedShutdownBehavior='stop'|'terminate',
    PrivateIpAddress='string',
    ClientToken='string',
    AdditionalInfo='string',
    NetworkInterfaces=[
        {
            'NetworkInterfaceId': 'string',
            'DeviceIndex': 123,
            'SubnetId': 'string',
            'Description': 'string',
            'PrivateIpAddress': 'string',
            'Groups': [
                'string',
            ],
            'DeleteOnTermination': True|False,
            'PrivateIpAddresses': [
                {
                    'PrivateIpAddress': 'string',
                    'Primary': True|False
                },
            ],
            'SecondaryPrivateIpAddressCount': 123,
            'AssociatePublicIpAddress': True|False
        },
    ],
    IamInstanceProfile={
        'Arn': 'string',
        'Name': 'string'
    },
    EbsOptimized=True|False
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

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 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 do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

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

Data to configure the instance, or a script to run during instance launch. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). For API calls, the text must be base64-encoded. For command line tools, the encoding is performed for you, and you can load the text from a file.

type InstanceType

string

param InstanceType

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

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. The host tenancy is not supported for the ImportInstance command.

  • HostId (string) --

    The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.

  • Affinity (string) --

    The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.

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 .

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 .

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

      • SnapshotId (string) --

        The ID of the snapshot.

      • VolumeSize (integer) --

        The size of the volume, in GiB.

        Constraints: 1-1024 for standard volumes, 1-16384 for gp2 volumes, and 4-16384 for io1 volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.

        Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

      • DeleteOnTermination (boolean) --

        Indicates whether the EBS volume is deleted on instance termination.

      • VolumeType (string) --

        The volume type. gp2 for General Purpose (SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic volumes.

        Default: standard

      • Iops (integer) --

        The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS (SSD) volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose (SSD) volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information on General Purpose (SSD) baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud User Guide .

        Constraint: Range is 100 to 20000 for Provisioned IOPS (SSD) volumes and 3 to 10000 for General Purpose (SSD) volumes.

        Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create standard or gp2 volumes.

      • Encrypted (boolean) --

        Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to instances that support Amazon EBS encryption.

    • NoDevice (string) --

      Suppresses the specified device included in the block device mapping of the AMI.

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 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'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'cr1.8xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'hi1.4xlarge'|'hs1.8xlarge'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'cc1.4xlarge'|'cc2.8xlarge'|'g2.2xlarge'|'g2.8xlarge'|'cg1.4xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge',
            'LaunchTime': datetime(2015, 1, 1),
            'Placement': {
                'AvailabilityZone': 'string',
                'GroupName': 'string',
                'Tenancy': 'default'|'dedicated'|'host',
                'HostId': 'string',
                'Affinity': 'string'
            },
            'KernelId': 'string',
            'RamdiskId': 'string',
            'Platform': 'Windows',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            },
            'SubnetId': 'string',
            'VpcId': 'string',
            'PrivateIpAddress': 'string',
            'PublicIpAddress': 'string',
            'StateReason': {
                'Code': 'string',
                'Message': 'string'
            },
            'Architecture': 'i386'|'x86_64',
            'RootDeviceType': 'ebs'|'instance-store',
            'RootDeviceName': 'string',
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'Ebs': {
                        'VolumeId': 'string',
                        'Status': 'attaching'|'attached'|'detaching'|'detached',
                        'AttachTime': datetime(2015, 1, 1),
                        'DeleteOnTermination': True|False
                    }
                },
            ],
            'VirtualizationType': 'hvm'|'paravirtual',
            'InstanceLifecycle': 'spot'|'scheduled',
            '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) --

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

      [EC2-Classic only] One or more security groups.

      • (dict) --

        Describes a security group.

        • GroupName (string) --

          The name of the security group.

        • GroupId (string) --

          The ID of the security group.

    • Instances (list) --

      One or more instances.

      • (dict) --

        Describes an instance.

        • InstanceId (string) --

          The ID of the instance.

        • ImageId (string) --

          The ID of the AMI used to launch the instance.

        • State (dict) --

          The current state of the instance.

          • Code (integer) --

            The low byte represents the state. The high byte is an opaque internal value and should be ignored.

            • 0 : pending

            • 16 : running

            • 32 : shutting-down

            • 48 : terminated

            • 64 : stopping

            • 80 : stopped

          • Name (string) --

            The current state of the instance.

        • PrivateDnsName (string) --

          The private DNS name assigned to the instance. This DNS name can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

        • PublicDnsName (string) --

          The public DNS name assigned to the instance. This name is not available until the instance enters the running state. For EC2-VPC, this name is only available if you've enabled DNS hostnames for your VPC.

        • StateTransitionReason (string) --

          The reason for the most recent state transition. This might be an empty string.

        • KeyName (string) --

          The name of the key pair, if this instance was launched with an associated key pair.

        • AmiLaunchIndex (integer) --

          The AMI launch index, which can be used to find this instance in the launch group.

        • ProductCodes (list) --

          The product codes attached to this instance, if applicable.

          • (dict) --

            Describes a product code.

            • ProductCodeId (string) --

              The product code.

            • ProductCodeType (string) --

              The type of product code.

        • InstanceType (string) --

          The instance type.

        • LaunchTime (datetime) --

          The time the instance was launched.

        • Placement (dict) --

          The location where the instance launched, if applicable.

          • AvailabilityZone (string) --

            The Availability Zone of the instance.

          • GroupName (string) --

            The name of the placement group the instance is in (for cluster compute instances).

          • Tenancy (string) --

            The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for the ImportInstance command.

          • HostId (string) --

            The ID of the Dedicted host on which the instance resides. This parameter is not support for the ImportInstance command.

          • Affinity (string) --

            The affinity setting for the instance on the Dedicated host. This parameter is not supported for the ImportInstance command.

        • KernelId (string) --

          The kernel associated with this instance, if applicable.

        • RamdiskId (string) --

          The RAM disk associated with this instance, if applicable.

        • Platform (string) --

          The value is Windows for Windows instances; otherwise blank.

        • Monitoring (dict) --

          The monitoring information for the instance.

          • State (string) --

            Indicates whether monitoring is enabled for the instance.

        • SubnetId (string) --

          [EC2-VPC] The ID of the subnet in which the instance is running.

        • VpcId (string) --

          [EC2-VPC] The ID of the VPC in which the instance is running.

        • PrivateIpAddress (string) --

          The private IP address assigned to the instance.

        • PublicIpAddress (string) --

          The public IP address assigned to the instance, if applicable.

        • StateReason (dict) --

          The reason for the most recent state transition.

          • Code (string) --

            The reason code for the state change.

          • Message (string) --

            The message for the state change.

            • Server.SpotInstanceTermination : A Spot instance was terminated due to an increase in the market price.

            • Server.InternalError : An internal error occurred during instance launch, resulting in termination.

            • Server.InsufficientInstanceCapacity : There was insufficient instance capacity to satisfy the launch request.

            • Client.InternalError : A client error caused the instance to terminate on launch.

            • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.

            • Client.UserInitiatedShutdown : The instance was shut down using the Amazon EC2 API.

            • Client.VolumeLimitExceeded : The limit on the number of EBS volumes or total storage was exceeded. Decrease usage or request an increase in your limits.

            • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.

        • Architecture (string) --

          The architecture of the image.

        • RootDeviceType (string) --

          The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

        • RootDeviceName (string) --

          The root device name (for example, /dev/sda1 or /dev/xvda ).

        • BlockDeviceMappings (list) --

          Any block device mapping entries for the instance.

          • (dict) --

            Describes a block device mapping.

            • DeviceName (string) --

              The device name exposed to the instance (for example, /dev/sdh or xvdh ).

            • Ebs (dict) --

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • VolumeId (string) --

                The ID of the EBS volume.

              • Status (string) --

                The attachment state.

              • AttachTime (datetime) --

                The time stamp when the attachment initiated.

              • DeleteOnTermination (boolean) --

                Indicates whether the volume is deleted on instance termination.

        • VirtualizationType (string) --

          The virtualization type of the instance.

        • InstanceLifecycle (string) --

          Indicates whether this is a Spot instance or a Scheduled Instance.

        • SpotInstanceRequestId (string) --

          If the request is a Spot instance request, the ID of the request.

        • ClientToken (string) --

          The idempotency token you provided when you launched the instance, if applicable.

        • Tags (list) --

          Any tags assigned to the instance.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws:

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode characters.

        • SecurityGroups (list) --

          One or more security groups for the instance.

          • (dict) --

            Describes a security group.

            • GroupName (string) --

              The name of the security group.

            • GroupId (string) --

              The ID of the security group.

        • SourceDestCheck (boolean) --

          Specifies whether to enable an instance launched in a VPC to perform NAT. This controls whether source/destination checking is enabled on the instance. A value of true means checking is enabled, and false means checking is disabled. The value must be false for the instance to perform NAT. For more information, see NAT Instances in the Amazon Virtual Private Cloud User Guide .

        • Hypervisor (string) --

          The hypervisor type of the instance.

        • NetworkInterfaces (list) --

          [EC2-VPC] One or more network interfaces for the instance.

          • (dict) --

            Describes a network interface.

            • NetworkInterfaceId (string) --

              The ID of the network interface.

            • SubnetId (string) --

              The ID of the subnet.

            • VpcId (string) --

              The ID of the VPC.

            • Description (string) --

              The description.

            • OwnerId (string) --

              The ID of the AWS account that created the network interface.

            • Status (string) --

              The status of the network interface.

            • MacAddress (string) --

              The MAC address.

            • PrivateIpAddress (string) --

              The IP address of the network interface within the subnet.

            • PrivateDnsName (string) --

              The private DNS name.

            • SourceDestCheck (boolean) --

              Indicates whether to validate network traffic to or from this network interface.

            • Groups (list) --

              One or more security groups.

              • (dict) --

                Describes a security group.

                • GroupName (string) --

                  The name of the security group.

                • GroupId (string) --

                  The ID of the security group.

            • Attachment (dict) --

              The network interface attachment.

              • AttachmentId (string) --

                The ID of the network interface attachment.

              • DeviceIndex (integer) --

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

              • Status (string) --

                The attachment state.

              • AttachTime (datetime) --

                The time stamp when the attachment initiated.

              • DeleteOnTermination (boolean) --

                Indicates whether the network interface is deleted when the instance is terminated.

            • Association (dict) --

              The association information for an Elastic IP associated with the network interface.

              • PublicIp (string) --

                The public IP address or Elastic IP address bound to the network interface.

              • PublicDnsName (string) --

                The public DNS name.

              • IpOwnerId (string) --

                The ID of the owner of the Elastic IP address.

            • PrivateIpAddresses (list) --

              The private IP addresses associated with the network interface.

              • (dict) --

                Describes a private IP address.

                • PrivateIpAddress (string) --

                  The private IP address of the network interface.

                • PrivateDnsName (string) --

                  The private DNS name.

                • Primary (boolean) --

                  Indicates whether this IP address is the primary private IP address of the network interface.

                • Association (dict) --

                  The association information for an Elastic IP address for the network interface.

                  • PublicIp (string) --

                    The public IP address or Elastic IP address bound to the network interface.

                  • PublicDnsName (string) --

                    The public DNS name.

                  • IpOwnerId (string) --

                    The ID of the owner of the Elastic IP address.

        • IamInstanceProfile (dict) --

          The IAM instance profile associated with the instance, if applicable.

          • Arn (string) --

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

          • Id (string) --

            The ID of the instance profile.

        • EbsOptimized (boolean) --

          Indicates whether the instance is optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.

        • SriovNetSupport (string) --

          Specifies whether enhanced networking is enabled.