EC2

Client

class EC2.Client

A low-level client representing Amazon Elastic Compute Cloud (EC2)

Amazon Elastic Compute Cloud (Amazon EC2) provides secure and resizable computing capacity in the Amazon Web Services Cloud. Using Amazon EC2 eliminates the need to invest in hardware up front, so you can develop and deploy applications faster. Amazon Virtual Private Cloud (Amazon VPC) enables you to provision a logically isolated section of the Amazon Web Services Cloud where you can launch Amazon Web Services resources in a virtual network that you've defined. Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. EBS volumes are highly available and reliable storage volumes that can be attached to any running instance and used like a hard drive.

To learn more, see the following resources:

import boto3

client = boto3.client('ec2')

These are the available methods:

accept_reserved_instances_exchange_quote(**kwargs)

Accepts the Convertible Reserved Instance exchange quote described in the GetReservedInstancesExchangeQuote call.

See also: AWS API Documentation

Request Syntax

response = client.accept_reserved_instances_exchange_quote(
    DryRun=True|False,
    ReservedInstanceIds=[
        'string',
    ],
    TargetConfigurations=[
        {
            'InstanceCount': 123,
            'OfferingId': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ReservedInstanceIds (list) --

    [REQUIRED]

    The IDs of the Convertible Reserved Instances to exchange for another Convertible Reserved Instance of the same or higher value.

    • (string) --
  • TargetConfigurations (list) --

    The configuration of the target Convertible Reserved Instance to exchange for your current Convertible Reserved Instances.

    • (dict) --

      Details about the target configuration.

      • InstanceCount (integer) --

        The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

      • OfferingId (string) -- [REQUIRED]

        The Convertible Reserved Instance offering ID.

Return type

dict

Returns

Response Syntax

{
    'ExchangeId': 'string'
}

Response Structure

  • (dict) --

    The result of the exchange and whether it was successful .

    • ExchangeId (string) --

      The ID of the successful exchange.

accept_transit_gateway_multicast_domain_associations(**kwargs)

Accepts a request to associate subnets with a transit gateway multicast domain.

See also: AWS API Documentation

Request Syntax

response = client.accept_transit_gateway_multicast_domain_associations(
    TransitGatewayMulticastDomainId='string',
    TransitGatewayAttachmentId='string',
    SubnetIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • TransitGatewayAttachmentId (string) -- The ID of the transit gateway attachment.
  • SubnetIds (list) --

    The IDs of the subnets to associate with the transit gateway multicast domain.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Associations': {
        'TransitGatewayMulticastDomainId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'ResourceOwnerId': 'string',
        'Subnets': [
            {
                'SubnetId': 'string',
                'State': 'pendingAcceptance'|'associating'|'associated'|'disassociating'|'disassociated'|'rejected'|'failed'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Associations (dict) --

      Describes the multicast domain associations.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The type of resource, for example a VPC attachment.

      • ResourceOwnerId (string) --

        The ID of the Amazon Web Services account that owns the resource.

      • Subnets (list) --

        The subnets associated with the multicast domain.

        • (dict) --

          Describes the subnet association with the transit gateway multicast domain.

          • SubnetId (string) --

            The ID of the subnet.

          • State (string) --

            The state of the subnet association.

accept_transit_gateway_peering_attachment(**kwargs)

Accepts a transit gateway peering attachment request. The peering attachment must be in the pendingAcceptance state.

See also: AWS API Documentation

Request Syntax

response = client.accept_transit_gateway_peering_attachment(
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the transit gateway attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPeeringAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'AccepterTransitGatewayAttachmentId': 'string',
        'RequesterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'AccepterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'Options': {
            'DynamicRouting': 'enable'|'disable'
        },
        'Status': {
            'Code': 'string',
            'Message': 'string'
        },
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPeeringAttachment (dict) --

      The transit gateway peering attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway peering attachment.

      • AccepterTransitGatewayAttachmentId (string) --

        The ID of the accepter transit gateway attachment.

      • RequesterTgwInfo (dict) --

        Information about the requester transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • AccepterTgwInfo (dict) --

        Information about the accepter transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • Options (dict) --

        Details about the transit gateway peering attachment.

        • DynamicRouting (string) --

          Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.

      • Status (dict) --

        The status of the transit gateway peering attachment.

        • Code (string) --

          The status code.

        • Message (string) --

          The status message, if applicable.

      • State (string) --

        The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

      • CreationTime (datetime) --

        The time the transit gateway peering attachment was created.

      • Tags (list) --

        The tags for the transit gateway peering attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

accept_transit_gateway_vpc_attachment(**kwargs)

Accepts a request to attach a VPC to a transit gateway.

The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment to reject a VPC attachment request.

See also: AWS API Documentation

Request Syntax

response = client.accept_transit_gateway_vpc_attachment(
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayVpcAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayId': 'string',
        'VpcId': 'string',
        'VpcOwnerId': 'string',
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'SubnetIds': [
            'string',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'DnsSupport': 'enable'|'disable',
            'Ipv6Support': 'enable'|'disable',
            'ApplianceModeSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayVpcAttachment (dict) --

      The VPC attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • VpcId (string) --

        The ID of the VPC.

      • VpcOwnerId (string) --

        The ID of the Amazon Web Services account that owns the VPC.

      • State (string) --

        The state of the VPC attachment. Note that the initiating state has been deprecated.

      • SubnetIds (list) --

        The IDs of the subnets.

        • (string) --
      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The VPC attachment options.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • Ipv6Support (string) --

          Indicates whether IPv6 support is disabled.

        • ApplianceModeSupport (string) --

          Indicates whether appliance mode support is enabled.

      • Tags (list) --

        The tags for the VPC attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

accept_vpc_endpoint_connections(**kwargs)

Accepts one or more interface VPC endpoint connection requests to your VPC endpoint service.

See also: AWS API Documentation

Request Syntax

response = client.accept_vpc_endpoint_connections(
    DryRun=True|False,
    ServiceId='string',
    VpcEndpointIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the VPC endpoint service.

  • VpcEndpointIds (list) --

    [REQUIRED]

    The IDs of one or more interface VPC endpoints.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Unsuccessful (list) --

      Information about the interface endpoints that were not accepted, if applicable.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

accept_vpc_peering_connection(**kwargs)

Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance state, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.

For an inter-Region VPC peering connection request, you must accept the VPC peering connection in the Region of the accepter VPC.

See also: AWS API Documentation

Request Syntax

response = client.accept_vpc_peering_connection(
    DryRun=True|False,
    VpcPeeringConnectionId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionId (string) -- The ID of the VPC peering connection. You must specify this parameter in the request.
Return type

dict

Returns

Response Syntax

{
    'VpcPeeringConnection': {
        'AccepterVpcInfo': {
            'CidrBlock': 'string',
            'Ipv6CidrBlockSet': [
                {
                    'Ipv6CidrBlock': 'string'
                },
            ],
            'CidrBlockSet': [
                {
                    'CidrBlock': 'string'
                },
            ],
            'OwnerId': 'string',
            'PeeringOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            },
            'VpcId': 'string',
            'Region': 'string'
        },
        'ExpirationTime': datetime(2015, 1, 1),
        'RequesterVpcInfo': {
            'CidrBlock': 'string',
            'Ipv6CidrBlockSet': [
                {
                    'Ipv6CidrBlock': 'string'
                },
            ],
            'CidrBlockSet': [
                {
                    'CidrBlock': 'string'
                },
            ],
            'OwnerId': 'string',
            'PeeringOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            },
            'VpcId': 'string',
            'Region': 'string'
        },
        'Status': {
            'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
            'Message': 'string'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VpcPeeringConnectionId': 'string'
    }
}

Response Structure

  • (dict) --

    • VpcPeeringConnection (dict) --

      Information about the VPC peering connection.

      • AccepterVpcInfo (dict) --

        Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

        • CidrBlock (string) --

          The IPv4 CIDR block for the VPC.

        • Ipv6CidrBlockSet (list) --

          The IPv6 CIDR block for the VPC.

          • (dict) --

            Describes an IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

        • CidrBlockSet (list) --

          Information about the IPv4 CIDR blocks for the VPC.

          • (dict) --

            Describes an IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • PeeringOptions (dict) --

          Information about the VPC peering connection options for the accepter or requester VPC.

          • AllowDnsResolutionFromRemoteVpc (boolean) --

            Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

            Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

            Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

        • VpcId (string) --

          The ID of the VPC.

        • Region (string) --

          The Region in which the VPC is located.

      • ExpirationTime (datetime) --

        The time that an unaccepted VPC peering connection will expire.

      • RequesterVpcInfo (dict) --

        Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

        • CidrBlock (string) --

          The IPv4 CIDR block for the VPC.

        • Ipv6CidrBlockSet (list) --

          The IPv6 CIDR block for the VPC.

          • (dict) --

            Describes an IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

        • CidrBlockSet (list) --

          Information about the IPv4 CIDR blocks for the VPC.

          • (dict) --

            Describes an IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • PeeringOptions (dict) --

          Information about the VPC peering connection options for the accepter or requester VPC.

          • AllowDnsResolutionFromRemoteVpc (boolean) --

            Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

            Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

            Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

        • VpcId (string) --

          The ID of the VPC.

        • Region (string) --

          The Region in which the VPC is located.

      • Status (dict) --

        The status of the VPC peering connection.

        • Code (string) --

          The status of the VPC peering connection.

        • Message (string) --

          A message that provides more information about the status, if applicable.

      • 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 256 Unicode characters.

      • VpcPeeringConnectionId (string) --

        The ID of the VPC peering connection.

advertise_byoip_cidr(**kwargs)

Advertises an IPv4 or IPv6 address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP).

You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time.

We recommend that you stop advertising the BYOIP CIDR from other locations when you advertise it from Amazon Web Services. To minimize down time, you can configure your Amazon Web Services resources to use an address from a BYOIP CIDR before it is advertised, and then simultaneously stop advertising it from the current location and start advertising it through Amazon Web Services.

It can take a few minutes before traffic to the specified addresses starts routing to Amazon Web Services because of BGP propagation delays.

To stop advertising the BYOIP CIDR, use WithdrawByoipCidr .

See also: AWS API Documentation

Request Syntax

response = client.advertise_byoip_cidr(
    Cidr='string',
    DryRun=True|False
)
Parameters
  • Cidr (string) --

    [REQUIRED]

    The address range, in CIDR notation. This must be the exact range that you provisioned. You can't advertise only a portion of the provisioned range.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ByoipCidr': {
        'Cidr': 'string',
        'Description': 'string',
        'StatusMessage': 'string',
        'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable'
    }
}

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address range.

      • Cidr (string) --

        The address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

        Upon success, contains the ID of the address pool. Otherwise, contains an error message.

      • State (string) --

        The state of the address pool.

allocate_address(**kwargs)

Allocates an Elastic IP address to your Amazon Web Services account. After you allocate the Elastic IP address you can associate it with an instance or network interface. After you release an Elastic IP address, it is released to the IP address pool and can be allocated to a different Amazon Web Services account.

You can allocate an Elastic IP address from an address pool owned by Amazon Web Services or from an address pool created from a public IPv4 address range that you have brought to Amazon Web Services for use with your Amazon Web Services resources using bring your own IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses (BYOIP) in the Amazon Elastic Compute Cloud User Guide .

[EC2-VPC] If you release an Elastic IP address, you might be able to recover it. You cannot recover an Elastic IP address that you released after it is allocated to another Amazon Web Services account. You cannot recover an Elastic IP address for EC2-Classic. To attempt to recover an Elastic IP address that you released, specify it in this operation.

An Elastic IP address is for use either in the EC2-Classic platform or in a VPC. By default, you can allocate 5 Elastic IP addresses for EC2-Classic per Region and 5 Elastic IP addresses for EC2-VPC per Region.

For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

You can allocate a carrier IP address which is a public IP address from a telecommunication carrier, to a network interface which resides in a subnet in a Wavelength Zone (for example an EC2 instance).

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.allocate_address(
    Domain='vpc'|'standard',
    Address='string',
    PublicIpv4Pool='string',
    NetworkBorderGroup='string',
    CustomerOwnedIpv4Pool='string',
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • Domain (string) --

    Indicates whether the Elastic IP address is for use with instances in a VPC or instances in EC2-Classic.

    Default: If the Region supports EC2-Classic, the default is standard . Otherwise, the default is vpc .

  • Address (string) -- [EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address pool.
  • PublicIpv4Pool (string) -- The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. To specify a specific address from the address pool, use the Address parameter instead.
  • NetworkBorderGroup (string) --

    A unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses. Use this parameter to limit the IP address to this location. IP addresses cannot move between network border groups.

    Use DescribeAvailabilityZones to view the network border groups.

    You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 Classic, you receive an InvalidParameterCombination error.

  • CustomerOwnedIpv4Pool (string) -- The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 select an address from the address pool. Alternatively, specify a specific address from the address pool.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to assign to the Elastic IP address.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'PublicIp': 'string',
    'AllocationId': 'string',
    'PublicIpv4Pool': 'string',
    'NetworkBorderGroup': 'string',
    'Domain': 'vpc'|'standard',
    'CustomerOwnedIp': 'string',
    'CustomerOwnedIpv4Pool': 'string',
    'CarrierIp': 'string'
}

Response Structure

  • (dict) --

    • PublicIp (string) --

      The Elastic IP address.

    • AllocationId (string) --

      [EC2-VPC] The ID that Amazon Web Services assigns to represent the allocation of the Elastic IP address for use with instances in a VPC.

    • PublicIpv4Pool (string) --

      The ID of an address pool.

    • NetworkBorderGroup (string) --

      The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

    • Domain (string) --

      Indicates whether the Elastic IP address is for use with instances in a VPC (vpc ) or instances in EC2-Classic (standard ).

    • CustomerOwnedIp (string) --

      The customer-owned IP address.

    • CustomerOwnedIpv4Pool (string) --

      The ID of the customer-owned address pool.

    • CarrierIp (string) --

      The carrier IP address. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance).

Examples

This example allocates an Elastic IP address to use with an instance in a VPC.

response = client.allocate_address(
    Domain='vpc',
)

print(response)

Expected Output:

{
    'AllocationId': 'eipalloc-64d5890a',
    'Domain': 'vpc',
    'PublicIp': '203.0.113.0',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example allocates an Elastic IP address to use with an instance in EC2-Classic.

response = client.allocate_address(
)

print(response)

Expected Output:

{
    'Domain': 'standard',
    'PublicIp': '198.51.100.0',
    'ResponseMetadata': {
        '...': '...',
    },
}
allocate_hosts(**kwargs)

Allocates a Dedicated Host to your account. At a minimum, specify the supported instance type or instance family, the Availability Zone in which to allocate the host, and the number of hosts to allocate.

See also: AWS API Documentation

Request Syntax

response = client.allocate_hosts(
    AutoPlacement='on'|'off',
    AvailabilityZone='string',
    ClientToken='string',
    InstanceType='string',
    InstanceFamily='string',
    Quantity=123,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    HostRecovery='on'|'off',
    OutpostArn='string'
)
Parameters
  • AutoPlacement (string) --

    Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID. For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide .

    Default: on

  • AvailabilityZone (string) --

    [REQUIRED]

    The Availability Zone in which to allocate the Dedicated Host.

  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
  • InstanceType (string) --

    Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.

    If you want the Dedicated Hosts to support multiple instance types in a specific instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

  • InstanceFamily (string) --

    Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the Dedicated Hosts support multiple instance types within that instance family.

    If you want the Dedicated Hosts to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

  • Quantity (integer) --

    [REQUIRED]

    The number of Dedicated Hosts to allocate to your account with these parameters.

  • TagSpecifications (list) --

    The tags to apply to the Dedicated Host during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • HostRecovery (string) --

    Indicates whether to enable or disable host recovery for the Dedicated Host. Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide .

    Default: off

  • OutpostArn (string) -- The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to allocate the Dedicated Host.
Return type

dict

Returns

Response Syntax

{
    'HostIds': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Contains the output of AllocateHosts.

    • HostIds (list) --

      The ID of the allocated Dedicated Host. This is used to launch an instance onto a specific host.

      • (string) --

allocate_ipam_pool_cidr(**kwargs)

Allocate a CIDR from an IPAM pool. In IPAM, an allocation is a CIDR assignment from an IPAM pool to another resource or IPAM pool. For more information, see Allocate CIDRs in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.allocate_ipam_pool_cidr(
    DryRun=True|False,
    IpamPoolId='string',
    Cidr='string',
    NetmaskLength=123,
    ClientToken='string',
    Description='string',
    PreviewNextCidr=True|False,
    DisallowedCidrs=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool from which you would like to allocate a CIDR.

  • Cidr (string) --

    The CIDR you would like to allocate from the IPAM pool. Note the following:

    • If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
    • If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.

    Possible values: Any available IPv4 or IPv6 CIDR.

  • NetmaskLength (integer) --

    The netmask length of the CIDR you would like to allocate from the IPAM pool. Note the following:

    • If there is no DefaultNetmaskLength allocation rule set on the pool, you must specify either the NetmaskLength or the CIDR.
    • If the DefaultNetmaskLength allocation rule is set on the pool, you can specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength allocation rule will be ignored.

    Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • Description (string) -- A description for the allocation.
  • PreviewNextCidr (boolean) -- A preview of the next available CIDR in a pool.
  • DisallowedCidrs (list) --

    Exclude a particular CIDR range from being returned by the pool.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'IpamPoolAllocation': {
        'Cidr': 'string',
        'IpamPoolAllocationId': 'string',
        'Description': 'string',
        'ResourceId': 'string',
        'ResourceType': 'ipam-pool'|'vpc'|'ec2-public-ipv4-pool'|'custom',
        'ResourceRegion': 'string',
        'ResourceOwner': 'string'
    }
}

Response Structure

  • (dict) --

    • IpamPoolAllocation (dict) --

      Information about the allocation created.

      • Cidr (string) --

        The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .

      • IpamPoolAllocationId (string) --

        The ID of an allocation.

      • Description (string) --

        A description of the pool allocation.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The type of the resource.

      • ResourceRegion (string) --

        The Amazon Web Services Region of the resource.

      • ResourceOwner (string) --

        The owner of the resource.

apply_security_groups_to_client_vpn_target_network(**kwargs)

Applies a security group to the association between the target network and the Client VPN endpoint. This action replaces the existing security groups with the specified security groups.

See also: AWS API Documentation

Request Syntax

response = client.apply_security_groups_to_client_vpn_target_network(
    ClientVpnEndpointId='string',
    VpcId='string',
    SecurityGroupIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC in which the associated target network is located.

  • SecurityGroupIds (list) --

    [REQUIRED]

    The IDs of the security groups to apply to the associated target network. Up to 5 security groups can be applied to an associated target network.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'SecurityGroupIds': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • SecurityGroupIds (list) --

      The IDs of the applied security groups.

      • (string) --

assign_ipv6_addresses(**kwargs)

Assigns one or more IPv6 addresses to the specified network interface. You can specify one or more specific IPv6 addresses, or you can specify the number of IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR block range. You can assign as many IPv6 addresses to a network interface as you can assign private IPv4 addresses, and the limit varies per instance type. For information, see IP Addresses Per Network Interface Per Instance Type in the Amazon Elastic Compute Cloud User Guide .

You must specify either the IPv6 addresses or the IPv6 address count in the request.

You can optionally use Prefix Delegation on the network interface. You must specify either the IPV6 Prefix Delegation prefixes, or the IPv6 Prefix Delegation count. For information, see Assigning prefixes to Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.assign_ipv6_addresses(
    Ipv6AddressCount=123,
    Ipv6Addresses=[
        'string',
    ],
    Ipv6PrefixCount=123,
    Ipv6Prefixes=[
        'string',
    ],
    NetworkInterfaceId='string'
)
Parameters
  • Ipv6AddressCount (integer) -- The number of additional IPv6 addresses to assign to the network interface. The specified number of IPv6 addresses are assigned in addition to the existing IPv6 addresses that are already assigned to the network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.
  • Ipv6Addresses (list) --

    One or more specific IPv6 addresses to be assigned to the network interface. You can't use this option if you're specifying a number of IPv6 addresses.

    • (string) --
  • Ipv6PrefixCount (integer) -- The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv6Prefixes option.
  • Ipv6Prefixes (list) --

    One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

    • (string) --
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

Return type

dict

Returns

Response Syntax

{
    'AssignedIpv6Addresses': [
        'string',
    ],
    'AssignedIpv6Prefixes': [
        'string',
    ],
    'NetworkInterfaceId': 'string'
}

Response Structure

  • (dict) --

    • AssignedIpv6Addresses (list) --

      The new IPv6 addresses assigned to the network interface. Existing IPv6 addresses that were assigned to the network interface before the request are not included.

      • (string) --
    • AssignedIpv6Prefixes (list) --

      The IPv6 prefixes that are assigned to the network interface.

      • (string) --
    • NetworkInterfaceId (string) --

      The ID of the network interface.

assign_private_ip_addresses(**kwargs)

Assigns one or more secondary private IP addresses to the specified network interface.

You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see Instance Types in the Amazon Elastic Compute Cloud User Guide . For more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

When you move a secondary private IP address to another network interface, any Elastic IP address that is associated with the IP address is also moved.

Remapping an IP address is an asynchronous operation. When you move an IP address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s in the instance metadata to confirm that the remapping is complete.

You must specify either the IP addresses or the IP address count in the request.

You can optionally use Prefix Delegation on the network interface. You must specify either the IPv4 Prefix Delegation prefixes, or the IPv4 Prefix Delegation count. For information, see Assigning prefixes to Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.assign_private_ip_addresses(
    AllowReassignment=True|False,
    NetworkInterfaceId='string',
    PrivateIpAddresses=[
        'string',
    ],
    SecondaryPrivateIpAddressCount=123,
    Ipv4Prefixes=[
        'string',
    ],
    Ipv4PrefixCount=123
)
Parameters
  • AllowReassignment (boolean) -- Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

  • PrivateIpAddresses (list) --

    One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.

    If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

    • (string) --
  • SecondaryPrivateIpAddressCount (integer) -- The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.
  • Ipv4Prefixes (list) --

    One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

    • (string) --
  • Ipv4PrefixCount (integer) -- The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv4 Prefixes option.
Return type

dict

Returns

Response Syntax

{
    'NetworkInterfaceId': 'string',
    'AssignedPrivateIpAddresses': [
        {
            'PrivateIpAddress': 'string'
        },
    ],
    'AssignedIpv4Prefixes': [
        {
            'Ipv4Prefix': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NetworkInterfaceId (string) --

      The ID of the network interface.

    • AssignedPrivateIpAddresses (list) --

      The private IP addresses assigned to the network interface.

      • (dict) --

        Describes the private IP addresses assigned to a network interface.

        • PrivateIpAddress (string) --

          The private IP address assigned to the network interface.

    • AssignedIpv4Prefixes (list) --

      The IPv4 prefixes that are assigned to the network interface.

Examples

This example assigns the specified secondary private IP address to the specified network interface.

response = client.assign_private_ip_addresses(
    NetworkInterfaceId='eni-e5aa89a3',
    PrivateIpAddresses=[
        '10.0.0.82',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example assigns two secondary private IP addresses to the specified network interface. Amazon EC2 automatically assigns these IP addresses from the available IP addresses in the CIDR block range of the subnet the network interface is associated with.

response = client.assign_private_ip_addresses(
    NetworkInterfaceId='eni-e5aa89a3',
    SecondaryPrivateIpAddressCount=2,
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
associate_address(**kwargs)

Associates an Elastic IP address, or carrier IP address (for instances that are in subnets in Wavelength Zones) with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

[Subnets in Wavelength Zones] You can associate an IP address from the telecommunication carrier to the instance or network interface.

You cannot associate an Elastic IP address with an interface in a different network border group.

Warning

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.associate_address(
    AllocationId='string',
    InstanceId='string',
    PublicIp='string',
    AllowReassociation=True|False,
    DryRun=True|False,
    NetworkInterfaceId='string',
    PrivateIpAddress='string'
)
Parameters
  • AllocationId (string) -- [EC2-VPC] The allocation ID. This is required for EC2-VPC.
  • InstanceId (string) -- The ID of the instance. The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.
  • PublicIp (string) -- [EC2-Classic] The Elastic IP address to associate with the instance. This is required for EC2-Classic.
  • AllowReassociation (boolean) -- [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceId (string) --

    [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

    For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

  • PrivateIpAddress (string) -- [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
Return type

dict

Returns

Response Syntax

{
    'AssociationId': 'string'
}

Response Structure

  • (dict) --

    • AssociationId (string) --

      [EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.

Examples

This example associates the specified Elastic IP address with the specified instance in a VPC.

response = client.associate_address(
    AllocationId='eipalloc-64d5890a',
    InstanceId='i-0b263919b6498b123',
)

print(response)

Expected Output:

{
    'AssociationId': 'eipassoc-2bebb745',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example associates the specified Elastic IP address with the specified network interface.

response = client.associate_address(
    AllocationId='eipalloc-64d5890a',
    NetworkInterfaceId='eni-1a2b3c4d',
)

print(response)

Expected Output:

{
    'AssociationId': 'eipassoc-2bebb745',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example associates an Elastic IP address with an instance in EC2-Classic.

response = client.associate_address(
    InstanceId='i-07ffe74c7330ebf53',
    PublicIp='198.51.100.0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
associate_client_vpn_target_network(**kwargs)

Associates a target network with a Client VPN endpoint. A target network is a subnet in a VPC. You can associate multiple subnets from the same VPC with a Client VPN endpoint. You can associate only one subnet in each Availability Zone. We recommend that you associate at least two subnets to provide Availability Zone redundancy.

If you specified a VPC when you created the Client VPN endpoint or if you have previous subnet associations, the specified subnet must be in the same VPC. To specify a subnet that's in a different VPC, you must first modify the Client VPN endpoint ( ModifyClientVpnEndpoint ) and change the VPC that's associated with it.

See also: AWS API Documentation

Request Syntax

response = client.associate_client_vpn_target_network(
    ClientVpnEndpointId='string',
    SubnetId='string',
    ClientToken='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • SubnetId (string) --

    [REQUIRED]

    The ID of the subnet to associate with the Client VPN endpoint.

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AssociationId': 'string',
    'Status': {
        'Code': 'associating'|'associated'|'association-failed'|'disassociating'|'disassociated',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • AssociationId (string) --

      The unique ID of the target network association.

    • Status (dict) --

      The current state of the target network association.

      • Code (string) --

        The state of the target network association.

      • Message (string) --

        A message about the status of the target network association, if applicable.

associate_dhcp_options(**kwargs)

Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.associate_dhcp_options(
    DhcpOptionsId='string',
    VpcId='string',
    DryRun=True|False
)
Parameters
  • DhcpOptionsId (string) --

    [REQUIRED]

    The ID of the DHCP options set, or default to associate no DHCP options with the VPC.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example associates the specified DHCP options set with the specified VPC.

response = client.associate_dhcp_options(
    DhcpOptionsId='dopt-d9070ebb',
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example associates the default DHCP options set with the specified VPC.

response = client.associate_dhcp_options(
    DhcpOptionsId='default',
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
associate_enclave_certificate_iam_role(**kwargs)

Associates an Identity and Access Management (IAM) role with an Certificate Manager (ACM) certificate. This enables the certificate to be used by the ACM for Nitro Enclaves application inside an enclave. For more information, see Certificate Manager for Nitro Enclaves in the Amazon Web Services Nitro Enclaves User Guide .

When the IAM role is associated with the ACM certificate, the certificate, certificate chain, and encrypted private key are placed in an Amazon S3 bucket that only the associated IAM role can access. The private key of the certificate is encrypted with an Amazon Web Services managed key that has an attached attestation-based key policy.

To enable the IAM role to access the Amazon S3 object, you must grant it permission to call s3:GetObject on the Amazon S3 bucket returned by the command. To enable the IAM role to access the KMS key, you must grant it permission to call kms:Decrypt on the KMS key returned by the command. For more information, see Grant the role permission to access the certificate and encryption key in the Amazon Web Services Nitro Enclaves User Guide .

See also: AWS API Documentation

Request Syntax

response = client.associate_enclave_certificate_iam_role(
    CertificateArn='string',
    RoleArn='string',
    DryRun=True|False
)
Parameters
  • CertificateArn (string) -- The ARN of the ACM certificate with which to associate the IAM role.
  • RoleArn (string) -- The ARN of the IAM role to associate with the ACM certificate. You can associate up to 16 IAM roles with an ACM certificate.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CertificateS3BucketName': 'string',
    'CertificateS3ObjectKey': 'string',
    'EncryptionKmsKeyId': 'string'
}

Response Structure

  • (dict) --

    • CertificateS3BucketName (string) --

      The name of the Amazon S3 bucket to which the certificate was uploaded.

    • CertificateS3ObjectKey (string) --

      The Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored. The object key is formatted as follows: role_arn /certificate_arn .

    • EncryptionKmsKeyId (string) --

      The ID of the KMS key used to encrypt the private key of the certificate.

associate_iam_instance_profile(**kwargs)

Associates an IAM instance profile with a running or stopped instance. You cannot associate more than one IAM instance profile with an instance.

See also: AWS API Documentation

Request Syntax

response = client.associate_iam_instance_profile(
    IamInstanceProfile={
        'Arn': 'string',
        'Name': 'string'
    },
    InstanceId='string'
)
Parameters
  • IamInstanceProfile (dict) --

    [REQUIRED]

    The IAM instance profile.

    • Arn (string) --

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

    • Name (string) --

      The name of the instance profile.

  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

Return type

dict

Returns

Response Syntax

{
    'IamInstanceProfileAssociation': {
        'AssociationId': 'string',
        'InstanceId': 'string',
        'IamInstanceProfile': {
            'Arn': 'string',
            'Id': 'string'
        },
        'State': 'associating'|'associated'|'disassociating'|'disassociated',
        'Timestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • IamInstanceProfileAssociation (dict) --

      Information about the IAM instance profile association.

      • AssociationId (string) --

        The ID of the association.

      • InstanceId (string) --

        The ID of the instance.

      • IamInstanceProfile (dict) --

        The IAM instance profile.

        • Arn (string) --

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

        • Id (string) --

          The ID of the instance profile.

      • State (string) --

        The state of the association.

      • Timestamp (datetime) --

        The time the IAM instance profile was associated with the instance.

Examples

This example associates an IAM instance profile named admin-role with the specified instance.

response = client.associate_iam_instance_profile(
    IamInstanceProfile={
        'Name': 'admin-role',
    },
    InstanceId='i-123456789abcde123',
)

print(response)

Expected Output:

{
    'IamInstanceProfileAssociation': {
        'AssociationId': 'iip-assoc-0e7736511a163c209',
        'IamInstanceProfile': {
            'Arn': 'arn:aws:iam::123456789012:instance-profile/admin-role',
            'Id': 'AIPAJBLK7RKJKWDXVHIEC',
        },
        'InstanceId': 'i-123456789abcde123',
        'State': 'associating',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
associate_instance_event_window(**kwargs)

Associates one or more targets with an event window. Only one type of target (instance IDs, Dedicated Host IDs, or tags) can be specified with an event window.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.associate_instance_event_window(
    DryRun=True|False,
    InstanceEventWindowId='string',
    AssociationTarget={
        'InstanceIds': [
            'string',
        ],
        'InstanceTags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'DedicatedHostIds': [
            'string',
        ]
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceEventWindowId (string) --

    [REQUIRED]

    The ID of the event window.

  • AssociationTarget (dict) --

    [REQUIRED]

    One or more targets associated with the specified event window.

    • InstanceIds (list) --

      The IDs of the instances to associate with the event window. If the instance is on a Dedicated Host, you can't specify the Instance ID parameter; you must use the Dedicated Host ID parameter.

      • (string) --
    • InstanceTags (list) --

      The instance tags to associate with the event window. Any instances associated with the tags will be associated with the event window.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

    • DedicatedHostIds (list) --

      The IDs of the Dedicated Hosts to associate with the event window.

      • (string) --
Return type

dict

Returns

Response Syntax

{
    'InstanceEventWindow': {
        'InstanceEventWindowId': 'string',
        'TimeRanges': [
            {
                'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'StartHour': 123,
                'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'EndHour': 123
            },
        ],
        'Name': 'string',
        'CronExpression': 'string',
        'AssociationTarget': {
            'InstanceIds': [
                'string',
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'DedicatedHostIds': [
                'string',
            ]
        },
        'State': 'creating'|'deleting'|'active'|'deleted',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • InstanceEventWindow (dict) --

      Information about the event window.

      • InstanceEventWindowId (string) --

        The ID of the event window.

      • TimeRanges (list) --

        One or more time ranges defined for the event window.

        • (dict) --

          The start day and time and the end day and time of the time range, in UTC.

          • StartWeekDay (string) --

            The day on which the time range begins.

          • StartHour (integer) --

            The hour when the time range begins.

          • EndWeekDay (string) --

            The day on which the time range ends.

          • EndHour (integer) --

            The hour when the time range ends.

      • Name (string) --

        The name of the event window.

      • CronExpression (string) --

        The cron expression defined for the event window.

      • AssociationTarget (dict) --

        One or more targets associated with the event window.

        • InstanceIds (list) --

          The IDs of the instances associated with the event window.

          • (string) --
        • Tags (list) --

          The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • DedicatedHostIds (list) --

          The IDs of the Dedicated Hosts associated with the event window.

          • (string) --
      • State (string) --

        The current state of the event window.

      • Tags (list) --

        The instance tags associated with the event window.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

associate_route_table(**kwargs)

Associates a subnet in your VPC or an internet gateway or virtual private gateway attached to your VPC with a route table in your VPC. This association causes traffic from the subnet or gateway to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table later. A route table can be associated with multiple subnets.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.associate_route_table(
    DryRun=True|False,
    RouteTableId='string',
    SubnetId='string',
    GatewayId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

  • SubnetId (string) -- The ID of the subnet.
  • GatewayId (string) -- The ID of the internet gateway or virtual private gateway.
Return type

dict

Returns

Response Syntax

{
    'AssociationId': 'string',
    'AssociationState': {
        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failed',
        'StatusMessage': 'string'
    }
}

Response Structure

  • (dict) --

    • AssociationId (string) --

      The route table association ID. This ID is required for disassociating the route table.

    • AssociationState (dict) --

      The state of the association.

      • State (string) --

        The state of the association.

      • StatusMessage (string) --

        The status message, if applicable.

Examples

This example associates the specified route table with the specified subnet.

response = client.associate_route_table(
    RouteTableId='rtb-22574640',
    SubnetId='subnet-9d4a7b6',
)

print(response)

Expected Output:

{
    'AssociationId': 'rtbassoc-781d0d1a',
    'ResponseMetadata': {
        '...': '...',
    },
}
associate_subnet_cidr_block(**kwargs)

Associates a CIDR block with your subnet. You can only associate a single IPv6 CIDR block with your subnet. An IPv6 CIDR block must have a prefix length of /64.

See also: AWS API Documentation

Request Syntax

response = client.associate_subnet_cidr_block(
    Ipv6CidrBlock='string',
    SubnetId='string'
)
Parameters
  • Ipv6CidrBlock (string) --

    [REQUIRED]

    The IPv6 CIDR block for your subnet. The subnet must have a /64 prefix length.

  • SubnetId (string) --

    [REQUIRED]

    The ID of your subnet.

Return type

dict

Returns

Response Syntax

{
    'Ipv6CidrBlockAssociation': {
        'AssociationId': 'string',
        'Ipv6CidrBlock': 'string',
        'Ipv6CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        }
    },
    'SubnetId': 'string'
}

Response Structure

  • (dict) --

    • Ipv6CidrBlockAssociation (dict) --

      Information about the IPv6 association.

      • AssociationId (string) --

        The ID of the association.

      • Ipv6CidrBlock (string) --

        The IPv6 CIDR block.

      • Ipv6CidrBlockState (dict) --

        The state of the CIDR block.

        • State (string) --

          The state of a CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

    • SubnetId (string) --

      The ID of the subnet.

associate_transit_gateway_multicast_domain(**kwargs)

Associates the specified subnets and transit gateway attachments with the specified transit gateway multicast domain.

The transit gateway attachment must be in the available state before you can add a resource. Use DescribeTransitGatewayAttachments to see the state of the attachment.

See also: AWS API Documentation

Request Syntax

response = client.associate_transit_gateway_multicast_domain(
    TransitGatewayMulticastDomainId='string',
    TransitGatewayAttachmentId='string',
    SubnetIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • TransitGatewayAttachmentId (string) -- The ID of the transit gateway attachment to associate with the transit gateway multicast domain.
  • SubnetIds (list) --

    The IDs of the subnets to associate with the transit gateway multicast domain.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Associations': {
        'TransitGatewayMulticastDomainId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'ResourceOwnerId': 'string',
        'Subnets': [
            {
                'SubnetId': 'string',
                'State': 'pendingAcceptance'|'associating'|'associated'|'disassociating'|'disassociated'|'rejected'|'failed'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Associations (dict) --

      Information about the transit gateway multicast domain associations.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The type of resource, for example a VPC attachment.

      • ResourceOwnerId (string) --

        The ID of the Amazon Web Services account that owns the resource.

      • Subnets (list) --

        The subnets associated with the multicast domain.

        • (dict) --

          Describes the subnet association with the transit gateway multicast domain.

          • SubnetId (string) --

            The ID of the subnet.

          • State (string) --

            The state of the subnet association.

associate_transit_gateway_policy_table(**kwargs)

Associates the specified transit gateway attachment with a transit gateway policy table.

See also: AWS API Documentation

Request Syntax

response = client.associate_transit_gateway_policy_table(
    TransitGatewayPolicyTableId='string',
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayPolicyTableId (string) --

    [REQUIRED]

    The ID of the transit gateway policy table to associate with the transit gateway attachment.

  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the transit gateway attachment to associate with the policy table.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Association': {
        'TransitGatewayPolicyTableId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'State': 'associating'|'associated'|'disassociating'|'disassociated'
    }
}

Response Structure

  • (dict) --

    • Association (dict) --

      Describes the association of a transit gateway and a transit gateway policy table.

      • TransitGatewayPolicyTableId (string) --

        The ID of the transit gateway policy table.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway attachment.

      • ResourceId (string) --

        The resource ID of the transit gateway attachment.

      • ResourceType (string) --

        The resource type for the transit gateway policy table association.

      • State (string) --

        The state of the transit gateway policy table association.

associate_transit_gateway_route_table(**kwargs)

Associates the specified attachment with the specified transit gateway route table. You can associate only one route table with an attachment.

See also: AWS API Documentation

Request Syntax

response = client.associate_transit_gateway_route_table(
    TransitGatewayRouteTableId='string',
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Association': {
        'TransitGatewayRouteTableId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'State': 'associating'|'associated'|'disassociating'|'disassociated'
    }
}

Response Structure

  • (dict) --

    • Association (dict) --

      The ID of the association.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The resource type. Note that the tgw-peering resource type has been deprecated.

      • State (string) --

        The state of the association.

associate_trunk_interface(**kwargs)

Note

This API action is currently in limited preview only . If you are interested in using this feature, contact your account manager.

Associates a branch network interface with a trunk network interface.

Before you create the association, run the create-network-interface command and set --interface-type to trunk . You must also create a network interface for each branch network interface that you want to associate with the trunk network interface.

See also: AWS API Documentation

Request Syntax

response = client.associate_trunk_interface(
    BranchInterfaceId='string',
    TrunkInterfaceId='string',
    VlanId=123,
    GreKey=123,
    ClientToken='string',
    DryRun=True|False
)
Parameters
  • BranchInterfaceId (string) --

    [REQUIRED]

    The ID of the branch network interface.

  • TrunkInterfaceId (string) --

    [REQUIRED]

    The ID of the trunk network interface.

  • VlanId (integer) -- The ID of the VLAN. This applies to the VLAN protocol.
  • GreKey (integer) -- The application key. This applies to the GRE protocol.
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InterfaceAssociation': {
        'AssociationId': 'string',
        'BranchInterfaceId': 'string',
        'TrunkInterfaceId': 'string',
        'InterfaceProtocol': 'VLAN'|'GRE',
        'VlanId': 123,
        'GreKey': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • InterfaceAssociation (dict) --

      Information about the association between the trunk network interface and branch network interface.

      • AssociationId (string) --

        The ID of the association.

      • BranchInterfaceId (string) --

        The ID of the branch network interface.

      • TrunkInterfaceId (string) --

        The ID of the trunk network interface.

      • InterfaceProtocol (string) --

        The interface protocol. Valid values are VLAN and GRE .

      • VlanId (integer) --

        The ID of the VLAN when you use the VLAN protocol.

      • GreKey (integer) --

        The application key when you use the GRE protocol.

      • Tags (list) --

        The tags for the trunk interface association.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

    • ClientToken (string) --

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

associate_vpc_cidr_block(**kwargs)

Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR block, an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP ). The IPv6 CIDR block size is fixed at /56.

You must specify one of the following in the request: an IPv4 CIDR block, an IPv6 pool, or an Amazon-provided IPv6 CIDR block.

For more information about associating CIDR blocks with your VPC and applicable restrictions, see VPC and subnet sizing in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.associate_vpc_cidr_block(
    AmazonProvidedIpv6CidrBlock=True|False,
    CidrBlock='string',
    VpcId='string',
    Ipv6CidrBlockNetworkBorderGroup='string',
    Ipv6Pool='string',
    Ipv6CidrBlock='string',
    Ipv4IpamPoolId='string',
    Ipv4NetmaskLength=123,
    Ipv6IpamPoolId='string',
    Ipv6NetmaskLength=123
)
Parameters
  • AmazonProvidedIpv6CidrBlock (boolean) -- Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.
  • CidrBlock (string) -- An IPv4 CIDR block to associate with the VPC.
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • Ipv6CidrBlockNetworkBorderGroup (string) --

    The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the CIDR block to this location.

    You must set AmazonProvidedIpv6CidrBlock to true to use this parameter.

    You can have one IPv6 CIDR block association per network border group.

  • Ipv6Pool (string) -- The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
  • Ipv6CidrBlock (string) --

    An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

    To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

  • Ipv4IpamPoolId (string) -- Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv4NetmaskLength (integer) -- The netmask length of the IPv4 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv6IpamPoolId (string) -- Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv6NetmaskLength (integer) -- The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
Return type

dict

Returns

Response Syntax

{
    'Ipv6CidrBlockAssociation': {
        'AssociationId': 'string',
        'Ipv6CidrBlock': 'string',
        'Ipv6CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        },
        'NetworkBorderGroup': 'string',
        'Ipv6Pool': 'string'
    },
    'CidrBlockAssociation': {
        'AssociationId': 'string',
        'CidrBlock': 'string',
        'CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        }
    },
    'VpcId': 'string'
}

Response Structure

  • (dict) --

    • Ipv6CidrBlockAssociation (dict) --

      Information about the IPv6 CIDR block association.

      • AssociationId (string) --

        The association ID for the IPv6 CIDR block.

      • Ipv6CidrBlock (string) --

        The IPv6 CIDR block.

      • Ipv6CidrBlockState (dict) --

        Information about the state of the CIDR block.

        • State (string) --

          The state of the CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

      • NetworkBorderGroup (string) --

        The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1 .

      • Ipv6Pool (string) --

        The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

    • CidrBlockAssociation (dict) --

      Information about the IPv4 CIDR block association.

      • AssociationId (string) --

        The association ID for the IPv4 CIDR block.

      • CidrBlock (string) --

        The IPv4 CIDR block.

      • CidrBlockState (dict) --

        Information about the state of the CIDR block.

        • State (string) --

          The state of the CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

    • VpcId (string) --

      The ID of the VPC.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

Linking your instance to a VPC is sometimes referred to as attaching your instance.

See also: AWS API Documentation

Request Syntax

response = client.attach_classic_link_vpc(
    DryRun=True|False,
    Groups=[
        'string',
    ],
    InstanceId='string',
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    [REQUIRED]

    The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

    • (string) --
  • InstanceId (string) --

    [REQUIRED]

    The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

  • VpcId (string) --

    [REQUIRED]

    The ID of a ClassicLink-enabled VPC.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

attach_internet_gateway(**kwargs)

Attaches an internet gateway or a virtual private gateway to a VPC, enabling connectivity between the internet and the VPC. For more information about your VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.attach_internet_gateway(
    DryRun=True|False,
    InternetGatewayId='string',
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayId (string) --

    [REQUIRED]

    The ID of the internet gateway.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Returns

None

Examples

This example attaches the specified Internet gateway to the specified VPC.

response = client.attach_internet_gateway(
    InternetGatewayId='igw-c0a643a9',
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
attach_network_interface(**kwargs)

Attaches a network interface to an instance.

See also: AWS API Documentation

Request Syntax

response = client.attach_network_interface(
    DeviceIndex=123,
    DryRun=True|False,
    InstanceId='string',
    NetworkInterfaceId='string',
    NetworkCardIndex=123
)
Parameters
  • DeviceIndex (integer) --

    [REQUIRED]

    The index of the device for the network interface attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

  • NetworkCardIndex (integer) -- The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
Return type

dict

Returns

Response Syntax

{
    'AttachmentId': 'string',
    'NetworkCardIndex': 123
}

Response Structure

  • (dict) --

    Contains the output of AttachNetworkInterface.

    • AttachmentId (string) --

      The ID of the network interface attachment.

    • NetworkCardIndex (integer) --

      The index of the network card.

Examples

This example attaches the specified network interface to the specified instance.

response = client.attach_network_interface(
    DeviceIndex=1,
    InstanceId='i-1234567890abcdef0',
    NetworkInterfaceId='eni-e5aa89a3',
)

print(response)

Expected Output:

{
    'AttachmentId': 'eni-attach-66c4350a',
    'ResponseMetadata': {
        '...': '...',
    },
}
attach_volume(**kwargs)

Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

After you attach an EBS volume, you must make it available. For more information, see Make an EBS volume available for use .

If a volume has an Amazon Web Services Marketplace product code:

  • The volume can be attached only to a stopped instance.
  • Amazon Web Services Marketplace product codes are copied from the volume to the instance.
  • You must be subscribed to the product.
  • The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.

For more information, see Attach an Amazon EBS volume to an instance in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.attach_volume(
    Device='string',
    InstanceId='string',
    VolumeId='string',
    DryRun=True|False
)
Parameters
  • Device (string) --

    [REQUIRED]

    The device name (for example, /dev/sdh or xvdh ).

  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • VolumeId (string) --

    [REQUIRED]

    The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AttachTime': datetime(2015, 1, 1),
    'Device': 'string',
    'InstanceId': 'string',
    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
    'VolumeId': 'string',
    'DeleteOnTermination': True|False
}

Response Structure

  • (dict) --

    Describes volume attachment details.

    • AttachTime (datetime) --

      The time stamp when the attachment initiated.

    • Device (string) --

      The device name.

    • InstanceId (string) --

      The ID of the instance.

    • State (string) --

      The attachment state of the volume.

    • VolumeId (string) --

      The ID of the volume.

    • DeleteOnTermination (boolean) --

      Indicates whether the EBS volume is deleted on instance termination.

Examples

This example attaches a volume (vol-1234567890abcdef0) to an instance (i-01474ef662b89480) as /dev/sdf.

response = client.attach_volume(
    Device='/dev/sdf',
    InstanceId='i-01474ef662b89480',
    VolumeId='vol-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'AttachTime': datetime(2016, 8, 29, 18, 52, 32, 0, 242, 0),
    'Device': '/dev/sdf',
    'InstanceId': 'i-01474ef662b89480',
    'State': 'attaching',
    'VolumeId': 'vol-1234567890abcdef0',
    'ResponseMetadata': {
        '...': '...',
    },
}
attach_vpn_gateway(**kwargs)

Attaches a virtual private gateway to a VPC. You can attach one virtual private gateway to one VPC at a time.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.attach_vpn_gateway(
    VpcId='string',
    VpnGatewayId='string',
    DryRun=True|False
)
Parameters
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • VpnGatewayId (string) --

    [REQUIRED]

    The ID of the virtual private gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpcAttachment': {
        'State': 'attaching'|'attached'|'detaching'|'detached',
        'VpcId': 'string'
    }
}

Response Structure

  • (dict) --

    Contains the output of AttachVpnGateway.

    • VpcAttachment (dict) --

      Information about the attachment.

      • State (string) --

        The current state of the attachment.

      • VpcId (string) --

        The ID of the VPC.

authorize_client_vpn_ingress(**kwargs)

Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization rules act as firewall rules that grant access to networks. You must configure ingress authorization rules to enable clients to access resources in Amazon Web Services or on-premises networks.

See also: AWS API Documentation

Request Syntax

response = client.authorize_client_vpn_ingress(
    ClientVpnEndpointId='string',
    TargetNetworkCidr='string',
    AccessGroupId='string',
    AuthorizeAllGroups=True|False,
    Description='string',
    ClientToken='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • TargetNetworkCidr (string) --

    [REQUIRED]

    The IPv4 address range, in CIDR notation, of the network for which access is being authorized.

  • AccessGroupId (string) -- The ID of the group to grant access to, for example, the Active Directory group or identity provider (IdP) group. Required if AuthorizeAllGroups is false or not specified.
  • AuthorizeAllGroups (boolean) -- Indicates whether to grant access to all clients. Specify true to grant all clients who successfully establish a VPN connection access to the network. Must be set to true if AccessGroupId is not specified.
  • Description (string) -- A brief description of the authorization rule.
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Status': {
        'Code': 'authorizing'|'active'|'failed'|'revoking',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • Status (dict) --

      The current state of the authorization rule.

      • Code (string) --

        The state of the authorization rule.

      • Message (string) --

        A message about the status of the authorization rule, if applicable.

authorize_security_group_egress(**kwargs)

[VPC only] Adds the specified outbound (egress) rules to a security group for use with a VPC.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address ranges, or to the instances that are associated with the specified source security groups. When specifying an outbound rule for your security group in a VPC, the IpPermissions must include a destination for the traffic.

You specify a protocol for each rule (for example, TCP). 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.

For information about VPC security group quotas, see Amazon VPC quotas .

See also: AWS API Documentation

Request Syntax

response = client.authorize_security_group_egress(
    DryRun=True|False,
    GroupId='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    CidrIp='string',
    FromPort=123,
    IpProtocol='string',
    ToPort=123,
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupId (string) --

    [REQUIRED]

    The ID of the security group.

  • IpPermissions (list) --

    The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

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

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

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

  • TagSpecifications (list) --

    The tags applied to the security group rule.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • CidrIp (string) -- Not supported. Use a set of IP permissions to specify the CIDR.
  • FromPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • IpProtocol (string) -- Not supported. Use a set of IP permissions to specify the protocol name or number.
  • ToPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • SourceSecurityGroupName (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
  • SourceSecurityGroupOwnerId (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'SecurityGroupRules': [
        {
            'SecurityGroupRuleId': 'string',
            'GroupId': 'string',
            'GroupOwnerId': 'string',
            'IsEgress': True|False,
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'CidrIpv4': 'string',
            'CidrIpv6': 'string',
            'PrefixListId': 'string',
            'ReferencedGroupInfo': {
                'GroupId': 'string',
                'PeeringStatus': 'string',
                'UserId': 'string',
                'VpcId': 'string',
                'VpcPeeringConnectionId': 'string'
            },
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • SecurityGroupRules (list) --

      Information about the outbound (egress) security group rules that were added.

      • (dict) --

        Describes a security group rule.

        • SecurityGroupRuleId (string) --

          The ID of the security group rule.

        • GroupId (string) --

          The ID of the security group.

        • GroupOwnerId (string) --

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress (boolean) --

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol (string) --

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

          Use -1 to specify all protocols.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 (string) --

          The IPv4 CIDR range.

        • CidrIpv6 (string) --

          The IPv6 CIDR range.

        • PrefixListId (string) --

          The ID of the prefix list.

        • ReferencedGroupInfo (dict) --

          Describes the security group that is referenced in the rule.

          • GroupId (string) --

            The ID of the security group.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The Amazon Web Services account ID.

          • VpcId (string) --

            The ID of the VPC.

          • VpcPeeringConnectionId (string) --

            The ID of the VPC peering connection.

        • Description (string) --

          The security group rule description.

        • Tags (list) --

          The tags applied to the security group rule.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

Examples

This example adds a rule that grants access to the specified address ranges on TCP port 80.

response = client.authorize_security_group_egress(
    GroupId='sg-1a2b3c4d',
    IpPermissions=[
        {
            'FromPort': 80,
            'IpProtocol': 'tcp',
            'IpRanges': [
                {
                    'CidrIp': '10.0.0.0/16',
                },
            ],
            'ToPort': 80,
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example adds a rule that grants access to the specified security group on TCP port 80.

response = client.authorize_security_group_egress(
    GroupId='sg-1a2b3c4d',
    IpPermissions=[
        {
            'FromPort': 80,
            'IpProtocol': 'tcp',
            'ToPort': 80,
            'UserIdGroupPairs': [
                {
                    'GroupId': 'sg-4b51a32f',
                },
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
authorize_security_group_ingress(**kwargs)

Adds the specified inbound (ingress) rules to a security group.

An inbound rule permits instances to receive traffic from the specified IPv4 or IPv6 CIDR address range, or from the instances that are associated with the specified destination security groups. When specifying an inbound rule for your security group in a VPC, the IpPermissions must include a source for the traffic.

You specify a protocol for each rule (for example, TCP). For TCP and UDP, you must also specify the destination port or port range. For ICMP/ICMPv6, you must also specify the ICMP/ICMPv6 type and code. You can use -1 to mean all types or all codes.

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

For more information about VPC security group quotas, see Amazon VPC quotas .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.authorize_security_group_ingress(
    CidrIp='string',
    FromPort=123,
    GroupId='string',
    GroupName='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    IpProtocol='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    ToPort=123,
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • CidrIp (string) --

    The IPv4 address range, in CIDR format. You can't specify this parameter when specifying a source security group. To specify an IPv6 address range, use a set of IP permissions.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • FromPort (integer) --

    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 types. If you specify all ICMP types, you must specify all codes.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • GroupId (string) -- The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
  • GroupName (string) -- [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.
  • IpPermissions (list) --

    The sets of IP permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

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

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

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

  • IpProtocol (string) --

    The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ). To specify icmpv6 , use a set of IP permissions.

    [VPC only] Use -1 to specify all protocols. If you specify -1 or a protocol other than tcp , udp , or icmp , traffic on all ports is allowed, regardless of any ports you specify.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • SourceSecurityGroupName (string) -- [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. 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. For EC2-VPC, the source security group must be in the same VPC.
  • SourceSecurityGroupOwnerId (string) -- [nondefault VPC] The Amazon Web Services account ID for the source security group, if the source security group is in a different account. 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.
  • ToPort (integer) --

    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 codes. If you specify all ICMP types, you must specify all codes.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    [VPC Only] The tags applied to the security group rule.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'SecurityGroupRules': [
        {
            'SecurityGroupRuleId': 'string',
            'GroupId': 'string',
            'GroupOwnerId': 'string',
            'IsEgress': True|False,
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'CidrIpv4': 'string',
            'CidrIpv6': 'string',
            'PrefixListId': 'string',
            'ReferencedGroupInfo': {
                'GroupId': 'string',
                'PeeringStatus': 'string',
                'UserId': 'string',
                'VpcId': 'string',
                'VpcPeeringConnectionId': 'string'
            },
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • SecurityGroupRules (list) --

      Information about the inbound (ingress) security group rules that were added.

      • (dict) --

        Describes a security group rule.

        • SecurityGroupRuleId (string) --

          The ID of the security group rule.

        • GroupId (string) --

          The ID of the security group.

        • GroupOwnerId (string) --

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress (boolean) --

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol (string) --

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

          Use -1 to specify all protocols.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 (string) --

          The IPv4 CIDR range.

        • CidrIpv6 (string) --

          The IPv6 CIDR range.

        • PrefixListId (string) --

          The ID of the prefix list.

        • ReferencedGroupInfo (dict) --

          Describes the security group that is referenced in the rule.

          • GroupId (string) --

            The ID of the security group.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The Amazon Web Services account ID.

          • VpcId (string) --

            The ID of the VPC.

          • VpcPeeringConnectionId (string) --

            The ID of the VPC peering connection.

        • Description (string) --

          The security group rule description.

        • Tags (list) --

          The tags applied to the security group rule.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

Examples

This example enables inbound traffic on TCP port 22 (SSH). The rule includes a description to help you identify it later.

response = client.authorize_security_group_ingress(
    GroupId='sg-903004f8',
    IpPermissions=[
        {
            'FromPort': 22,
            'IpProtocol': 'tcp',
            'IpRanges': [
                {
                    'CidrIp': '203.0.113.0/24',
                    'Description': 'SSH access from the LA office',
                },
            ],
            'ToPort': 22,
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example enables inbound traffic on TCP port 80 from the specified security group. The group must be in the same VPC or a peer VPC. Incoming traffic is allowed based on the private IP addresses of instances that are associated with the specified security group.

response = client.authorize_security_group_ingress(
    GroupId='sg-111aaa22',
    IpPermissions=[
        {
            'FromPort': 80,
            'IpProtocol': 'tcp',
            'ToPort': 80,
            'UserIdGroupPairs': [
                {
                    'Description': 'HTTP access from other instances',
                    'GroupId': 'sg-1a2b3c4d',
                },
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example adds an inbound rule that allows RDP traffic from the specified IPv6 address range. The rule includes a description to help you identify it later.

response = client.authorize_security_group_ingress(
    GroupId='sg-123abc12 ',
    IpPermissions=[
        {
            'FromPort': 3389,
            'IpProtocol': 'tcp',
            'Ipv6Ranges': [
                {
                    'CidrIpv6': '2001:db8:1234:1a00::/64',
                    'Description': 'RDP access from the NY office',
                },
            ],
            'ToPort': 3389,
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
bundle_instance(**kwargs)

Bundles an Amazon instance store-backed Windows instance.

During bundling, only the root device volume (C:) is bundled. Data on other instance store volumes is not preserved.

Note

This action is not applicable for Linux/Unix instances or Windows instances that are backed by Amazon EBS.

See also: AWS API Documentation

Request Syntax

response = client.bundle_instance(
    InstanceId='string',
    Storage={
        'S3': {
            'AWSAccessKeyId': 'string',
            'Bucket': 'string',
            'Prefix': 'string',
            'UploadPolicy': b'bytes',
            'UploadPolicySignature': 'string'
        }
    },
    DryRun=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance to bundle.

    Type: String

    Default: None

    Required: Yes

  • Storage (dict) --

    [REQUIRED]

    The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

    • S3 (dict) --

      An Amazon S3 storage location.

      • AWSAccessKeyId (string) --

        The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing Amazon Web Services Access Keys .

      • Bucket (string) --

        The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

      • Prefix (string) --

        The beginning of the file name of the AMI.

      • UploadPolicy (bytes) --

        An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

      • UploadPolicySignature (string) --

        The signature of the JSON document.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'BundleTask': {
        'BundleId': 'string',
        'BundleTaskError': {
            'Code': 'string',
            'Message': 'string'
        },
        'InstanceId': 'string',
        'Progress': 'string',
        'StartTime': datetime(2015, 1, 1),
        'State': 'pending'|'waiting-for-shutdown'|'bundling'|'storing'|'cancelling'|'complete'|'failed',
        'Storage': {
            'S3': {
                'AWSAccessKeyId': 'string',
                'Bucket': 'string',
                'Prefix': 'string',
                'UploadPolicy': b'bytes',
                'UploadPolicySignature': 'string'
            }
        },
        'UpdateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Contains the output of BundleInstance.

    • BundleTask (dict) --

      Information about the bundle task.

      • BundleId (string) --

        The ID of the bundle task.

      • BundleTaskError (dict) --

        If the task fails, a description of the error.

        • Code (string) --

          The error code.

        • Message (string) --

          The error message.

      • InstanceId (string) --

        The ID of the instance associated with this bundle task.

      • Progress (string) --

        The level of task completion, as a percent (for example, 20%).

      • StartTime (datetime) --

        The time this task started.

      • State (string) --

        The state of the task.

      • Storage (dict) --

        The Amazon S3 storage locations.

        • S3 (dict) --

          An Amazon S3 storage location.

          • AWSAccessKeyId (string) --

            The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing Amazon Web Services Access Keys .

          • Bucket (string) --

            The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

          • Prefix (string) --

            The beginning of the file name of the AMI.

          • UploadPolicy (bytes) --

            An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

          • UploadPolicySignature (string) --

            The signature of the JSON document.

      • UpdateTime (datetime) --

        The time of the most recent update for the task.

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
cancel_bundle_task(**kwargs)

Cancels a bundling operation for an instance store-backed Windows instance.

See also: AWS API Documentation

Request Syntax

response = client.cancel_bundle_task(
    BundleId='string',
    DryRun=True|False
)
Parameters
  • BundleId (string) --

    [REQUIRED]

    The ID of the bundle task.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'BundleTask': {
        'BundleId': 'string',
        'BundleTaskError': {
            'Code': 'string',
            'Message': 'string'
        },
        'InstanceId': 'string',
        'Progress': 'string',
        'StartTime': datetime(2015, 1, 1),
        'State': 'pending'|'waiting-for-shutdown'|'bundling'|'storing'|'cancelling'|'complete'|'failed',
        'Storage': {
            'S3': {
                'AWSAccessKeyId': 'string',
                'Bucket': 'string',
                'Prefix': 'string',
                'UploadPolicy': b'bytes',
                'UploadPolicySignature': 'string'
            }
        },
        'UpdateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    Contains the output of CancelBundleTask.

    • BundleTask (dict) --

      Information about the bundle task.

      • BundleId (string) --

        The ID of the bundle task.

      • BundleTaskError (dict) --

        If the task fails, a description of the error.

        • Code (string) --

          The error code.

        • Message (string) --

          The error message.

      • InstanceId (string) --

        The ID of the instance associated with this bundle task.

      • Progress (string) --

        The level of task completion, as a percent (for example, 20%).

      • StartTime (datetime) --

        The time this task started.

      • State (string) --

        The state of the task.

      • Storage (dict) --

        The Amazon S3 storage locations.

        • S3 (dict) --

          An Amazon S3 storage location.

          • AWSAccessKeyId (string) --

            The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing Amazon Web Services Access Keys .

          • Bucket (string) --

            The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

          • Prefix (string) --

            The beginning of the file name of the AMI.

          • UploadPolicy (bytes) --

            An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

          • UploadPolicySignature (string) --

            The signature of the JSON document.

      • UpdateTime (datetime) --

        The time of the most recent update for the task.

cancel_capacity_reservation(**kwargs)

Cancels the specified Capacity Reservation, releases the reserved capacity, and changes the Capacity Reservation's state to cancelled .

Instances running in the reserved capacity continue running until you stop them. Stopped instances that target the Capacity Reservation can no longer launch. Modify these instances to either target a different Capacity Reservation, launch On-Demand Instance capacity, or run in any open Capacity Reservation that has matching attributes and sufficient capacity.

See also: AWS API Documentation

Request Syntax

response = client.cancel_capacity_reservation(
    CapacityReservationId='string',
    DryRun=True|False
)
Parameters
  • CapacityReservationId (string) --

    [REQUIRED]

    The ID of the Capacity Reservation to be cancelled.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

cancel_capacity_reservation_fleets(**kwargs)

Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity Reservation Fleet, the following happens:

  • The Capacity Reservation Fleet's status changes to cancelled .
  • The individual Capacity Reservations in the Fleet are cancelled. Instances running in the Capacity Reservations at the time of cancelling the Fleet continue to run in shared capacity.
  • The Fleet stops creating new Capacity Reservations.

See also: AWS API Documentation

Request Syntax

response = client.cancel_capacity_reservation_fleets(
    DryRun=True|False,
    CapacityReservationFleetIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • CapacityReservationFleetIds (list) --

    [REQUIRED]

    The IDs of the Capacity Reservation Fleets to cancel.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'SuccessfulFleetCancellations': [
        {
            'CurrentFleetState': 'submitted'|'modifying'|'active'|'partially_fulfilled'|'expiring'|'expired'|'cancelling'|'cancelled'|'failed',
            'PreviousFleetState': 'submitted'|'modifying'|'active'|'partially_fulfilled'|'expiring'|'expired'|'cancelling'|'cancelled'|'failed',
            'CapacityReservationFleetId': 'string'
        },
    ],
    'FailedFleetCancellations': [
        {
            'CapacityReservationFleetId': 'string',
            'CancelCapacityReservationFleetError': {
                'Code': 'string',
                'Message': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfulFleetCancellations (list) --

      Information about the Capacity Reservation Fleets that were successfully cancelled.

      • (dict) --

        Describes a Capacity Reservation Fleet that was successfully cancelled.

        • CurrentFleetState (string) --

          The current state of the Capacity Reservation Fleet.

        • PreviousFleetState (string) --

          The previous state of the Capacity Reservation Fleet.

        • CapacityReservationFleetId (string) --

          The ID of the Capacity Reservation Fleet that was successfully cancelled.

    • FailedFleetCancellations (list) --

      Information about the Capacity Reservation Fleets that could not be cancelled.

      • (dict) --

        Describes a Capacity Reservation Fleet that could not be cancelled.

        • CapacityReservationFleetId (string) --

          The ID of the Capacity Reservation Fleet that could not be cancelled.

        • CancelCapacityReservationFleetError (dict) --

          Information about the Capacity Reservation Fleet cancellation error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message.

cancel_conversion_task(**kwargs)

Cancels an active conversion task. The task can be the import of an instance or volume. The action removes all artifacts of the conversion, including a partially uploaded volume or instance. If the conversion is complete or is in the process of transferring the final disk image, the command fails and returns an exception.

For more information, see Importing a Virtual Machine Using the Amazon EC2 CLI .

See also: AWS API Documentation

Request Syntax

response = client.cancel_conversion_task(
    ConversionTaskId='string',
    DryRun=True|False,
    ReasonMessage='string'
)
Parameters
  • ConversionTaskId (string) --

    [REQUIRED]

    The ID of the conversion task.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ReasonMessage (string) -- The reason for canceling the conversion task.
Returns

None

cancel_export_task(**kwargs)

Cancels an active export task. The request removes all artifacts of the export, including any partially-created Amazon S3 objects. If the export task is complete or is in the process of transferring the final disk image, the command fails and returns an error.

See also: AWS API Documentation

Request Syntax

response = client.cancel_export_task(
    ExportTaskId='string'
)
Parameters
ExportTaskId (string) --

[REQUIRED]

The ID of the export task. This is the ID returned by CreateInstanceExportTask .

Returns
None
cancel_import_task(**kwargs)

Cancels an in-process import virtual machine or import snapshot task.

See also: AWS API Documentation

Request Syntax

response = client.cancel_import_task(
    CancelReason='string',
    DryRun=True|False,
    ImportTaskId='string'
)
Parameters
  • CancelReason (string) -- The reason for canceling the task.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ImportTaskId (string) -- The ID of the import image or import snapshot task to be canceled.
Return type

dict

Returns

Response Syntax

{
    'ImportTaskId': 'string',
    'PreviousState': 'string',
    'State': 'string'
}

Response Structure

  • (dict) --

    • ImportTaskId (string) --

      The ID of the task being canceled.

    • PreviousState (string) --

      The current state of the task being canceled.

    • State (string) --

      The current state of the task being canceled.

cancel_reserved_instances_listing(**kwargs)

Cancels the specified Reserved Instance listing in the Reserved Instance Marketplace.

For more information, see Reserved Instance Marketplace in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.cancel_reserved_instances_listing(
    ReservedInstancesListingId='string'
)
Parameters
ReservedInstancesListingId (string) --

[REQUIRED]

The ID of the Reserved Instance listing.

Return type
dict
Returns
Response Syntax
{
    'ReservedInstancesListings': [
        {
            'ClientToken': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'InstanceCounts': [
                {
                    'InstanceCount': 123,
                    'State': 'available'|'sold'|'cancelled'|'pending'
                },
            ],
            'PriceSchedules': [
                {
                    'Active': True|False,
                    'CurrencyCode': 'USD',
                    'Price': 123.0,
                    'Term': 123
                },
            ],
            'ReservedInstancesId': 'string',
            'ReservedInstancesListingId': 'string',
            'Status': 'active'|'pending'|'cancelled'|'closed',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'UpdateDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of CancelReservedInstancesListing.

    • ReservedInstancesListings (list) --

      The Reserved Instance listing.

      • (dict) --

        Describes a Reserved Instance listing.

        • ClientToken (string) --

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

        • CreateDate (datetime) --

          The time the listing was created.

        • InstanceCounts (list) --

          The number of instances in this state.

          • (dict) --

            Describes a Reserved Instance listing state.

            • InstanceCount (integer) --

              The number of listed Reserved Instances in the state specified by the state .

            • State (string) --

              The states of the listed Reserved Instances.

        • PriceSchedules (list) --

          The price of the Reserved Instance listing.

          • (dict) --

            Describes the price for a Reserved Instance.

            • Active (boolean) --

              The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

              A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

            • CurrencyCode (string) --

              The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD .

            • Price (float) --

              The fixed price for the term.

            • Term (integer) --

              The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

        • ReservedInstancesListingId (string) --

          The ID of the Reserved Instance listing.

        • Status (string) --

          The status of the Reserved Instance listing.

        • StatusMessage (string) --

          The reason for the current status of the Reserved Instance listing. The response can be blank.

        • 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 256 Unicode characters.

        • UpdateDate (datetime) --

          The last modified timestamp of the listing.

cancel_spot_fleet_requests(**kwargs)

Cancels the specified Spot Fleet requests.

After you cancel a Spot Fleet request, the Spot Fleet launches no new Spot Instances. You must specify whether the Spot Fleet should also terminate its Spot Instances. If you terminate the instances, the Spot Fleet request enters the cancelled_terminating state. Otherwise, the Spot Fleet request enters the cancelled_running state and the instances continue to run until they are interrupted or you terminate them manually.

See also: AWS API Documentation

Request Syntax

response = client.cancel_spot_fleet_requests(
    DryRun=True|False,
    SpotFleetRequestIds=[
        'string',
    ],
    TerminateInstances=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotFleetRequestIds (list) --

    [REQUIRED]

    The IDs of the Spot Fleet requests.

    • (string) --
  • TerminateInstances (boolean) --

    [REQUIRED]

    Indicates whether to terminate instances for a Spot Fleet request if it is canceled successfully.

Return type

dict

Returns

Response Syntax

{
    'SuccessfulFleetRequests': [
        {
            'CurrentSpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying',
            'PreviousSpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying',
            'SpotFleetRequestId': 'string'
        },
    ],
    'UnsuccessfulFleetRequests': [
        {
            'Error': {
                'Code': 'fleetRequestIdDoesNotExist'|'fleetRequestIdMalformed'|'fleetRequestNotInCancellableState'|'unexpectedError',
                'Message': 'string'
            },
            'SpotFleetRequestId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of CancelSpotFleetRequests.

    • SuccessfulFleetRequests (list) --

      Information about the Spot Fleet requests that are successfully canceled.

      • (dict) --

        Describes a Spot Fleet request that was successfully canceled.

        • CurrentSpotFleetRequestState (string) --

          The current state of the Spot Fleet request.

        • PreviousSpotFleetRequestState (string) --

          The previous state of the Spot Fleet request.

        • SpotFleetRequestId (string) --

          The ID of the Spot Fleet request.

    • UnsuccessfulFleetRequests (list) --

      Information about the Spot Fleet requests that are not successfully canceled.

      • (dict) --

        Describes a Spot Fleet request that was not successfully canceled.

        • Error (dict) --

          The error.

          • Code (string) --

            The error code.

          • Message (string) --

            The description for the error code.

        • SpotFleetRequestId (string) --

          The ID of the Spot Fleet request.

Examples

This example cancels the specified Spot fleet request and terminates its associated Spot Instances.

response = client.cancel_spot_fleet_requests(
    SpotFleetRequestIds=[
        'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    ],
    TerminateInstances=True,
)

print(response)

Expected Output:

{
    'SuccessfulFleetRequests': [
        {
            'CurrentSpotFleetRequestState': 'cancelled_running',
            'PreviousSpotFleetRequestState': 'active',
            'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example cancels the specified Spot fleet request without terminating its associated Spot Instances.

response = client.cancel_spot_fleet_requests(
    SpotFleetRequestIds=[
        'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    ],
    TerminateInstances=False,
)

print(response)

Expected Output:

{
    'SuccessfulFleetRequests': [
        {
            'CurrentSpotFleetRequestState': 'cancelled_terminating',
            'PreviousSpotFleetRequestState': 'active',
            'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
cancel_spot_instance_requests(**kwargs)

Cancels one or more Spot Instance requests.

Warning

Canceling a Spot Instance request does not terminate running Spot Instances associated with the request.

See also: AWS API Documentation

Request Syntax

response = client.cancel_spot_instance_requests(
    DryRun=True|False,
    SpotInstanceRequestIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotInstanceRequestIds (list) --

    [REQUIRED]

    One or more Spot Instance request IDs.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'CancelledSpotInstanceRequests': [
        {
            'SpotInstanceRequestId': 'string',
            'State': 'active'|'open'|'closed'|'cancelled'|'completed'
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of CancelSpotInstanceRequests.

    • CancelledSpotInstanceRequests (list) --

      One or more Spot Instance requests.

      • (dict) --

        Describes a request to cancel a Spot Instance.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • State (string) --

          The state of the Spot Instance request.

Examples

This example cancels a Spot Instance request.

response = client.cancel_spot_instance_requests(
    SpotInstanceRequestIds=[
        'sir-08b93456',
    ],
)

print(response)

Expected Output:

{
    'CancelledSpotInstanceRequests': [
        {
            'SpotInstanceRequestId': 'sir-08b93456',
            'State': 'cancelled',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
close()

Closes underlying endpoint connections.

confirm_product_instance(**kwargs)

Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner must verify whether another user's instance is eligible for support.

See also: AWS API Documentation

Request Syntax

response = client.confirm_product_instance(
    InstanceId='string',
    ProductCode='string',
    DryRun=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • ProductCode (string) --

    [REQUIRED]

    The product code. This must be a product code that you own.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'OwnerId': 'string',
    'Return': True|False
}

Response Structure

  • (dict) --

    • OwnerId (string) --

      The Amazon Web Services account ID of the instance owner. This is only present if the product code is attached to the instance.

    • Return (boolean) --

      The return value of the request. Returns true if the specified product code is owned by the requester and associated with the specified instance.

Examples

This example determines whether the specified product code is associated with the specified instance.

response = client.confirm_product_instance(
    InstanceId='i-1234567890abcdef0',
    ProductCode='774F4FF8',
)

print(response)

Expected Output:

{
    'OwnerId': '123456789012',
    'ResponseMetadata': {
        '...': '...',
    },
}
copy_fpga_image(**kwargs)

Copies the specified Amazon FPGA Image (AFI) to the current Region.

See also: AWS API Documentation

Request Syntax

response = client.copy_fpga_image(
    DryRun=True|False,
    SourceFpgaImageId='string',
    Description='string',
    Name='string',
    SourceRegion='string',
    ClientToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SourceFpgaImageId (string) --

    [REQUIRED]

    The ID of the source AFI.

  • Description (string) -- The description for the new AFI.
  • Name (string) -- The name for the new AFI. The default is the name of the source AFI.
  • SourceRegion (string) --

    [REQUIRED]

    The Region that contains the source AFI.

  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency .
Return type

dict

Returns

Response Syntax

{
    'FpgaImageId': 'string'
}

Response Structure

  • (dict) --

    • FpgaImageId (string) --

      The ID of the new AFI.

copy_image(**kwargs)

Initiates the copy of an AMI. You can copy an AMI from one Region to another, or from a Region to an Outpost. You can't copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same Outpost. To copy an AMI to another partition, see CreateStoreImageTask .

To copy an AMI from one Region to another, specify the source Region using the SourceRegion parameter, and specify the destination Region using its endpoint. Copies of encrypted backing snapshots for the AMI are encrypted. Copies of unencrypted backing snapshots remain unencrypted, unless you set Encrypted during the copy operation. You cannot create an unencrypted copy of an encrypted backing snapshot.

To copy an AMI from a Region to an Outpost, specify the source Region using the SourceRegion parameter, and specify the ARN of the destination Outpost using DestinationOutpostArn . Backing snapshots copied to an Outpost are encrypted by default using the default encryption key for the Region, or a different key that you specify in the request using KmsKeyId . Outposts do not support unencrypted snapshots. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

For more information about the prerequisites and limits when copying an AMI, see Copying an AMI in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.copy_image(
    ClientToken='string',
    Description='string',
    Encrypted=True|False,
    KmsKeyId='string',
    Name='string',
    SourceImageId='string',
    SourceRegion='string',
    DestinationOutpostArn='string',
    DryRun=True|False
)
Parameters
  • ClientToken (string) -- Unique, case-sensitive identifier you provide to ensure idempotency of the request. For more information, see Ensuring idempotency in the Amazon EC2 API Reference .
  • Description (string) -- A description for the new AMI in the destination Region.
  • Encrypted (boolean) -- Specifies whether the destination snapshots of the copied image should be encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot create an unencrypted copy of an encrypted snapshot. The default KMS key for Amazon EBS is used unless you specify a non-default Key Management Service (KMS) KMS key using KmsKeyId . For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
  • KmsKeyId (string) --

    The identifier of the symmetric Key Management Service (KMS) KMS key to use when creating encrypted volumes. If this parameter is not specified, your Amazon Web Services managed KMS key for Amazon EBS is used. If you specify a KMS key, you must also set the encrypted state to true .

    You can specify a KMS key using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
    • Key alias. For example, alias/ExampleAlias.
    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an identifier that is not valid, the action can appear to complete, but eventually fails.

    The specified KMS key must exist in the destination Region.

    Amazon EBS does not support asymmetric KMS keys.

  • Name (string) --

    [REQUIRED]

    The name of the new AMI in the destination Region.

  • SourceImageId (string) --

    [REQUIRED]

    The ID of the AMI to copy.

  • SourceRegion (string) --

    [REQUIRED]

    The name of the Region that contains the AMI to copy.

  • DestinationOutpostArn (string) --

    The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only specify this parameter when copying an AMI from an Amazon Web Services Region to an Outpost. The AMI must be in the Region of the destination Outpost. You cannot copy an AMI from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

    For more information, see Copying AMIs from an Amazon Web Services Region to an Outpost in the Amazon Elastic Compute Cloud User Guide .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ImageId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of CopyImage.

    • ImageId (string) --

      The ID of the new AMI.

Examples

This example copies the specified AMI from the us-east-1 region to the current region.

response = client.copy_image(
    Description='',
    Name='My server',
    SourceImageId='ami-5731123e',
    SourceRegion='us-east-1',
)

print(response)

Expected Output:

{
    'ImageId': 'ami-438bea42',
    'ResponseMetadata': {
        '...': '...',
    },
}
copy_snapshot(**kwargs)

Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy a snapshot within the same Region, from one Region to another, or from a Region to an Outpost. You can't copy a snapshot from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs).

When copying snapshots to a Region, copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless you enable encryption for the snapshot copy operation. By default, encrypted snapshot copies use the default Key Management Service (KMS) KMS key; however, you can specify a different KMS key. To copy an encrypted snapshot that has been shared from another account, you must have permissions for the KMS key used to encrypt the snapshot.

Snapshots copied to an Outpost are encrypted by default using the default encryption key for the Region, or a different key that you specify in the request using KmsKeyId . Outposts do not support unencrypted snapshots. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

Snapshots created by copying another snapshot have an arbitrary volume ID that should not be used for any purpose.

For more information, see Copy an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.copy_snapshot(
    Description='string',
    DestinationOutpostArn='string',
    Encrypted=True|False,
    KmsKeyId='string',
    SourceRegion='string',
    SourceSnapshotId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) -- A description for the EBS snapshot.
  • DestinationOutpostArn (string) --

    The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. Only specify this parameter when copying a snapshot from an Amazon Web Services Region to an Outpost. The snapshot must be in the Region for the destination Outpost. You cannot copy a snapshot from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

    For more information, see Copy snapshots from an Amazon Web Services Region to an Outpost in the Amazon Elastic Compute Cloud User Guide .

  • DestinationRegion (string) --

    The destination Region to use in the PresignedUrl parameter of a snapshot copy operation. This parameter is only valid for specifying the destination Region in a PresignedUrl parameter, where it is required.

    The snapshot copy is sent to the regional endpoint that you sent the HTTP request to (for example, ec2.us-east-1.amazonaws.com ). With the CLI, this is specified using the --region parameter or the default Region in your Amazon Web Services configuration file.

    Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
  • Encrypted (boolean) -- To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .
  • KmsKeyId (string) --

    The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true .

    You can specify the KMS key using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
    • Key alias. For example, alias/ExampleAlias.
    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

  • PresignedUrl (string) --

    When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see Query requests .

    The PresignedUrl should use the snapshot source endpoint, the CopySnapshot action, and include the SourceRegion , SourceSnapshotId , and DestinationRegion parameters. The PresignedUrl must be signed using Amazon Web Services Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) in the Amazon Simple Storage Service API Reference . An invalid or improperly signed PresignedUrl will cause the copy operation to fail asynchronously, and the snapshot will move to an error state.

    Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
  • SourceRegion (string) --

    [REQUIRED]

    The ID of the Region that contains the snapshot to be copied.

  • SourceSnapshotId (string) --

    [REQUIRED]

    The ID of the EBS snapshot to copy.

  • TagSpecifications (list) --

    The tags to apply to the new snapshot.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'SnapshotId': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • SnapshotId (string) --

      The ID of the new snapshot.

    • Tags (list) --

      Any tags applied to the new snapshot.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

Examples

This example copies a snapshot with the snapshot ID of snap-066877671789bd71b from the us-west-2 region to the us-east-1 region and adds a short description to identify the snapshot.

response = client.copy_snapshot(
    Description='This is my copied snapshot.',
    DestinationRegion='us-east-1',
    SourceRegion='us-west-2',
    SourceSnapshotId='snap-066877671789bd71b',
)

print(response)

Expected Output:

{
    'SnapshotId': 'snap-066877671789bd71b',
    'ResponseMetadata': {
        '...': '...',
    },
}
create_capacity_reservation(**kwargs)

Creates a new Capacity Reservation with the specified attributes.

Capacity Reservations enable you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone for any duration. This gives you the flexibility to selectively add capacity reservations and still get the Regional RI discounts for that usage. By creating Capacity Reservations, you ensure that you always have access to Amazon EC2 capacity when you need it, for as long as you need it. For more information, see Capacity Reservations in the Amazon EC2 User Guide .

Your request to create a Capacity Reservation could fail if Amazon EC2 does not have sufficient capacity to fulfill the request. If your request fails due to Amazon EC2 capacity constraints, either try again at a later time, try in a different Availability Zone, or request a smaller capacity reservation. If your application is flexible across instance types and sizes, try to create a Capacity Reservation with different instance attributes.

Your request could also fail if the requested quantity exceeds your On-Demand Instance limit for the selected instance type. If your request fails due to limit constraints, increase your On-Demand Instance limit for the required instance type and try again. For more information about increasing your instance limits, see Amazon EC2 Service Quotas in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_capacity_reservation(
    ClientToken='string',
    InstanceType='string',
    InstancePlatform='Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
    AvailabilityZone='string',
    AvailabilityZoneId='string',
    Tenancy='default'|'dedicated',
    InstanceCount=123,
    EbsOptimized=True|False,
    EphemeralStorage=True|False,
    EndDate=datetime(2015, 1, 1),
    EndDateType='unlimited'|'limited',
    InstanceMatchCriteria='open'|'targeted',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    OutpostArn='string',
    PlacementGroupArn='string'
)
Parameters
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency .
  • InstanceType (string) --

    [REQUIRED]

    The instance type for which to reserve capacity. For more information, see Instance types in the Amazon EC2 User Guide .

  • InstancePlatform (string) --

    [REQUIRED]

    The type of operating system for which to reserve capacity.

  • AvailabilityZone (string) -- The Availability Zone in which to create the Capacity Reservation.
  • AvailabilityZoneId (string) -- The ID of the Availability Zone in which to create the Capacity Reservation.
  • Tenancy (string) --

    Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

    • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.
    • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
  • InstanceCount (integer) --

    [REQUIRED]

    The number of instances for which to reserve capacity.

    Valid range: 1 - 1000

  • EbsOptimized (boolean) -- Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.
  • EphemeralStorage (boolean) -- Deprecated.
  • EndDate (datetime) --

    The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

    You must provide an EndDate value if EndDateType is limited . Omit EndDate if EndDateType is unlimited .

    If the EndDateType is limited , the Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

  • EndDateType (string) --

    Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

    • unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate if the EndDateType is unlimited .
    • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if the EndDateType value is limited .
  • InstanceMatchCriteria (string) --

    Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

    • open - The Capacity Reservation automatically matches all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes run in the Capacity Reservation automatically without specifying any additional parameters.
    • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.

    Default: open

  • TagSpecifications (list) --

    The tags to apply to the Capacity Reservation during launch.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • OutpostArn (string) -- The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity Reservation.
  • PlacementGroupArn (string) -- The Amazon Resource Name (ARN) of the cluster placement group in which to create the Capacity Reservation. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .
Return type

dict

Returns

Response Syntax

{
    'CapacityReservation': {
        'CapacityReservationId': 'string',
        'OwnerId': 'string',
        'CapacityReservationArn': 'string',
        'AvailabilityZoneId': 'string',
        'InstanceType': 'string',
        'InstancePlatform': 'Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
        'AvailabilityZone': 'string',
        'Tenancy': 'default'|'dedicated',
        'TotalInstanceCount': 123,
        'AvailableInstanceCount': 123,
        'EbsOptimized': True|False,
        'EphemeralStorage': True|False,
        'State': 'active'|'expired'|'cancelled'|'pending'|'failed',
        'StartDate': datetime(2015, 1, 1),
        'EndDate': datetime(2015, 1, 1),
        'EndDateType': 'unlimited'|'limited',
        'InstanceMatchCriteria': 'open'|'targeted',
        'CreateDate': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OutpostArn': 'string',
        'CapacityReservationFleetId': 'string',
        'PlacementGroupArn': 'string'
    }
}

Response Structure

  • (dict) --

    • CapacityReservation (dict) --

      Information about the Capacity Reservation.

      • CapacityReservationId (string) --

        The ID of the Capacity Reservation.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the Capacity Reservation.

      • CapacityReservationArn (string) --

        The Amazon Resource Name (ARN) of the Capacity Reservation.

      • AvailabilityZoneId (string) --

        The Availability Zone ID of the Capacity Reservation.

      • InstanceType (string) --

        The type of instance for which the Capacity Reservation reserves capacity.

      • InstancePlatform (string) --

        The type of operating system for which the Capacity Reservation reserves capacity.

      • AvailabilityZone (string) --

        The Availability Zone in which the capacity is reserved.

      • Tenancy (string) --

        Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

        • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.
        • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
      • TotalInstanceCount (integer) --

        The total number of instances for which the Capacity Reservation reserves capacity.

      • AvailableInstanceCount (integer) --

        The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

      • EbsOptimized (boolean) --

        Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

      • EphemeralStorage (boolean) --

        Deprecated.

      • State (string) --

        The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

        • active - The Capacity Reservation is active and the capacity is available for your use.
        • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
        • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
        • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
        • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
      • StartDate (datetime) --

        The date and time at which the Capacity Reservation was started.

      • EndDate (datetime) --

        The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

      • EndDateType (string) --

        Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

        • unlimited - The Capacity Reservation remains active until you explicitly cancel it.
        • limited - The Capacity Reservation expires automatically at a specified date and time.
      • InstanceMatchCriteria (string) --

        Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

        • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.
        • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
      • CreateDate (datetime) --

        The date and time at which the Capacity Reservation was created.

      • Tags (list) --

        Any tags assigned to the Capacity Reservation.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OutpostArn (string) --

        The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

      • CapacityReservationFleetId (string) --

        The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.

      • PlacementGroupArn (string) --

        The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .

create_capacity_reservation_fleet(**kwargs)

Creates a Capacity Reservation Fleet. For more information, see Create a Capacity Reservation Fleet in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

response = client.create_capacity_reservation_fleet(
    AllocationStrategy='string',
    ClientToken='string',
    InstanceTypeSpecifications=[
        {
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'InstancePlatform': 'Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
            'Weight': 123.0,
            'AvailabilityZone': 'string',
            'AvailabilityZoneId': 'string',
            'EbsOptimized': True|False,
            'Priority': 123
        },
    ],
    Tenancy='default',
    TotalTargetCapacity=123,
    EndDate=datetime(2015, 1, 1),
    InstanceMatchCriteria='open',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • AllocationStrategy (string) --

    The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. Currently, only the prioritized allocation strategy is supported. For more information, see Allocation strategy in the Amazon EC2 User Guide.

    Valid values: prioritized

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • InstanceTypeSpecifications (list) --

    [REQUIRED]

    Information about the instance types for which to reserve the capacity.

    • (dict) --

      Information about an instance type to use in a Capacity Reservation Fleet.

      • InstanceType (string) --

        The instance type for which the Capacity Reservation Fleet reserves capacity.

      • InstancePlatform (string) --

        The type of operating system for which the Capacity Reservation Fleet reserves capacity.

      • Weight (float) --

        The number of capacity units provided by the specified instance type. This value, together with the total target capacity that you specify for the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.

      • AvailabilityZone (string) --

        The Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

      • AvailabilityZoneId (string) --

        The ID of the Availability Zone in which the Capacity Reservation Fleet reserves the capacity. A Capacity Reservation Fleet can't span Availability Zones. All instance type specifications that you specify for the Fleet must use the same Availability Zone.

      • EbsOptimized (boolean) --

        Indicates whether the Capacity Reservation Fleet supports EBS-optimized instances types. 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 EBS-optimized instance types.

      • Priority (integer) --

        The priority to assign to the instance type. This value is used to determine which of the instance types specified for the Fleet should be prioritized for use. A lower value indicates a high priority. For more information, see Instance type priority in the Amazon EC2 User Guide.

  • Tenancy (string) --

    Indicates the tenancy of the Capacity Reservation Fleet. All Capacity Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet can have one of the following tenancy settings:

    • default - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.
    • dedicated - The Capacity Reservations are created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
  • TotalTargetCapacity (integer) --

    [REQUIRED]

    The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.

  • EndDate (datetime) --

    The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to expired and all of the Capacity Reservations in the Fleet expire.

    The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify 5/31/2019 , 13:30:55 , the Capacity Reservation Fleet is guaranteed to expire between 13:30:55 and 14:30:55 on 5/31/2019 .

  • InstanceMatchCriteria (string) --

    Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.

    Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.

  • TagSpecifications (list) --

    The tags to assign to the Capacity Reservation Fleet. The tags are automatically assigned to the Capacity Reservations in the Fleet.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CapacityReservationFleetId': 'string',
    'State': 'submitted'|'modifying'|'active'|'partially_fulfilled'|'expiring'|'expired'|'cancelling'|'cancelled'|'failed',
    'TotalTargetCapacity': 123,
    'TotalFulfilledCapacity': 123.0,
    'InstanceMatchCriteria': 'open',
    'AllocationStrategy': 'string',
    'CreateTime': datetime(2015, 1, 1),
    'EndDate': datetime(2015, 1, 1),
    'Tenancy': 'default',
    'FleetCapacityReservations': [
        {
            'CapacityReservationId': 'string',
            'AvailabilityZoneId': 'string',
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'InstancePlatform': 'Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
            'AvailabilityZone': 'string',
            'TotalInstanceCount': 123,
            'FulfilledCapacity': 123.0,
            'EbsOptimized': True|False,
            'CreateDate': datetime(2015, 1, 1),
            'Weight': 123.0,
            'Priority': 123
        },
    ],
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • CapacityReservationFleetId (string) --

      The ID of the Capacity Reservation Fleet.

    • State (string) --

      The status of the Capacity Reservation Fleet.

    • TotalTargetCapacity (integer) --

      The total number of capacity units for which the Capacity Reservation Fleet reserves capacity.

    • TotalFulfilledCapacity (float) --

      The requested capacity units that have been successfully reserved.

    • InstanceMatchCriteria (string) --

      The instance matching criteria for the Capacity Reservation Fleet.

    • AllocationStrategy (string) --

      The allocation strategy used by the Capacity Reservation Fleet.

    • CreateTime (datetime) --

      The date and time at which the Capacity Reservation Fleet was created.

    • EndDate (datetime) --

      The date and time at which the Capacity Reservation Fleet expires.

    • Tenancy (string) --

      Indicates the tenancy of Capacity Reservation Fleet.

    • FleetCapacityReservations (list) --

      Information about the individual Capacity Reservations in the Capacity Reservation Fleet.

      • (dict) --

        Information about a Capacity Reservation in a Capacity Reservation Fleet.

        • CapacityReservationId (string) --

          The ID of the Capacity Reservation.

        • AvailabilityZoneId (string) --

          The ID of the Availability Zone in which the Capacity Reservation reserves capacity.

        • InstanceType (string) --

          The instance type for which the Capacity Reservation reserves capacity.

        • InstancePlatform (string) --

          The type of operating system for which the Capacity Reservation reserves capacity.

        • AvailabilityZone (string) --

          The Availability Zone in which the Capacity Reservation reserves capacity.

        • TotalInstanceCount (integer) --

          The total number of instances for which the Capacity Reservation reserves capacity.

        • FulfilledCapacity (float) --

          The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.

        • EbsOptimized (boolean) --

          Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.

        • CreateDate (datetime) --

          The date and time at which the Capacity Reservation was created.

        • Weight (float) --

          The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.

        • Priority (integer) --

          The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.

    • Tags (list) --

      The tags assigned to the Capacity Reservation Fleet.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

create_carrier_gateway(**kwargs)

Creates a carrier gateway. For more information about carrier gateways, see Carrier gateways in the Amazon Web Services Wavelength Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_carrier_gateway(
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    ClientToken='string'
)
Parameters
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC to associate with the carrier gateway.

  • TagSpecifications (list) --

    The tags to associate with the carrier gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'CarrierGateway': {
        'CarrierGatewayId': 'string',
        'VpcId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'OwnerId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • CarrierGateway (dict) --

      Information about the carrier gateway.

      • CarrierGatewayId (string) --

        The ID of the carrier gateway.

      • VpcId (string) --

        The ID of the VPC associated with the carrier gateway.

      • State (string) --

        The state of the carrier gateway.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the carrier gateway.

      • Tags (list) --

        The tags assigned to the carrier gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_client_vpn_endpoint(**kwargs)

Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions are terminated.

See also: AWS API Documentation

Request Syntax

response = client.create_client_vpn_endpoint(
    ClientCidrBlock='string',
    ServerCertificateArn='string',
    AuthenticationOptions=[
        {
            'Type': 'certificate-authentication'|'directory-service-authentication'|'federated-authentication',
            'ActiveDirectory': {
                'DirectoryId': 'string'
            },
            'MutualAuthentication': {
                'ClientRootCertificateChainArn': 'string'
            },
            'FederatedAuthentication': {
                'SAMLProviderArn': 'string',
                'SelfServiceSAMLProviderArn': 'string'
            }
        },
    ],
    ConnectionLogOptions={
        'Enabled': True|False,
        'CloudwatchLogGroup': 'string',
        'CloudwatchLogStream': 'string'
    },
    DnsServers=[
        'string',
    ],
    TransportProtocol='tcp'|'udp',
    VpnPort=123,
    Description='string',
    SplitTunnel=True|False,
    DryRun=True|False,
    ClientToken='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    SecurityGroupIds=[
        'string',
    ],
    VpcId='string',
    SelfServicePortal='enabled'|'disabled',
    ClientConnectOptions={
        'Enabled': True|False,
        'LambdaFunctionArn': 'string'
    },
    SessionTimeoutHours=123,
    ClientLoginBannerOptions={
        'Enabled': True|False,
        'BannerText': 'string'
    }
)
Parameters
  • ClientCidrBlock (string) --

    [REQUIRED]

    The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.

  • ServerCertificateArn (string) --

    [REQUIRED]

    The ARN of the server certificate. For more information, see the Certificate Manager User Guide .

  • AuthenticationOptions (list) --

    [REQUIRED]

    Information about the authentication method to be used to authenticate clients.

    • (dict) --

      Describes the authentication method to be used by a Client VPN endpoint. For more information, see Authentication in the Client VPN Administrator Guide .

      • Type (string) --

        The type of client authentication to be used.

      • ActiveDirectory (dict) --

        Information about the Active Directory to be used, if applicable. You must provide this information if Type is directory-service-authentication .

        • DirectoryId (string) --

          The ID of the Active Directory to be used for authentication.

      • MutualAuthentication (dict) --

        Information about the authentication certificates to be used, if applicable. You must provide this information if Type is certificate-authentication .

        • ClientRootCertificateChainArn (string) --

          The ARN of the client certificate. The certificate must be signed by a certificate authority (CA) and it must be provisioned in Certificate Manager (ACM).

      • FederatedAuthentication (dict) --

        Information about the IAM SAML identity provider to be used, if applicable. You must provide this information if Type is federated-authentication .

        • SAMLProviderArn (string) --

          The Amazon Resource Name (ARN) of the IAM SAML identity provider.

        • SelfServiceSAMLProviderArn (string) --

          The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.

  • ConnectionLogOptions (dict) --

    [REQUIRED]

    Information about the client connection logging options.

    If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:

    • Client connection requests
    • Client connection results (successful and unsuccessful)
    • Reasons for unsuccessful client connection requests
    • Client connection termination time
    • Enabled (boolean) --

      Indicates whether connection logging is enabled.

    • CloudwatchLogGroup (string) --

      The name of the CloudWatch Logs log group. Required if connection logging is enabled.

    • CloudwatchLogStream (string) --

      The name of the CloudWatch Logs log stream to which the connection data is published.

  • DnsServers (list) --

    Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address configured on the device is used for the DNS server.

    • (string) --
  • TransportProtocol (string) --

    The transport protocol to be used by the VPN session.

    Default value: udp

  • VpnPort (integer) --

    The port number to assign to the Client VPN endpoint for TCP and UDP traffic.

    Valid Values: 443 | 1194

    Default Value: 443

  • Description (string) -- A brief description of the Client VPN endpoint.
  • SplitTunnel (boolean) --

    Indicates whether split-tunnel is enabled on the Client VPN endpoint.

    By default, split-tunnel on a VPN endpoint is disabled.

    For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN endpoint in the Client VPN Administrator Guide .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • TagSpecifications (list) --

    The tags to apply to the Client VPN endpoint during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • SecurityGroupIds (list) --

    The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.

    • (string) --
  • VpcId (string) -- The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.
  • SelfServicePortal (string) --

    Specify whether to enable the self-service portal for the Client VPN endpoint.

    Default Value: enabled

  • ClientConnectOptions (dict) --

    The options for managing connection authorization for new client connections.

    • Enabled (boolean) --

      Indicates whether client connect options are enabled. The default is false (not enabled).

    • LambdaFunctionArn (string) --

      The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.

  • SessionTimeoutHours (integer) --

    The maximum VPN session duration time in hours.

    Valid values: 8 | 10 | 12 | 24

    Default value: 24

  • ClientLoginBannerOptions (dict) --

    Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

    • Enabled (boolean) --

      Enable or disable a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

      Valid values: true | false

      Default value: false

    • BannerText (string) --

      Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.

Return type

dict

Returns

Response Syntax

{
    'ClientVpnEndpointId': 'string',
    'Status': {
        'Code': 'pending-associate'|'available'|'deleting'|'deleted',
        'Message': 'string'
    },
    'DnsName': 'string'
}

Response Structure

  • (dict) --

    • ClientVpnEndpointId (string) --

      The ID of the Client VPN endpoint.

    • Status (dict) --

      The current state of the Client VPN endpoint.

      • Code (string) --

        The state of the Client VPN endpoint. Possible states include:

        • pending-associate - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.
        • available - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.
        • deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.
        • deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.
      • Message (string) --

        A message about the status of the Client VPN endpoint.

    • DnsName (string) --

      The DNS name to be used by clients when establishing their VPN session.

create_client_vpn_route(**kwargs)

Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint has a route table that describes the available destination network routes. Each route in the route table specifies the path for traffic to specific resources or networks.

See also: AWS API Documentation

Request Syntax

response = client.create_client_vpn_route(
    ClientVpnEndpointId='string',
    DestinationCidrBlock='string',
    TargetVpcSubnetId='string',
    Description='string',
    ClientToken='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint to which to add the route.

  • DestinationCidrBlock (string) --

    [REQUIRED]

    The IPv4 address range, in CIDR notation, of the route destination. For example:

    • To add a route for Internet access, enter 0.0.0.0/0
    • To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range
    • To add a route for an on-premises network, enter the Amazon Web Services Site-to-Site VPN connection's IPv4 CIDR range
    • To add a route for the local network, enter the client CIDR range
  • TargetVpcSubnetId (string) --

    [REQUIRED]

    The ID of the subnet through which you want to route traffic. The specified subnet must be an existing target network of the Client VPN endpoint.

    Alternatively, if you're adding a route for the local network, specify local .

  • Description (string) -- A brief description of the route.
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Status': {
        'Code': 'creating'|'active'|'failed'|'deleting',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • Status (dict) --

      The current state of the route.

      • Code (string) --

        The state of the Client VPN endpoint route.

      • Message (string) --

        A message about the status of the Client VPN endpoint route, if applicable.

create_customer_gateway(**kwargs)

Provides information to Amazon Web Services about your customer gateway device. The customer gateway device is the appliance at your end of the VPN connection. You must provide the IP address of the customer gateway device’s external interface. The IP address must be static and can be behind a device performing network address translation (NAT).

For devices that use Border Gateway Protocol (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You can use an existing ASN assigned to your network. If you don't have an ASN already, you can use a private ASN. For more information, see Customer gateway options for your Site-to-Site VPN connection in the Amazon Web Services Site-to-Site VPN User Guide .

To create more than one customer gateway with the same VPN type, IP address, and BGP ASN, specify a unique device name for each customer gateway. An identical request returns information about the existing customer gateway; it doesn't create a new customer gateway.

See also: AWS API Documentation

Request Syntax

response = client.create_customer_gateway(
    BgpAsn=123,
    PublicIp='string',
    CertificateArn='string',
    Type='ipsec.1',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DeviceName='string',
    IpAddress='string',
    DryRun=True|False
)
Parameters
  • BgpAsn (integer) --

    [REQUIRED]

    For devices that support BGP, the customer gateway's BGP ASN.

    Default: 65000

  • PublicIp (string) -- This member has been deprecated. The Internet-routable IP address for the customer gateway's outside interface. The address must be static.
  • CertificateArn (string) -- The Amazon Resource Name (ARN) for the customer gateway certificate.
  • Type (string) --

    [REQUIRED]

    The type of VPN connection that this customer gateway supports (ipsec.1 ).

  • TagSpecifications (list) --

    The tags to apply to the customer gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DeviceName (string) --

    A name for the customer gateway device.

    Length Constraints: Up to 255 characters.

  • IpAddress (string) -- IPv4 address for the customer gateway device's outside interface. The address must be static.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CustomerGateway': {
        'BgpAsn': 'string',
        'CustomerGatewayId': 'string',
        'IpAddress': 'string',
        'CertificateArn': 'string',
        'State': 'string',
        'Type': 'string',
        'DeviceName': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Contains the output of CreateCustomerGateway.

    • CustomerGateway (dict) --

      Information about the customer gateway.

      • BgpAsn (string) --

        The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

      • CustomerGatewayId (string) --

        The ID of the customer gateway.

      • IpAddress (string) --

        The IP address of the customer gateway device's outside interface.

      • CertificateArn (string) --

        The Amazon Resource Name (ARN) for the customer gateway certificate.

      • State (string) --

        The current state of the customer gateway (pending | available | deleting | deleted ).

      • Type (string) --

        The type of VPN connection the customer gateway supports (ipsec.1 ).

      • DeviceName (string) --

        The name of customer gateway device.

      • Tags (list) --

        Any tags assigned to the customer gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

Examples

This example creates a customer gateway with the specified IP address for its outside interface.

response = client.create_customer_gateway(
    BgpAsn=65534,
    PublicIp='12.1.2.3',
    Type='ipsec.1',
)

print(response)

Expected Output:

{
    'CustomerGateway': {
        'BgpAsn': '65534',
        'CustomerGatewayId': 'cgw-0e11f167',
        'IpAddress': '12.1.2.3',
        'State': 'available',
        'Type': 'ipsec.1',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_default_subnet(**kwargs)

Creates a default subnet with a size /20 IPv4 CIDR block in the specified Availability Zone in your default VPC. You can have only one default subnet per Availability Zone. For more information, see Creating a default subnet in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_default_subnet(
    AvailabilityZone='string',
    DryRun=True|False,
    Ipv6Native=True|False
)
Parameters
  • AvailabilityZone (string) --

    [REQUIRED]

    The Availability Zone in which to create the default subnet.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Ipv6Native (boolean) -- Indicates whether to create an IPv6 only subnet. If you already have a default subnet for this Availability Zone, you must delete it before you can create an IPv6 only subnet.
Return type

dict

Returns

Response Syntax

{
    'Subnet': {
        'AvailabilityZone': 'string',
        'AvailabilityZoneId': 'string',
        'AvailableIpAddressCount': 123,
        'CidrBlock': 'string',
        'DefaultForAz': True|False,
        'EnableLniAtDeviceIndex': 123,
        'MapPublicIpOnLaunch': True|False,
        'MapCustomerOwnedIpOnLaunch': True|False,
        'CustomerOwnedIpv4Pool': 'string',
        'State': 'pending'|'available',
        'SubnetId': 'string',
        'VpcId': 'string',
        'OwnerId': 'string',
        'AssignIpv6AddressOnCreation': True|False,
        'Ipv6CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'SubnetArn': 'string',
        'OutpostArn': 'string',
        'EnableDns64': True|False,
        'Ipv6Native': True|False,
        'PrivateDnsNameOptionsOnLaunch': {
            'HostnameType': 'ip-name'|'resource-name',
            'EnableResourceNameDnsARecord': True|False,
            'EnableResourceNameDnsAAAARecord': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Subnet (dict) --

      Information about the subnet.

      • AvailabilityZone (string) --

        The Availability Zone of the subnet.

      • AvailabilityZoneId (string) --

        The AZ ID of the subnet.

      • AvailableIpAddressCount (integer) --

        The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

      • CidrBlock (string) --

        The IPv4 CIDR block assigned to the subnet.

      • DefaultForAz (boolean) --

        Indicates whether this is the default subnet for the Availability Zone.

      • EnableLniAtDeviceIndex (integer) --

        Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).

      • MapPublicIpOnLaunch (boolean) --

        Indicates whether instances launched in this subnet receive a public IPv4 address.

      • MapCustomerOwnedIpOnLaunch (boolean) --

        Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives a customer-owned IPv4 address.

      • CustomerOwnedIpv4Pool (string) --

        The customer-owned IPv4 address pool associated with the subnet.

      • State (string) --

        The current state of the subnet.

      • SubnetId (string) --

        The ID of the subnet.

      • VpcId (string) --

        The ID of the VPC the subnet is in.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the subnet.

      • AssignIpv6AddressOnCreation (boolean) --

        Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives an IPv6 address.

      • Ipv6CidrBlockAssociationSet (list) --

        Information about the IPv6 CIDR blocks associated with the subnet.

        • (dict) --

          Describes an association between a subnet and an IPv6 CIDR block.

          • AssociationId (string) --

            The ID of the association.

          • Ipv6CidrBlock (string) --

            The IPv6 CIDR block.

          • Ipv6CidrBlockState (dict) --

            The state of the CIDR block.

            • State (string) --

              The state of a CIDR block.

            • StatusMessage (string) --

              A message about the status of the CIDR block, if applicable.

      • Tags (list) --

        Any tags assigned to the subnet.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • SubnetArn (string) --

        The Amazon Resource Name (ARN) of the subnet.

      • OutpostArn (string) --

        The Amazon Resource Name (ARN) of the Outpost.

      • EnableDns64 (boolean) --

        Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

      • Ipv6Native (boolean) --

        Indicates whether this is an IPv6 only subnet.

      • PrivateDnsNameOptionsOnLaunch (dict) --

        The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.

        • HostnameType (string) --

          The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

        • EnableResourceNameDnsARecord (boolean) --

          Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

        • EnableResourceNameDnsAAAARecord (boolean) --

          Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.

create_default_vpc(**kwargs)

Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in each Availability Zone. For more information about the components of a default VPC, see Default VPC and default subnets in the Amazon Virtual Private Cloud User Guide . You cannot specify the components of the default VPC yourself.

If you deleted your previous default VPC, you can create a default VPC. You cannot have more than one default VPC per Region.

If your account supports EC2-Classic, you cannot use this action to create a default VPC in a Region that supports EC2-Classic. If you want a default VPC in a Region that supports EC2-Classic, see "I really want a default VPC for my existing EC2 account. Is that possible?" in the Default VPCs FAQ .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_default_vpc(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'Vpc': {
        'CidrBlock': 'string',
        'DhcpOptionsId': 'string',
        'State': 'pending'|'available',
        'VpcId': 'string',
        'OwnerId': 'string',
        'InstanceTenancy': 'default'|'dedicated'|'host',
        'Ipv6CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                },
                'NetworkBorderGroup': 'string',
                'Ipv6Pool': 'string'
            },
        ],
        'CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'CidrBlock': 'string',
                'CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
        ],
        'IsDefault': True|False,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --
    • Vpc (dict) --

      Information about the VPC.

      • CidrBlock (string) --

        The primary IPv4 CIDR block for the VPC.

      • DhcpOptionsId (string) --

        The ID of the set of DHCP options you've associated with the VPC.

      • State (string) --

        The current state of the VPC.

      • VpcId (string) --

        The ID of the VPC.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the VPC.

      • InstanceTenancy (string) --

        The allowed tenancy of instances launched into the VPC.

      • Ipv6CidrBlockAssociationSet (list) --

        Information about the IPv6 CIDR blocks associated with the VPC.

        • (dict) --

          Describes an IPv6 CIDR block associated with a VPC.

          • AssociationId (string) --

            The association ID for the IPv6 CIDR block.

          • Ipv6CidrBlock (string) --

            The IPv6 CIDR block.

          • Ipv6CidrBlockState (dict) --

            Information about the state of the CIDR block.

            • State (string) --

              The state of the CIDR block.

            • StatusMessage (string) --

              A message about the status of the CIDR block, if applicable.

          • NetworkBorderGroup (string) --

            The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1 .

          • Ipv6Pool (string) --

            The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • CidrBlockAssociationSet (list) --

        Information about the IPv4 CIDR blocks associated with the VPC.

        • (dict) --

          Describes an IPv4 CIDR block associated with a VPC.

          • AssociationId (string) --

            The association ID for the IPv4 CIDR block.

          • CidrBlock (string) --

            The IPv4 CIDR block.

          • CidrBlockState (dict) --

            Information about the state of the CIDR block.

            • State (string) --

              The state of the CIDR block.

            • StatusMessage (string) --

              A message about the status of the CIDR block, if applicable.

      • IsDefault (boolean) --

        Indicates whether the VPC is the default VPC.

      • Tags (list) --

        Any tags assigned to the VPC.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_dhcp_options(**kwargs)

Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132 .

  • domain-name-servers - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. To have your instance receive a custom DNS hostname as specified in domain-name , you must set domain-name-servers to a custom DNS server.
  • domain-name - If you're using AmazonProvidedDNS in us-east-1 , specify ec2.internal . If you're using AmazonProvidedDNS in another Region, specify region.compute.internal (for example, ap-northeast-1.compute.internal ). Otherwise, specify a domain name (for example, ExampleCompany.com ). This value is used to complete unqualified DNS hostnames. Important : Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.
  • ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) servers.
  • netbios-name-servers - The IP addresses of up to four NetBIOS name servers.
  • netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see RFC 2132 .

Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an internet gateway, make sure to set the domain-name-servers option either to AmazonProvidedDNS or to a domain name server of your choice. For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_dhcp_options(
    DhcpConfigurations=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • DhcpConfigurations (list) --

    [REQUIRED]

    A DHCP configuration option.

    • (dict) --
      • Key (string) --
      • Values (list) --
        • (string) --
  • TagSpecifications (list) --

    The tags to assign to the DHCP option.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'DhcpOptions': {
        'DhcpConfigurations': [
            {
                'Key': 'string',
                'Values': [
                    {
                        'Value': 'string'
                    },
                ]
            },
        ],
        'DhcpOptionsId': 'string',
        'OwnerId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • DhcpOptions (dict) --

      A set of DHCP options.

      • DhcpConfigurations (list) --

        One or more DHCP options in the set.

        • (dict) --

          Describes a DHCP configuration option.

          • Key (string) --

            The name of a DHCP option.

          • Values (list) --

            One or more values for the DHCP option.

            • (dict) --

              Describes a value for a resource attribute that is a String.

              • Value (string) --

                The attribute value. The value is case-sensitive.

      • DhcpOptionsId (string) --

        The ID of the set of DHCP options.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the DHCP options set.

      • Tags (list) --

        Any tags assigned to the DHCP options set.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

Examples

This example creates a DHCP options set.

response = client.create_dhcp_options(
    DhcpConfigurations=[
        {
            'Key': 'domain-name-servers',
            'Values': [
                '10.2.5.1',
                '10.2.5.2',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'DhcpOptions': {
        'DhcpConfigurations': [
            {
                'Key': 'domain-name-servers',
                'Values': [
                    {
                        'Value': '10.2.5.2',
                    },
                    {
                        'Value': '10.2.5.1',
                    },
                ],
            },
        ],
        'DhcpOptionsId': 'dopt-d9070ebb',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_egress_only_internet_gateway(**kwargs)

[IPv6 only] Creates an egress-only internet gateway for your VPC. An egress-only internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance.

See also: AWS API Documentation

Request Syntax

response = client.create_egress_only_internet_gateway(
    ClientToken='string',
    DryRun=True|False,
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC for which to create the egress-only internet gateway.

  • TagSpecifications (list) --

    The tags to assign to the egress-only internet gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'ClientToken': 'string',
    'EgressOnlyInternetGateway': {
        'Attachments': [
            {
                'State': 'attaching'|'attached'|'detaching'|'detached',
                'VpcId': 'string'
            },
        ],
        'EgressOnlyInternetGatewayId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • ClientToken (string) --

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    • EgressOnlyInternetGateway (dict) --

      Information about the egress-only internet gateway.

      • Attachments (list) --

        Information about the attachment of the egress-only internet gateway.

        • (dict) --

          Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

          • State (string) --

            The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

          • VpcId (string) --

            The ID of the VPC.

      • EgressOnlyInternetGatewayId (string) --

        The ID of the egress-only internet gateway.

      • Tags (list) --

        The tags assigned to the egress-only internet gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_fleet(**kwargs)

Launches an EC2 Fleet.

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

For more information, see EC2 Fleet in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_fleet(
    DryRun=True|False,
    ClientToken='string',
    SpotOptions={
        'AllocationStrategy': 'lowest-price'|'diversified'|'capacity-optimized'|'capacity-optimized-prioritized',
        'MaintenanceStrategies': {
            'CapacityRebalance': {
                'ReplacementStrategy': 'launch'|'launch-before-terminate',
                'TerminationDelay': 123
            }
        },
        'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate',
        'InstancePoolsToUseCount': 123,
        'SingleInstanceType': True|False,
        'SingleAvailabilityZone': True|False,
        'MinTargetCapacity': 123,
        'MaxTotalPrice': 'string'
    },
    OnDemandOptions={
        'AllocationStrategy': 'lowest-price'|'prioritized',
        'CapacityReservationOptions': {
            'UsageStrategy': 'use-capacity-reservations-first'
        },
        'SingleInstanceType': True|False,
        'SingleAvailabilityZone': True|False,
        'MinTargetCapacity': 123,
        'MaxTotalPrice': 'string'
    },
    ExcessCapacityTerminationPolicy='no-termination'|'termination',
    LaunchTemplateConfigs=[
        {
            'LaunchTemplateSpecification': {
                'LaunchTemplateId': 'string',
                'LaunchTemplateName': 'string',
                'Version': 'string'
            },
            'Overrides': [
                {
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'MaxPrice': 'string',
                    'SubnetId': 'string',
                    'AvailabilityZone': 'string',
                    'WeightedCapacity': 123.0,
                    'Priority': 123.0,
                    'Placement': {
                        'AvailabilityZone': 'string',
                        'Affinity': 'string',
                        'GroupName': 'string',
                        'PartitionNumber': 123,
                        'HostId': 'string',
                        'Tenancy': 'default'|'dedicated'|'host',
                        'SpreadDomain': 'string',
                        'HostResourceGroupArn': 'string'
                    },
                    'InstanceRequirements': {
                        'VCpuCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'MemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        },
                        'CpuManufacturers': [
                            'intel'|'amd'|'amazon-web-services',
                        ],
                        'MemoryGiBPerVCpu': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'ExcludedInstanceTypes': [
                            'string',
                        ],
                        'InstanceGenerations': [
                            'current'|'previous',
                        ],
                        'SpotMaxPricePercentageOverLowestPrice': 123,
                        'OnDemandMaxPricePercentageOverLowestPrice': 123,
                        'BareMetal': 'included'|'required'|'excluded',
                        'BurstablePerformance': 'included'|'required'|'excluded',
                        'RequireHibernateSupport': True|False,
                        'NetworkInterfaceCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'LocalStorage': 'included'|'required'|'excluded',
                        'LocalStorageTypes': [
                            'hdd'|'ssd',
                        ],
                        'TotalLocalStorageGB': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'BaselineEbsBandwidthMbps': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorTypes': [
                            'gpu'|'fpga'|'inference',
                        ],
                        'AcceleratorCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorManufacturers': [
                            'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                        ],
                        'AcceleratorNames': [
                            'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                        ],
                        'AcceleratorTotalMemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        }
                    }
                },
            ]
        },
    ],
    TargetCapacitySpecification={
        'TotalTargetCapacity': 123,
        'OnDemandTargetCapacity': 123,
        'SpotTargetCapacity': 123,
        'DefaultTargetCapacityType': 'spot'|'on-demand',
        'TargetCapacityUnitType': 'vcpu'|'memory-mib'|'units'
    },
    TerminateInstancesWithExpiration=True|False,
    Type='request'|'maintain'|'instant',
    ValidFrom=datetime(2015, 1, 1),
    ValidUntil=datetime(2015, 1, 1),
    ReplaceUnhealthyInstances=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    Context='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency .
  • SpotOptions (dict) --

    Describes the configuration of Spot Instances in an EC2 Fleet.

    • AllocationStrategy (string) --

      The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.

      lowest-price - EC2 Fleet launches instances from the Spot Instance pools with the lowest price.

      diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.

      capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized . Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides . You can assign the same priority to different LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note that if the On-Demand AllocationStrategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity.

      Default: lowest-price

    • MaintenanceStrategies (dict) --

      The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.

      • CapacityRebalance (dict) --

        The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.

        • ReplacementStrategy (string) --

          The replacement strategy to use. Only available for fleets of type maintain .

          launch - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

          launch-before-terminate - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay ), terminates the instances that received a rebalance notification.

        • TerminationDelay (integer) --

          The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

          Required when ReplacementStrategy is set to launch-before-terminate .

          Not valid when ReplacementStrategy is set to launch .

          Valid values: Minimum value of 120 seconds. Maximum value of 7200 seconds.

    • InstanceInterruptionBehavior (string) --

      The behavior when a Spot Instance is interrupted.

      Default: terminate

    • InstancePoolsToUseCount (integer) --

      The number of Spot pools across which to allocate your target Spot capacity. Supported only when Spot AllocationStrategy is set to lowest-price . EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

      Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

    • SingleInstanceType (boolean) --

      Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

      Supported only for fleets of type instant .

    • SingleAvailabilityZone (boolean) --

      Indicates that the fleet launches all Spot Instances into a single Availability Zone.

      Supported only for fleets of type instant .

    • MinTargetCapacity (integer) --

      The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

      Supported only for fleets of type instant .

      At least one of the following must be specified: SingleAvailabilityZone | SingleInstanceType

    • MaxTotalPrice (string) --

      The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

      Warning

      If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

  • OnDemandOptions (dict) --

    Describes the configuration of On-Demand Instances in an EC2 Fleet.

    • AllocationStrategy (string) --

      The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.

      lowest-price - EC2 Fleet uses price to determine the order, launching the lowest price first.

      prioritized - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.

      Default: lowest-price

    • CapacityReservationOptions (dict) --

      The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.

      Supported only for fleets of type instant .

      • UsageStrategy (string) --

        Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

        If you specify use-capacity-reservations-first , the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price or prioritized ) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price or prioritized ).

        If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.

    • SingleInstanceType (boolean) --

      Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.

      Supported only for fleets of type instant .

    • SingleAvailabilityZone (boolean) --

      Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.

      Supported only for fleets of type instant .

    • MinTargetCapacity (integer) --

      The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

      Supported only for fleets of type instant .

      At least one of the following must be specified: SingleAvailabilityZone | SingleInstanceType

    • MaxTotalPrice (string) --

      The maximum amount per hour for On-Demand Instances that you're willing to pay.

  • ExcessCapacityTerminationPolicy (string) -- Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
  • LaunchTemplateConfigs (list) --

    [REQUIRED]

    The configuration for the EC2 Fleet.

    • (dict) --

      Describes a launch template and overrides.

      • LaunchTemplateSpecification (dict) --

        The launch template to use. You must specify either the launch template ID or launch template name in the request.

        • LaunchTemplateId (string) --

          The ID of the launch template.

          You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

        • LaunchTemplateName (string) --

          The name of the launch template.

          You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

        • Version (string) --

          The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

          If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

          If the value is $Default , Amazon EC2 uses the default version of the launch template.

      • Overrides (list) --

        Any parameters that you specify override the same parameters in the launch template.

        For fleets of type request and maintain , a maximum of 300 items is allowed across all launch templates.

        • (dict) --

          Describes overrides for a launch template.

          • InstanceType (string) --

            The instance type.

            Note

            If you specify InstanceTypes , you can't specify InstanceRequirements .

          • MaxPrice (string) --

            The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

          • SubnetId (string) --

            The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, subnet-1234abcdeexample1, subnet-0987cdef6example2 ). A request of type instant can have only one subnet ID.

          • AvailabilityZone (string) --

            The Availability Zone in which to launch the instances.

          • WeightedCapacity (float) --

            The number of units provided by the specified instance type.

          • Priority (float) --

            The priority for the launch template override. The highest priority is launched first.

            If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

            If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

            Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

          • Placement (dict) --

            The location where the instance launched, if applicable.

            • AvailabilityZone (string) --

              The Availability Zone of the instance.

              If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

              This parameter is not supported by CreateFleet .

            • Affinity (string) --

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

              This parameter is not supported by CreateFleet .

            • GroupName (string) --

              The name of the placement group the instance is in.

            • PartitionNumber (integer) --

              The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

              This parameter is not supported by CreateFleet .

            • HostId (string) --

              The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet .

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

              This parameter is not supported by CreateFleet .

              T3 instances that use the unlimited CPU credit option do not support host tenancy.

            • SpreadDomain (string) --

              Reserved for future use.

              This parameter is not supported by CreateFleet .

            • HostResourceGroupArn (string) --

              The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

              This parameter is not supported by CreateFleet .

          • InstanceRequirements (dict) --

            The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

            Note

            If you specify InstanceRequirements , you can't specify InstanceTypes .

            • VCpuCount (dict) -- [REQUIRED]

              The minimum and maximum number of vCPUs.

              • Min (integer) -- [REQUIRED]

                The minimum number of vCPUs. To specify no minimum limit, specify 0 .

              • Max (integer) --

                The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

            • MemoryMiB (dict) -- [REQUIRED]

              The minimum and maximum amount of memory, in MiB.

              • Min (integer) -- [REQUIRED]

                The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

              • Max (integer) --

                The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

            • CpuManufacturers (list) --

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel .
              • For instance types with AMD CPUs, specify amd .
              • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

              Note

              Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

              • (string) --
            • MemoryGiBPerVCpu (dict) --

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

              • Max (float) --

                The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

            • ExcludedInstanceTypes (list) --

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

              For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

              • (string) --
            • InstanceGenerations (list) --

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

              For current generation instance types, specify current .

              For previous generation instance types, specify previous .

              Default: Current and previous generation instance types

              • (string) --
            • SpotMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 20

            • BareMetal (string) --

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included .
              • To require only bare metal instance types, specify required .
              • To exclude bare metal instance types, specify excluded .

              Default: excluded

            • BurstablePerformance (string) --

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

              • To include burstable performance instance types, specify included .
              • To require only burstable performance instance types, specify required .
              • To exclude burstable performance instance types, specify excluded .

              Default: excluded

            • RequireHibernateSupport (boolean) --

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores .

              Default: false

            • NetworkInterfaceCount (dict) --

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

            • LocalStorage (string) --

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

              • To include instance types with instance store volumes, specify included .
              • To require only instance types with instance store volumes, specify required .
              • To exclude instance types with instance store volumes, specify excluded .

              Default: included

            • LocalStorageTypes (list) --

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd .
              • For instance types with solid state drive (SSD) storage, specify ssd .

              Default: hdd and ssd

              • (string) --
            • TotalLocalStorageGB (dict) --

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

              • Max (float) --

                The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

            • BaselineEbsBandwidthMbps (dict) --

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

            • AcceleratorTypes (list) --

              The accelerator types that must be on the instance type.

              • To include instance types with GPU hardware, specify gpu .
              • To include instance types with FPGA hardware, specify fpga .
              • To include instance types with inference hardware, specify inference .

              Default: Any accelerator type

              • (string) --
            • AcceleratorCount (dict) --

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0 .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of accelerators. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

            • AcceleratorManufacturers (list) --

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia .
              • For instance types with AMD devices, specify amd .
              • For instance types with Amazon Web Services devices, specify amazon-web-services .
              • For instance types with Xilinx devices, specify xilinx .

              Default: Any manufacturer

              • (string) --
            • AcceleratorNames (list) --

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100 .
              • For instance types with NVIDIA V100 GPUs, specify v100 .
              • For instance types with NVIDIA K80 GPUs, specify k80 .
              • For instance types with NVIDIA T4 GPUs, specify t4 .
              • For instance types with NVIDIA M60 GPUs, specify m60 .
              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
              • For instance types with Xilinx VU9P FPGAs, specify vu9p .

              Default: Any accelerator

              • (string) --
            • AcceleratorTotalMemoryMiB (dict) --

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

  • TargetCapacitySpecification (dict) --

    [REQUIRED]

    The number of units to request.

    • TotalTargetCapacity (integer) -- [REQUIRED]

      The number of units to request, filled using DefaultTargetCapacityType .

    • OnDemandTargetCapacity (integer) --

      The number of On-Demand units to request.

    • SpotTargetCapacity (integer) --

      The number of Spot units to request.

    • DefaultTargetCapacityType (string) --

      The default TotalTargetCapacity , which is either Spot or On-Demand .

    • TargetCapacityUnitType (string) --

      The unit for the target capacity.

      Default: units (translates to number of instances)

  • TerminateInstancesWithExpiration (boolean) -- Indicates whether running instances should be terminated when the EC2 Fleet expires.
  • Type (string) --

    The fleet type. The default value is maintain .

    • maintain - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
    • request - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
    • instant - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.

    For more information, see EC2 Fleet request types in the Amazon EC2 User Guide .

  • 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 EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
  • ReplaceUnhealthyInstances (boolean) -- Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain . For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide .
  • TagSpecifications (list) --

    The key-value pair for tagging the EC2 Fleet request on creation. For more information, see Tagging your resources .

    If the fleet type is instant , specify a resource type of fleet to tag the fleet or instance to tag the instances at launch.

    If the fleet type is maintain or request , specify a resource type of fleet to tag the fleet. You cannot specify a resource type of instance . To tag instances at launch, specify the tags in a launch template .

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • Context (string) -- Reserved.
Return type

dict

Returns

Response Syntax

{
    'FleetId': 'string',
    'Errors': [
        {
            'LaunchTemplateAndOverrides': {
                'LaunchTemplateSpecification': {
                    'LaunchTemplateId': 'string',
                    'LaunchTemplateName': 'string',
                    'Version': 'string'
                },
                'Overrides': {
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'MaxPrice': 'string',
                    'SubnetId': 'string',
                    'AvailabilityZone': 'string',
                    'WeightedCapacity': 123.0,
                    'Priority': 123.0,
                    'Placement': {
                        'GroupName': 'string'
                    },
                    'InstanceRequirements': {
                        'VCpuCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'MemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        },
                        'CpuManufacturers': [
                            'intel'|'amd'|'amazon-web-services',
                        ],
                        'MemoryGiBPerVCpu': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'ExcludedInstanceTypes': [
                            'string',
                        ],
                        'InstanceGenerations': [
                            'current'|'previous',
                        ],
                        'SpotMaxPricePercentageOverLowestPrice': 123,
                        'OnDemandMaxPricePercentageOverLowestPrice': 123,
                        'BareMetal': 'included'|'required'|'excluded',
                        'BurstablePerformance': 'included'|'required'|'excluded',
                        'RequireHibernateSupport': True|False,
                        'NetworkInterfaceCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'LocalStorage': 'included'|'required'|'excluded',
                        'LocalStorageTypes': [
                            'hdd'|'ssd',
                        ],
                        'TotalLocalStorageGB': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'BaselineEbsBandwidthMbps': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorTypes': [
                            'gpu'|'fpga'|'inference',
                        ],
                        'AcceleratorCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorManufacturers': [
                            'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                        ],
                        'AcceleratorNames': [
                            'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                        ],
                        'AcceleratorTotalMemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        }
                    }
                }
            },
            'Lifecycle': 'spot'|'on-demand',
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ],
    'Instances': [
        {
            'LaunchTemplateAndOverrides': {
                'LaunchTemplateSpecification': {
                    'LaunchTemplateId': 'string',
                    'LaunchTemplateName': 'string',
                    'Version': 'string'
                },
                'Overrides': {
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'MaxPrice': 'string',
                    'SubnetId': 'string',
                    'AvailabilityZone': 'string',
                    'WeightedCapacity': 123.0,
                    'Priority': 123.0,
                    'Placement': {
                        'GroupName': 'string'
                    },
                    'InstanceRequirements': {
                        'VCpuCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'MemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        },
                        'CpuManufacturers': [
                            'intel'|'amd'|'amazon-web-services',
                        ],
                        'MemoryGiBPerVCpu': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'ExcludedInstanceTypes': [
                            'string',
                        ],
                        'InstanceGenerations': [
                            'current'|'previous',
                        ],
                        'SpotMaxPricePercentageOverLowestPrice': 123,
                        'OnDemandMaxPricePercentageOverLowestPrice': 123,
                        'BareMetal': 'included'|'required'|'excluded',
                        'BurstablePerformance': 'included'|'required'|'excluded',
                        'RequireHibernateSupport': True|False,
                        'NetworkInterfaceCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'LocalStorage': 'included'|'required'|'excluded',
                        'LocalStorageTypes': [
                            'hdd'|'ssd',
                        ],
                        'TotalLocalStorageGB': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'BaselineEbsBandwidthMbps': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorTypes': [
                            'gpu'|'fpga'|'inference',
                        ],
                        'AcceleratorCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorManufacturers': [
                            'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                        ],
                        'AcceleratorNames': [
                            'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                        ],
                        'AcceleratorTotalMemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        }
                    }
                }
            },
            'Lifecycle': 'spot'|'on-demand',
            'InstanceIds': [
                'string',
            ],
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'Platform': 'Windows'
        },
    ]
}

Response Structure

  • (dict) --

    • FleetId (string) --

      The ID of the EC2 Fleet.

    • Errors (list) --

      Information about the instances that could not be launched by the fleet. Supported only for fleets of type instant .

      • (dict) --

        Describes the instances that could not be launched by the fleet.

        • LaunchTemplateAndOverrides (dict) --

          The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

          • LaunchTemplateSpecification (dict) --

            The launch template.

            • LaunchTemplateId (string) --

              The ID of the launch template.

              You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

            • LaunchTemplateName (string) --

              The name of the launch template.

              You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

            • Version (string) --

              The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

              If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

              If the value is $Default , Amazon EC2 uses the default version of the launch template.

          • Overrides (dict) --

            Any parameters that you specify override the same parameters in the launch template.

            • InstanceType (string) --

              The instance type.

              Note

              If you specify InstanceTypes , you can't specify InstanceRequirements .

            • MaxPrice (string) --

              The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

              Warning

              If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

            • SubnetId (string) --

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

            • AvailabilityZone (string) --

              The Availability Zone in which to launch the instances.

            • WeightedCapacity (float) --

              The number of units provided by the specified instance type.

            • Priority (float) --

              The priority for the launch template override. The highest priority is launched first.

              If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

              If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

              Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

            • Placement (dict) --

              The location where the instance launched, if applicable.

              • GroupName (string) --

                The name of the placement group that the instance is in.

            • InstanceRequirements (dict) --

              The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

              Note

              If you specify InstanceRequirements , you can't specify InstanceTypes .

              • VCpuCount (dict) --

                The minimum and maximum number of vCPUs.

                • Min (integer) --

                  The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                • Max (integer) --

                  The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

              • MemoryMiB (dict) --

                The minimum and maximum amount of memory, in MiB.

                • Min (integer) --

                  The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

              • CpuManufacturers (list) --

                The CPU manufacturers to include.

                • For instance types with Intel CPUs, specify intel .
                • For instance types with AMD CPUs, specify amd .
                • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                Note

                Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                Default: Any manufacturer

                • (string) --
              • MemoryGiBPerVCpu (dict) --

                The minimum and maximum amount of memory per vCPU, in GiB.

                Default: No minimum or maximum limits

                • Min (float) --

                  The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                • Max (float) --

                  The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

              • ExcludedInstanceTypes (list) --

                The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                Default: No excluded instance types

                • (string) --
              • InstanceGenerations (list) --

                Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                For current generation instance types, specify current .

                For previous generation instance types, specify previous .

                Default: Current and previous generation instance types

                • (string) --
              • SpotMaxPricePercentageOverLowestPrice (integer) --

                The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999 .

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                Note

                If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                Default: 100

              • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999 .

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                Note

                If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                Default: 20

              • BareMetal (string) --

                Indicates whether bare metal instance types must be included, excluded, or required.

                • To include bare metal instance types, specify included .
                • To require only bare metal instance types, specify required .
                • To exclude bare metal instance types, specify excluded .

                Default: excluded

              • BurstablePerformance (string) --

                Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                • To include burstable performance instance types, specify included .
                • To require only burstable performance instance types, specify required .
                • To exclude burstable performance instance types, specify excluded .

                Default: excluded

              • RequireHibernateSupport (boolean) --

                Indicates whether instance types must support hibernation for On-Demand Instances.

                This parameter is not supported for GetSpotPlacementScores .

                Default: false

              • NetworkInterfaceCount (dict) --

                The minimum and maximum number of network interfaces.

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

              • LocalStorage (string) --

                Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                • To include instance types with instance store volumes, specify included .
                • To require only instance types with instance store volumes, specify required .
                • To exclude instance types with instance store volumes, specify excluded .

                Default: included

              • LocalStorageTypes (list) --

                The type of local storage that is required.

                • For instance types with hard disk drive (HDD) storage, specify hdd .
                • For instance types with solid state drive (SSD) storage, specify ssd .

                Default: hdd and ssd

                • (string) --
              • TotalLocalStorageGB (dict) --

                The minimum and maximum amount of total local storage, in GB.

                Default: No minimum or maximum limits

                • Min (float) --

                  The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                • Max (float) --

                  The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

              • BaselineEbsBandwidthMbps (dict) --

                The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

              • AcceleratorTypes (list) --

                The accelerator types that must be on the instance type.

                • For instance types with GPU accelerators, specify gpu .
                • For instance types with FPGA accelerators, specify fpga .
                • For instance types with inference accelerators, specify inference .

                Default: Any accelerator type

                • (string) --
              • AcceleratorCount (dict) --

                The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                To exclude accelerator-enabled instance types, set Max to 0 .

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

              • AcceleratorManufacturers (list) --

                Indicates whether instance types must have accelerators by specific manufacturers.

                • For instance types with NVIDIA devices, specify nvidia .
                • For instance types with AMD devices, specify amd .
                • For instance types with Amazon Web Services devices, specify amazon-web-services .
                • For instance types with Xilinx devices, specify xilinx .

                Default: Any manufacturer

                • (string) --
              • AcceleratorNames (list) --

                The accelerators that must be on the instance type.

                • For instance types with NVIDIA A100 GPUs, specify a100 .
                • For instance types with NVIDIA V100 GPUs, specify v100 .
                • For instance types with NVIDIA K80 GPUs, specify k80 .
                • For instance types with NVIDIA T4 GPUs, specify t4 .
                • For instance types with NVIDIA M60 GPUs, specify m60 .
                • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                Default: Any accelerator

                • (string) --
              • AcceleratorTotalMemoryMiB (dict) --

                The minimum and maximum amount of total accelerator memory, in MiB.

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • Lifecycle (string) --

          Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.

        • ErrorCode (string) --

          The error code that indicates why the instance could not be launched. For more information about error codes, see Error codes .

        • ErrorMessage (string) --

          The error message that describes why the instance could not be launched. For more information about error messages, see Error codes .

    • Instances (list) --

      Information about the instances that were launched by the fleet. Supported only for fleets of type instant .

      • (dict) --

        Describes the instances that were launched by the fleet.

        • LaunchTemplateAndOverrides (dict) --

          The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

          • LaunchTemplateSpecification (dict) --

            The launch template.

            • LaunchTemplateId (string) --

              The ID of the launch template.

              You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

            • LaunchTemplateName (string) --

              The name of the launch template.

              You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

            • Version (string) --

              The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

              If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

              If the value is $Default , Amazon EC2 uses the default version of the launch template.

          • Overrides (dict) --

            Any parameters that you specify override the same parameters in the launch template.

            • InstanceType (string) --

              The instance type.

              Note

              If you specify InstanceTypes , you can't specify InstanceRequirements .

            • MaxPrice (string) --

              The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

              Warning

              If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

            • SubnetId (string) --

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

            • AvailabilityZone (string) --

              The Availability Zone in which to launch the instances.

            • WeightedCapacity (float) --

              The number of units provided by the specified instance type.

            • Priority (float) --

              The priority for the launch template override. The highest priority is launched first.

              If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

              If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

              Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

            • Placement (dict) --

              The location where the instance launched, if applicable.

              • GroupName (string) --

                The name of the placement group that the instance is in.

            • InstanceRequirements (dict) --

              The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

              Note

              If you specify InstanceRequirements , you can't specify InstanceTypes .

              • VCpuCount (dict) --

                The minimum and maximum number of vCPUs.

                • Min (integer) --

                  The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                • Max (integer) --

                  The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

              • MemoryMiB (dict) --

                The minimum and maximum amount of memory, in MiB.

                • Min (integer) --

                  The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

              • CpuManufacturers (list) --

                The CPU manufacturers to include.

                • For instance types with Intel CPUs, specify intel .
                • For instance types with AMD CPUs, specify amd .
                • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                Note

                Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                Default: Any manufacturer

                • (string) --
              • MemoryGiBPerVCpu (dict) --

                The minimum and maximum amount of memory per vCPU, in GiB.

                Default: No minimum or maximum limits

                • Min (float) --

                  The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                • Max (float) --

                  The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

              • ExcludedInstanceTypes (list) --

                The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                Default: No excluded instance types

                • (string) --
              • InstanceGenerations (list) --

                Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                For current generation instance types, specify current .

                For previous generation instance types, specify previous .

                Default: Current and previous generation instance types

                • (string) --
              • SpotMaxPricePercentageOverLowestPrice (integer) --

                The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999 .

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                Note

                If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                Default: 100

              • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999 .

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                Note

                If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                Default: 20

              • BareMetal (string) --

                Indicates whether bare metal instance types must be included, excluded, or required.

                • To include bare metal instance types, specify included .
                • To require only bare metal instance types, specify required .
                • To exclude bare metal instance types, specify excluded .

                Default: excluded

              • BurstablePerformance (string) --

                Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                • To include burstable performance instance types, specify included .
                • To require only burstable performance instance types, specify required .
                • To exclude burstable performance instance types, specify excluded .

                Default: excluded

              • RequireHibernateSupport (boolean) --

                Indicates whether instance types must support hibernation for On-Demand Instances.

                This parameter is not supported for GetSpotPlacementScores .

                Default: false

              • NetworkInterfaceCount (dict) --

                The minimum and maximum number of network interfaces.

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

              • LocalStorage (string) --

                Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                • To include instance types with instance store volumes, specify included .
                • To require only instance types with instance store volumes, specify required .
                • To exclude instance types with instance store volumes, specify excluded .

                Default: included

              • LocalStorageTypes (list) --

                The type of local storage that is required.

                • For instance types with hard disk drive (HDD) storage, specify hdd .
                • For instance types with solid state drive (SSD) storage, specify ssd .

                Default: hdd and ssd

                • (string) --
              • TotalLocalStorageGB (dict) --

                The minimum and maximum amount of total local storage, in GB.

                Default: No minimum or maximum limits

                • Min (float) --

                  The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                • Max (float) --

                  The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

              • BaselineEbsBandwidthMbps (dict) --

                The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

              • AcceleratorTypes (list) --

                The accelerator types that must be on the instance type.

                • For instance types with GPU accelerators, specify gpu .
                • For instance types with FPGA accelerators, specify fpga .
                • For instance types with inference accelerators, specify inference .

                Default: Any accelerator type

                • (string) --
              • AcceleratorCount (dict) --

                The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                To exclude accelerator-enabled instance types, set Max to 0 .

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

              • AcceleratorManufacturers (list) --

                Indicates whether instance types must have accelerators by specific manufacturers.

                • For instance types with NVIDIA devices, specify nvidia .
                • For instance types with AMD devices, specify amd .
                • For instance types with Amazon Web Services devices, specify amazon-web-services .
                • For instance types with Xilinx devices, specify xilinx .

                Default: Any manufacturer

                • (string) --
              • AcceleratorNames (list) --

                The accelerators that must be on the instance type.

                • For instance types with NVIDIA A100 GPUs, specify a100 .
                • For instance types with NVIDIA V100 GPUs, specify v100 .
                • For instance types with NVIDIA K80 GPUs, specify k80 .
                • For instance types with NVIDIA T4 GPUs, specify t4 .
                • For instance types with NVIDIA M60 GPUs, specify m60 .
                • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                Default: Any accelerator

                • (string) --
              • AcceleratorTotalMemoryMiB (dict) --

                The minimum and maximum amount of total accelerator memory, in MiB.

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • Lifecycle (string) --

          Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.

        • InstanceIds (list) --

          The IDs of the instances.

          • (string) --
        • InstanceType (string) --

          The instance type.

        • Platform (string) --

          The value is Windows for Windows instances. Otherwise, the value is blank.

create_flow_logs(**kwargs)

Creates one or more flow logs to capture information about IP traffic for a specific network interface, subnet, or VPC.

Flow log data for a monitored network interface is recorded as flow log records, which are log events consisting of fields that describe the traffic flow. For more information, see Flow log records in the Amazon Virtual Private Cloud User Guide .

When publishing to CloudWatch Logs, flow log records are published to a log group, and each network interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all of the monitored network interfaces are published to a single log file object that is stored in the specified bucket.

For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_flow_logs(
    DryRun=True|False,
    ClientToken='string',
    DeliverLogsPermissionArn='string',
    LogGroupName='string',
    ResourceIds=[
        'string',
    ],
    ResourceType='VPC'|'Subnet'|'NetworkInterface'|'TransitGateway'|'TransitGatewayAttachment',
    TrafficType='ACCEPT'|'REJECT'|'ALL',
    LogDestinationType='cloud-watch-logs'|'s3',
    LogDestination='string',
    LogFormat='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    MaxAggregationInterval=123,
    DestinationOptions={
        'FileFormat': 'plain-text'|'parquet',
        'HiveCompatiblePartitions': True|False,
        'PerHourPartition': True|False
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency .
  • DeliverLogsPermissionArn (string) --

    The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account.

    If you specify LogDestinationType as s3 , do not specify DeliverLogsPermissionArn or LogGroupName .

  • LogGroupName (string) --

    The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

    If you specify LogDestinationType as s3 , do not specify DeliverLogsPermissionArn or LogGroupName .

  • ResourceIds (list) --

    [REQUIRED]

    The ID of the subnet, network interface, or VPC for which you want to create a flow log.

    Constraints: Maximum of 1000 resources

    • (string) --
  • ResourceType (string) --

    [REQUIRED]

    The type of resource for which to create the flow log. For example, if you specified a VPC ID for the ResourceId property, specify VPC for this property.

  • TrafficType (string) -- The type of traffic to log. You can log traffic that the resource accepts or rejects, or all traffic.
  • LogDestinationType (string) --

    The type of destination to which the flow log data is to be published. Flow log data can be published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify cloud-watch-logs . To publish flow log data to Amazon S3, specify s3 .

    If you specify LogDestinationType as s3 , do not specify DeliverLogsPermissionArn or LogGroupName .

    Default: cloud-watch-logs

  • LogDestination (string) --

    The destination to which the flow log data is to be published. Flow log data can be published to a CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value specified for LogDestinationType .

    If LogDestinationType is not specified or cloud-watch-logs , specify the Amazon Resource Name (ARN) of the CloudWatch Logs log group. For example, to publish to a log group called my-logs , specify arn:aws:logs:us-east-1:123456789012:log-group:my-logs . Alternatively, use LogGroupName instead.

    If LogDestinationType is s3 , specify the ARN of the Amazon S3 bucket. You can also specify a subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: bucket_ARN/subfolder_name/ . For example, to specify a subfolder named my-logs in a bucket named my-bucket , use the following ARN: arn:aws:s3:::my-bucket/my-logs/ . You cannot use AWSLogs as a subfolder name. This is a reserved term.

  • LogFormat (string) --

    The fields to include in the flow log record, in the order in which they should appear. For a list of available fields, see Flow log records . If you omit this parameter, the flow log is created using the default format. If you specify this parameter, you must specify at least one field.

    Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround this parameter value with single quotes on Linux or double quotes on Windows.

  • TagSpecifications (list) --

    The tags to apply to the flow logs.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • MaxAggregationInterval (integer) --

    The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600 seconds (10 minutes).

    When a network interface is attached to a Nitro-based instance , the aggregation interval is always 60 seconds or less, regardless of the value that you specify.

    Default: 600

  • DestinationOptions (dict) --

    The destination options.

    • FileFormat (string) --

      The format for the flow log. The default is plain-text .

    • HiveCompatiblePartitions (boolean) --

      Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3. The default is false .

    • PerHourPartition (boolean) --

      Indicates whether to partition the flow log per hour. This reduces the cost and response time for queries. The default is false .

Return type

dict

Returns

Response Syntax

{
    'ClientToken': 'string',
    'FlowLogIds': [
        'string',
    ],
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • ClientToken (string) --

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    • FlowLogIds (list) --

      The IDs of the flow logs.

      • (string) --
    • Unsuccessful (list) --

      Information about the flow logs that could not be created successfully.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

create_fpga_image(**kwargs)

Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP).

The create operation is asynchronous. To verify that the AFI is ready for use, check the output logs.

An AFI contains the FPGA bitstream that is ready to download to an FPGA. You can securely deploy an AFI on multiple FPGA-accelerated instances. For more information, see the Amazon Web Services FPGA Hardware Development Kit .

See also: AWS API Documentation

Request Syntax

response = client.create_fpga_image(
    DryRun=True|False,
    InputStorageLocation={
        'Bucket': 'string',
        'Key': 'string'
    },
    LogsStorageLocation={
        'Bucket': 'string',
        'Key': 'string'
    },
    Description='string',
    Name='string',
    ClientToken='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InputStorageLocation (dict) --

    [REQUIRED]

    The location of the encrypted design checkpoint in Amazon S3. The input must be a tarball.

    • Bucket (string) --

      The name of the S3 bucket.

    • Key (string) --

      The key.

  • LogsStorageLocation (dict) --

    The location in Amazon S3 for the output logs.

    • Bucket (string) --

      The name of the S3 bucket.

    • Key (string) --

      The key.

  • Description (string) -- A description for the AFI.
  • Name (string) -- A name for the AFI.
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
  • TagSpecifications (list) --

    The tags to apply to the FPGA image during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'FpgaImageId': 'string',
    'FpgaImageGlobalId': 'string'
}

Response Structure

  • (dict) --

    • FpgaImageId (string) --

      The FPGA image identifier (AFI ID).

    • FpgaImageGlobalId (string) --

      The global FPGA image identifier (AGFI ID).

create_image(**kwargs)

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

By default, when Amazon EC2 creates the new AMI, it reboots the instance so that it can take snapshots of the attached volumes while data is at rest, in order to ensure a consistent state. You can set the NoReboot parameter to true in the API request, or use the --no-reboot option in the CLI to prevent Amazon EC2 from shutting down and rebooting the instance.

Warning

If you choose to bypass the shutdown and reboot process by setting the NoReboot parameter to true in the API request, or by using the --no-reboot option in the CLI, we can't guarantee the file system integrity of the created image.

If you customized your instance with instance store volumes or Amazon EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.

For more information, see Creating Amazon EBS-Backed Linux AMIs in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_image(
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    Description='string',
    DryRun=True|False,
    InstanceId='string',
    Name='string',
    NoReboot=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • BlockDeviceMappings (list) --

    The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

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

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

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

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

  • Description (string) -- A description for the new image.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • Name (string) --

    [REQUIRED]

    A name for the new image.

    Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

  • NoReboot (boolean) --

    By default, when Amazon EC2 creates the new AMI, it reboots the instance so that it can take snapshots of the attached volumes while data is at rest, in order to ensure a consistent state. You can set the NoReboot parameter to true in the API request, or use the --no-reboot option in the CLI to prevent Amazon EC2 from shutting down and rebooting the instance.

    Warning

    If you choose to bypass the shutdown and reboot process by setting the NoReboot parameter to true in the API request, or by using the --no-reboot option in the CLI, we can't guarantee the file system integrity of the created image.

    Default: false (follow standard reboot process)

  • TagSpecifications (list) --

    The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.

    • To tag the AMI, the value for ResourceType must be image .
    • To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for ResourceType must be snapshot . The same tag is applied to all of the snapshots that are created.

    If you specify other values for ResourceType , the request fails.

    To tag an AMI or snapshot after it has been created, see CreateTags .

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'ImageId': 'string'
}

Response Structure

  • (dict) --

    • ImageId (string) --

      The ID of the new AMI.

Examples

This example creates an AMI from the specified instance and adds an EBS volume with the device name /dev/sdh and an instance store volume with the device name /dev/sdc.

response = client.create_image(
    BlockDeviceMappings=[
        {
            'DeviceName': '/dev/sdh',
            'Ebs': {
                'VolumeSize': '100',
            },
        },
        {
            'DeviceName': '/dev/sdc',
            'VirtualName': 'ephemeral1',
        },
    ],
    Description='An AMI for my server',
    InstanceId='i-1234567890abcdef0',
    Name='My server',
    NoReboot=True,
)

print(response)

Expected Output:

{
    'ImageId': 'ami-1a2b3c4d',
    'ResponseMetadata': {
        '...': '...',
    },
}
create_instance_event_window(**kwargs)

Creates an event window in which scheduled events for the associated Amazon EC2 instances can run.

You can define either a set of time ranges or a cron expression when creating the event window, but not both. All event window times are in UTC.

You can create up to 200 event windows per Amazon Web Services Region.

When you create the event window, targets (instance IDs, Dedicated Host IDs, or tags) are not yet associated with it. To ensure that the event window can be used, you must associate one or more targets with it by using the AssociateInstanceEventWindow API.

Warning

Event windows are applicable only for scheduled events that stop, reboot, or terminate instances.

Event windows are not applicable for:

  • Expedited scheduled events and network maintenance events.
  • Unscheduled maintenance such as AutoRecovery and unplanned reboots.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_instance_event_window(
    DryRun=True|False,
    Name='string',
    TimeRanges=[
        {
            'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
            'StartHour': 123,
            'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
            'EndHour': 123
        },
    ],
    CronExpression='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Name (string) -- The name of the event window.
  • TimeRanges (list) --

    The time range for the event window. If you specify a time range, you can't specify a cron expression.

    • (dict) --

      The start day and time and the end day and time of the time range, in UTC.

      • StartWeekDay (string) --

        The day on which the time range begins.

      • StartHour (integer) --

        The hour when the time range begins.

      • EndWeekDay (string) --

        The day on which the time range ends.

      • EndHour (integer) --

        The hour when the time range ends.

  • CronExpression (string) --

    The cron expression for the event window, for example, * 0-4,20-23 * * 1,5 . If you specify a cron expression, you can't specify a time range.

    Constraints:

    • Only hour and day of the week values are supported.
    • For day of the week values, you can specify either integers 0 through 6 , or alternative single values SUN through SAT .
    • The minute, month, and year must be specified by * .
    • The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23 .
    • Each hour range must be >= 2 hours, for example, 0-2 or 20-23 .
    • The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.

    For more information about cron expressions, see cron on the Wikipedia website .

  • TagSpecifications (list) --

    The tags to apply to the event window.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'InstanceEventWindow': {
        'InstanceEventWindowId': 'string',
        'TimeRanges': [
            {
                'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'StartHour': 123,
                'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'EndHour': 123
            },
        ],
        'Name': 'string',
        'CronExpression': 'string',
        'AssociationTarget': {
            'InstanceIds': [
                'string',
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'DedicatedHostIds': [
                'string',
            ]
        },
        'State': 'creating'|'deleting'|'active'|'deleted',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • InstanceEventWindow (dict) --

      Information about the event window.

      • InstanceEventWindowId (string) --

        The ID of the event window.

      • TimeRanges (list) --

        One or more time ranges defined for the event window.

        • (dict) --

          The start day and time and the end day and time of the time range, in UTC.

          • StartWeekDay (string) --

            The day on which the time range begins.

          • StartHour (integer) --

            The hour when the time range begins.

          • EndWeekDay (string) --

            The day on which the time range ends.

          • EndHour (integer) --

            The hour when the time range ends.

      • Name (string) --

        The name of the event window.

      • CronExpression (string) --

        The cron expression defined for the event window.

      • AssociationTarget (dict) --

        One or more targets associated with the event window.

        • InstanceIds (list) --

          The IDs of the instances associated with the event window.

          • (string) --
        • Tags (list) --

          The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • DedicatedHostIds (list) --

          The IDs of the Dedicated Hosts associated with the event window.

          • (string) --
      • State (string) --

        The current state of the event window.

      • Tags (list) --

        The instance tags associated with the event window.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_instance_export_task(**kwargs)

Exports a running or stopped instance to an Amazon S3 bucket.

For information about the supported operating systems, image formats, and known limitations for the types of instances you can export, see Exporting an instance as a VM Using VM Import/Export in the VM Import/Export User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_instance_export_task(
    Description='string',
    ExportToS3Task={
        'ContainerFormat': 'ova',
        'DiskImageFormat': 'VMDK'|'RAW'|'VHD',
        'S3Bucket': 'string',
        'S3Prefix': 'string'
    },
    InstanceId='string',
    TargetEnvironment='citrix'|'vmware'|'microsoft',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • Description (string) -- A description for the conversion task or the resource being exported. The maximum length is 255 characters.
  • ExportToS3Task (dict) --

    [REQUIRED]

    The format and location for an export instance task.

    • ContainerFormat (string) --

      The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

    • DiskImageFormat (string) --

      The format for the exported image.

    • S3Bucket (string) --

      The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the Grantee . For more information about the ACL to your S3 bucket, see Prerequisites in the VM Import/Export User Guide.

    • S3Prefix (string) --

      The image is written to a single object in the Amazon S3 bucket at the S3 key s3prefix + exportTaskId + '.' + diskImageFormat.

  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • TargetEnvironment (string) --

    [REQUIRED]

    The target virtualization environment.

  • TagSpecifications (list) --

    The tags to apply to the export instance task during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'ExportTask': {
        'Description': 'string',
        'ExportTaskId': 'string',
        'ExportToS3Task': {
            'ContainerFormat': 'ova',
            'DiskImageFormat': 'VMDK'|'RAW'|'VHD',
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        'InstanceExportDetails': {
            'InstanceId': 'string',
            'TargetEnvironment': 'citrix'|'vmware'|'microsoft'
        },
        'State': 'active'|'cancelling'|'cancelled'|'completed',
        'StatusMessage': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • ExportTask (dict) --

      Information about the export instance task.

      • Description (string) --

        A description of the resource being exported.

      • ExportTaskId (string) --

        The ID of the export task.

      • ExportToS3Task (dict) --

        Information about the export task.

        • ContainerFormat (string) --

          The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

        • DiskImageFormat (string) --

          The format for the exported image.

        • S3Bucket (string) --

          The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the Grantee . For more information about the ACL to your S3 bucket, see Prerequisites in the VM Import/Export User Guide.

        • S3Key (string) --

          The encryption key for your S3 bucket.

      • InstanceExportDetails (dict) --

        Information about the instance to export.

        • InstanceId (string) --

          The ID of the resource being exported.

        • TargetEnvironment (string) --

          The target virtualization environment.

      • State (string) --

        The state of the export task.

      • StatusMessage (string) --

        The status message related to the export task.

      • Tags (list) --

        The tags for the export 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 256 Unicode characters.

create_internet_gateway(**kwargs)

Creates an internet gateway for use with a VPC. After creating the internet gateway, you attach it to a VPC using AttachInternetGateway .

For more information about your VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_internet_gateway(
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TagSpecifications (list) --

    The tags to assign to the internet gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InternetGateway': {
        'Attachments': [
            {
                'State': 'attaching'|'attached'|'detaching'|'detached',
                'VpcId': 'string'
            },
        ],
        'InternetGatewayId': 'string',
        'OwnerId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • InternetGateway (dict) --

      Information about the internet gateway.

      • Attachments (list) --

        Any VPCs attached to the internet gateway.

        • (dict) --

          Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

          • State (string) --

            The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

          • VpcId (string) --

            The ID of the VPC.

      • InternetGatewayId (string) --

        The ID of the internet gateway.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the internet gateway.

      • Tags (list) --

        Any tags assigned to the internet gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

Examples

This example creates an Internet gateway.

response = client.create_internet_gateway(
)

print(response)

Expected Output:

{
    'InternetGateway': {
        'Attachments': [
        ],
        'InternetGatewayId': 'igw-c0a643a9',
        'Tags': [
        ],
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_ipam(**kwargs)

Create an IPAM. Amazon VPC IP Address Manager (IPAM) is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization.

For more information, see Create an IPAM in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_ipam(
    DryRun=True|False,
    Description='string',
    OperatingRegions=[
        {
            'RegionName': 'string'
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Description (string) -- A description for the IPAM.
  • OperatingRegions (list) --

    The operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

    For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

    • (dict) --

      Add an operating Region to an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

      For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

      • RegionName (string) --

        The name of the operating Region.

  • TagSpecifications (list) --

    The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'Ipam': {
        'OwnerId': 'string',
        'IpamId': 'string',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'PublicDefaultScopeId': 'string',
        'PrivateDefaultScopeId': 'string',
        'ScopeCount': 123,
        'Description': 'string',
        'OperatingRegions': [
            {
                'RegionName': 'string'
            },
        ],
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Ipam (dict) --

      Information about the IPAM created.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the IPAM.

      • IpamId (string) --

        The ID of the IPAM.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM.

      • PublicDefaultScopeId (string) --

        The ID of the IPAM's default public scope.

      • PrivateDefaultScopeId (string) --

        The ID of the IPAM's default private scope.

      • ScopeCount (integer) --

        The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

      • Description (string) --

        The description for the IPAM.

      • OperatingRegions (list) --

        The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

        For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

        • (dict) --

          The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

          For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

          • RegionName (string) --

            The name of the operating Region.

      • State (string) --

        The state of the IPAM.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_ipam_pool(**kwargs)

Create an IP address pool for Amazon VPC IP Address Manager (IPAM). In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable you to organize your IP addresses according to your routing and security needs. For example, if you have separate routing and security needs for development and production applications, you can create a pool for each.

For more information, see Create a top-level pool in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_ipam_pool(
    DryRun=True|False,
    IpamScopeId='string',
    Locale='string',
    SourceIpamPoolId='string',
    Description='string',
    AddressFamily='ipv4'|'ipv6',
    AutoImport=True|False,
    PubliclyAdvertisable=True|False,
    AllocationMinNetmaskLength=123,
    AllocationMaxNetmaskLength=123,
    AllocationDefaultNetmaskLength=123,
    AllocationResourceTags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string',
    AwsService='ec2'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamScopeId (string) --

    [REQUIRED]

    The ID of the scope in which you would like to create the IPAM pool.

  • Locale (string) --

    In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you do not choose a locale, resources in Regions others than the IPAM's home region cannot use CIDRs from this pool.

    Possible values: Any Amazon Web Services Region, such as us-east-1.

  • SourceIpamPoolId (string) -- The ID of the source IPAM pool. Use this option to create a pool within an existing pool. Note that the CIDR you provision for the pool within the source pool must be available in the source pool's CIDR range.
  • Description (string) -- A description for the IPAM pool.
  • AddressFamily (string) --

    [REQUIRED]

    The IP protocol assigned to this IPAM pool. You must choose either IPv4 or IPv6 protocol for a pool.

  • AutoImport (boolean) --

    If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

    A locale must be set on the pool for this feature to work.

  • PubliclyAdvertisable (boolean) -- Determines if the pool is publicly advertisable. This option is not available for pools with AddressFamily set to ipv4 .
  • AllocationMinNetmaskLength (integer) -- The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
  • AllocationMaxNetmaskLength (integer) -- The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.
  • AllocationDefaultNetmaskLength (integer) -- The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
  • AllocationResourceTags (list) --

    Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.

    • (dict) --

      A tag on an IPAM resource.

      • Key (string) --

        The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Value (string) --

        The value for the tag.

  • TagSpecifications (list) --

    The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • AwsService (string) -- Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.
Return type

dict

Returns

Response Syntax

{
    'IpamPool': {
        'OwnerId': 'string',
        'IpamPoolId': 'string',
        'SourceIpamPoolId': 'string',
        'IpamPoolArn': 'string',
        'IpamScopeArn': 'string',
        'IpamScopeType': 'public'|'private',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'Locale': 'string',
        'PoolDepth': 123,
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'StateMessage': 'string',
        'Description': 'string',
        'AutoImport': True|False,
        'PubliclyAdvertisable': True|False,
        'AddressFamily': 'ipv4'|'ipv6',
        'AllocationMinNetmaskLength': 123,
        'AllocationMaxNetmaskLength': 123,
        'AllocationDefaultNetmaskLength': 123,
        'AllocationResourceTags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'AwsService': 'ec2'
    }
}

Response Structure

  • (dict) --

    • IpamPool (dict) --

      Information about the IPAM pool created.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the IPAM pool.

      • IpamPoolId (string) --

        The ID of the IPAM pool.

      • SourceIpamPoolId (string) --

        The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.

      • IpamPoolArn (string) --

        The ARN of the IPAM pool.

      • IpamScopeArn (string) --

        The ARN of the scope of the IPAM pool.

      • IpamScopeType (string) --

        In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM pool.

      • Locale (string) --

        The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.

      • PoolDepth (integer) --

        The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

      • State (string) --

        The state of the IPAM pool.

      • StateMessage (string) --

        A message related to the failed creation of an IPAM pool.

      • Description (string) --

        The description of the IPAM pool.

      • AutoImport (boolean) --

        If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

        A locale must be set on the pool for this feature to work.

      • PubliclyAdvertisable (boolean) --

        Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to ipv4 .

      • AddressFamily (string) --

        The address family of the pool.

      • AllocationMinNetmaskLength (integer) --

        The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

      • AllocationMaxNetmaskLength (integer) --

        The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

      • AllocationDefaultNetmaskLength (integer) --

        The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.

      • AllocationResourceTags (list) --

        Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.

        • (dict) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • Key (string) --

            The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

          • Value (string) --

            The value of the tag.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • AwsService (string) --

        Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.

create_ipam_scope(**kwargs)

Create an IPAM scope. In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

For more information, see Add a scope in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_ipam_scope(
    DryRun=True|False,
    IpamId='string',
    Description='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamId (string) --

    [REQUIRED]

    The ID of the IPAM for which you're creating this scope.

  • Description (string) -- A description for the scope you're creating.
  • TagSpecifications (list) --

    The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'IpamScope': {
        'OwnerId': 'string',
        'IpamScopeId': 'string',
        'IpamScopeArn': 'string',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'IpamScopeType': 'public'|'private',
        'IsDefault': True|False,
        'Description': 'string',
        'PoolCount': 123,
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • IpamScope (dict) --

      Information about the created scope.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the scope.

      • IpamScopeId (string) --

        The ID of the scope.

      • IpamScopeArn (string) --

        The ARN of the scope.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM scope.

      • IpamScopeType (string) --

        The type of the scope.

      • IsDefault (boolean) --

        Defines if the scope is the default scope or not.

      • Description (string) --

        The description of the scope.

      • PoolCount (integer) --

        The number of pools in the scope.

      • State (string) --

        The state of the IPAM scope.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_key_pair(**kwargs)

Creates an ED25519 or 2048-bit RSA key pair with the specified name and in the specified PEM or PPK format. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#1 private key or an unencrypted PPK formatted private key for use with PuTTY. If a key with the specified name already exists, Amazon EC2 returns an error.

The key pair returned to you is available only in the Amazon Web Services Region in which you create it. If you prefer, you can create your own key pair using a third-party tool and upload it to any Region using ImportKeyPair .

You can have up to 5,000 key pairs per Amazon Web Services Region.

For more information, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_key_pair(
    KeyName='string',
    DryRun=True|False,
    KeyType='rsa'|'ed25519',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    KeyFormat='pem'|'ppk'
)
Parameters
  • KeyName (string) --

    [REQUIRED]

    A unique name for the key pair.

    Constraints: Up to 255 ASCII characters

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • KeyType (string) --

    The type of key pair. Note that ED25519 keys are not supported for Windows instances.

    Default: rsa

  • TagSpecifications (list) --

    The tags to apply to the new key pair.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • KeyFormat (string) --

    The format of the key pair.

    Default: pem

Return type

dict

Returns

Response Syntax

{
    'KeyFingerprint': 'string',
    'KeyMaterial': 'string',
    'KeyName': 'string',
    'KeyPairId': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Describes a key pair.

    • KeyFingerprint (string) --

      • For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
      • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
    • KeyMaterial (string) --

      An unencrypted PEM encoded RSA or ED25519 private key.

    • KeyName (string) --

      The name of the key pair.

    • KeyPairId (string) --

      The ID of the key pair.

    • Tags (list) --

      Any tags applied to the key pair.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

Examples

This example creates a key pair named my-key-pair.

response = client.create_key_pair(
    KeyName='my-key-pair',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
create_launch_template(**kwargs)

Creates a launch template.

A launch template contains the parameters to launch an instance. When you launch an instance using RunInstances , you can specify a launch template instead of providing the launch parameters in the request. For more information, see Launch an instance from a launch template in the Amazon Elastic Compute Cloud User Guide .

If you want to clone an existing launch template as the basis for creating a new launch template, you can use the Amazon EC2 console. The API, SDKs, and CLI do not support cloning a template. For more information, see Create a launch template from an existing launch template in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_launch_template(
    DryRun=True|False,
    ClientToken='string',
    LaunchTemplateName='string',
    VersionDescription='string',
    LaunchTemplateData={
        'KernelId': 'string',
        'EbsOptimized': True|False,
        'IamInstanceProfile': {
            'Arn': 'string',
            'Name': 'string'
        },
        'BlockDeviceMappings': [
            {
                'DeviceName': 'string',
                'VirtualName': 'string',
                'Ebs': {
                    'Encrypted': True|False,
                    'DeleteOnTermination': True|False,
                    'Iops': 123,
                    'KmsKeyId': 'string',
                    'SnapshotId': 'string',
                    'VolumeSize': 123,
                    'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                    'Throughput': 123
                },
                'NoDevice': 'string'
            },
        ],
        'NetworkInterfaces': [
            {
                'AssociateCarrierIpAddress': True|False,
                'AssociatePublicIpAddress': True|False,
                'DeleteOnTermination': True|False,
                'Description': 'string',
                'DeviceIndex': 123,
                'Groups': [
                    'string',
                ],
                'InterfaceType': 'string',
                'Ipv6AddressCount': 123,
                'Ipv6Addresses': [
                    {
                        'Ipv6Address': 'string'
                    },
                ],
                'NetworkInterfaceId': 'string',
                'PrivateIpAddress': 'string',
                'PrivateIpAddresses': [
                    {
                        'Primary': True|False,
                        'PrivateIpAddress': 'string'
                    },
                ],
                'SecondaryPrivateIpAddressCount': 123,
                'SubnetId': 'string',
                'NetworkCardIndex': 123,
                'Ipv4Prefixes': [
                    {
                        'Ipv4Prefix': 'string'
                    },
                ],
                'Ipv4PrefixCount': 123,
                'Ipv6Prefixes': [
                    {
                        'Ipv6Prefix': 'string'
                    },
                ],
                'Ipv6PrefixCount': 123
            },
        ],
        'ImageId': 'string',
        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
        'KeyName': 'string',
        'Monitoring': {
            'Enabled': True|False
        },
        'Placement': {
            'AvailabilityZone': 'string',
            'Affinity': 'string',
            'GroupName': 'string',
            'HostId': 'string',
            'Tenancy': 'default'|'dedicated'|'host',
            'SpreadDomain': 'string',
            'HostResourceGroupArn': 'string',
            'PartitionNumber': 123
        },
        'RamDiskId': 'string',
        'DisableApiTermination': True|False,
        'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
        'UserData': 'string',
        'TagSpecifications': [
            {
                'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
        ],
        'ElasticGpuSpecifications': [
            {
                'Type': 'string'
            },
        ],
        'ElasticInferenceAccelerators': [
            {
                'Type': 'string',
                'Count': 123
            },
        ],
        'SecurityGroupIds': [
            'string',
        ],
        'SecurityGroups': [
            'string',
        ],
        'InstanceMarketOptions': {
            'MarketType': 'spot',
            'SpotOptions': {
                'MaxPrice': 'string',
                'SpotInstanceType': 'one-time'|'persistent',
                'BlockDurationMinutes': 123,
                'ValidUntil': datetime(2015, 1, 1),
                'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
            }
        },
        'CreditSpecification': {
            'CpuCredits': 'string'
        },
        'CpuOptions': {
            'CoreCount': 123,
            'ThreadsPerCore': 123
        },
        'CapacityReservationSpecification': {
            'CapacityReservationPreference': 'open'|'none',
            'CapacityReservationTarget': {
                'CapacityReservationId': 'string',
                'CapacityReservationResourceGroupArn': 'string'
            }
        },
        'LicenseSpecifications': [
            {
                'LicenseConfigurationArn': 'string'
            },
        ],
        'HibernationOptions': {
            'Configured': True|False
        },
        'MetadataOptions': {
            'HttpTokens': 'optional'|'required',
            'HttpPutResponseHopLimit': 123,
            'HttpEndpoint': 'disabled'|'enabled',
            'HttpProtocolIpv6': 'disabled'|'enabled',
            'InstanceMetadataTags': 'disabled'|'enabled'
        },
        'EnclaveOptions': {
            'Enabled': True|False
        },
        'InstanceRequirements': {
            'VCpuCount': {
                'Min': 123,
                'Max': 123
            },
            'MemoryMiB': {
                'Min': 123,
                'Max': 123
            },
            'CpuManufacturers': [
                'intel'|'amd'|'amazon-web-services',
            ],
            'MemoryGiBPerVCpu': {
                'Min': 123.0,
                'Max': 123.0
            },
            'ExcludedInstanceTypes': [
                'string',
            ],
            'InstanceGenerations': [
                'current'|'previous',
            ],
            'SpotMaxPricePercentageOverLowestPrice': 123,
            'OnDemandMaxPricePercentageOverLowestPrice': 123,
            'BareMetal': 'included'|'required'|'excluded',
            'BurstablePerformance': 'included'|'required'|'excluded',
            'RequireHibernateSupport': True|False,
            'NetworkInterfaceCount': {
                'Min': 123,
                'Max': 123
            },
            'LocalStorage': 'included'|'required'|'excluded',
            'LocalStorageTypes': [
                'hdd'|'ssd',
            ],
            'TotalLocalStorageGB': {
                'Min': 123.0,
                'Max': 123.0
            },
            'BaselineEbsBandwidthMbps': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorTypes': [
                'gpu'|'fpga'|'inference',
            ],
            'AcceleratorCount': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorManufacturers': [
                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
            ],
            'AcceleratorNames': [
                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
            ],
            'AcceleratorTotalMemoryMiB': {
                'Min': 123,
                'Max': 123
            }
        },
        'PrivateDnsNameOptions': {
            'HostnameType': 'ip-name'|'resource-name',
            'EnableResourceNameDnsARecord': True|False,
            'EnableResourceNameDnsAAAARecord': True|False
        },
        'MaintenanceOptions': {
            'AutoRecovery': 'default'|'disabled'
        },
        'DisableApiStop': True|False
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    Constraint: Maximum 128 ASCII characters.

  • LaunchTemplateName (string) --

    [REQUIRED]

    A name for the launch template.

  • VersionDescription (string) -- A description for the first version of the launch template.
  • LaunchTemplateData (dict) --

    [REQUIRED]

    The information for the launch template.

    • KernelId (string) --

      The ID of the kernel.

      Warning

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

    • EbsOptimized (boolean) --

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

    • IamInstanceProfile (dict) --

      The name or Amazon Resource Name (ARN) of an IAM instance profile.

      • Arn (string) --

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

      • Name (string) --

        The name of the instance profile.

    • BlockDeviceMappings (list) --

      The block device mapping.

      • (dict) --

        Describes a block device mapping.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh).

        • VirtualName (string) --

          The virtual device name (ephemeralN). 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.

        • Ebs (dict) --

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

          • Encrypted (boolean) --

            Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.

          • DeleteOnTermination (boolean) --

            Indicates whether the EBS volume is deleted on instance termination.

          • Iops (integer) --

            The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3 : 3,000-16,000 IOPS
            • io1 : 100-64,000 IOPS
            • io2 : 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is supported for io1 , io2 , and gp3 volumes only. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

          • KmsKeyId (string) --

            The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.

          • SnapshotId (string) --

            The ID of the snapshot.

          • VolumeSize (integer) --

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:

            • gp2 and gp3 : 1-16,384
            • io1 and io2 : 4-16,384
            • st1 and sc1 : 125-16,384
            • standard : 1-1,024
          • VolumeType (string) --

            The volume type. For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide .

          • Throughput (integer) --

            The throughput to provision for a gp3 volume, with a maximum of 1,000 MiB/s.

            Valid Range: Minimum value of 125. Maximum value of 1000.

        • NoDevice (string) --

          To omit the device from the block device mapping, specify an empty string.

    • NetworkInterfaces (list) --

      One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

      • (dict) --

        The parameters for a network interface.

        • AssociateCarrierIpAddress (boolean) --

          Associates a Carrier IP address with eth0 for a new network interface.

          Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide .

        • AssociatePublicIpAddress (boolean) --

          Associates a public IPv4 address with eth0 for a new network interface.

        • DeleteOnTermination (boolean) --

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

        • Description (string) --

          A description for the network interface.

        • DeviceIndex (integer) --

          The device index for the network interface attachment.

        • Groups (list) --

          The IDs of one or more security groups.

          • (string) --
        • InterfaceType (string) --

          The type of network interface. To create an Elastic Fabric Adapter (EFA), specify efa . For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide .

          If you are not creating an EFA, specify interface or omit this parameter.

          Valid values: interface | efa

        • Ipv6AddressCount (integer) --

          The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.

        • Ipv6Addresses (list) --

          One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

          • (dict) --

            Describes an IPv6 address.

            • Ipv6Address (string) --

              The IPv6 address.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • PrivateIpAddress (string) --

          The primary private IPv4 address of the network interface.

        • PrivateIpAddresses (list) --

          One or more private IPv4 addresses.

          • (dict) --

            Describes a secondary private IPv4 address for a network interface.

            • Primary (boolean) --

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

            • PrivateIpAddress (string) --

              The private IPv4 addresses.

        • SecondaryPrivateIpAddressCount (integer) --

          The number of secondary private IPv4 addresses to assign to a network interface.

        • SubnetId (string) --

          The ID of the subnet for the network interface.

        • NetworkCardIndex (integer) --

          The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        • Ipv4Prefixes (list) --

          One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

        • Ipv4PrefixCount (integer) --

          The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

        • Ipv6Prefixes (list) --

          One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

          • (dict) --

            Describes the IPv4 prefix option for a network interface.

            • Ipv6Prefix (string) --

              The IPv6 prefix.

        • Ipv6PrefixCount (integer) --

          The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

    • ImageId (string) --

      The ID of the AMI.

    • InstanceType (string) --

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

      If you specify InstanceTypes , you can't specify InstanceRequirements .

    • KeyName (string) --

      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.

    • Monitoring (dict) --

      The monitoring for the instance.

      • Enabled (boolean) --

        Specify true to enable detailed monitoring. Otherwise, basic monitoring is enabled.

    • Placement (dict) --

      The placement for the instance.

      • AvailabilityZone (string) --

        The Availability Zone for the instance.

      • Affinity (string) --

        The affinity setting for an instance on a Dedicated Host.

      • GroupName (string) --

        The name of the placement group for the instance.

      • HostId (string) --

        The ID of the Dedicated Host for the instance.

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

      • SpreadDomain (string) --

        Reserved for future use.

      • HostResourceGroupArn (string) --

        The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

      • PartitionNumber (integer) --

        The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition .

    • RamDiskId (string) --

      The ID of the RAM disk.

      Warning

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

    • DisableApiTermination (boolean) --

      If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from 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).

      Default: stop

    • UserData (string) --

      The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Run commands on your Linux instance at launch (Linux) or Work with instance user data (Windows) in the Amazon Elastic Compute Cloud User Guide .

      If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format . For more information, see Amazon EC2 user data in launch templates in the Batch User Guide .

    • TagSpecifications (list) --

      The tags to apply to the resources that are created during instance launch.

      You can specify tags for the following resources only:

      • Instances
      • Volumes
      • Elastic graphics
      • Spot Instance requests
      • Network interfaces

      To tag a resource after it has been created, see CreateTags .

      Note

      To tag the launch template itself, you must use the TagSpecification parameter.

      • (dict) --

        The tags specification for the resources that are created during instance launch.

        • ResourceType (string) --

          The type of resource to tag.

          The Valid Values are all the resource types that can be tagged. However, when creating a launch template, you can specify tags for the following resource types only: instance | volume | elastic-gpu | network-interface | spot-instances-request

          To tag a resource after it has been created, see CreateTags .

        • Tags (list) --

          The tags to apply 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 256 Unicode characters.

    • ElasticGpuSpecifications (list) --

      An elastic GPU to associate with the instance.

      • (dict) --

        A specification for an Elastic Graphics accelerator.

        • Type (string) -- [REQUIRED]

          The type of Elastic Graphics accelerator. For more information about the values to specify for Type , see Elastic Graphics Basics , specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances .

    • ElasticInferenceAccelerators (list) --

      The elastic inference accelerator for the instance.

      • (dict) --

        Describes an elastic inference accelerator.

        • Type (string) -- [REQUIRED]

          The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

        • Count (integer) --

          The number of elastic inference accelerators to attach to the instance.

          Default: 1

    • SecurityGroupIds (list) --

      One or more security group IDs. You can create a security group using CreateSecurityGroup . You cannot specify both a security group ID and security name in the same request.

      • (string) --
    • SecurityGroups (list) --

      One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.

      • (string) --
    • InstanceMarketOptions (dict) --

      The market (purchasing) option for the instances.

      • MarketType (string) --

        The market type.

      • SpotOptions (dict) --

        The options for Spot Instances.

        • MaxPrice (string) --

          The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

        • SpotInstanceType (string) --

          The Spot Instance request type.

        • BlockDurationMinutes (integer) --

          Deprecated.

        • ValidUntil (datetime) --

          The end date of the request, in UTC format (YYYY-MM-DD T*HH:MM:SS* Z). Supported only for persistent requests.

          • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.
          • For a one-time request, ValidUntil is not supported. The request remains active until all instances launch or you cancel the request.

          Default: 7 days from the current date

        • InstanceInterruptionBehavior (string) --

          The behavior when a Spot Instance is interrupted. The default is terminate .

    • CreditSpecification (dict) --

      The credit option for CPU usage of the instance. Valid only for T instances.

      • CpuCredits (string) -- [REQUIRED]

        The credit option for CPU usage of a T instance.

        Valid values: standard | unlimited

    • CpuOptions (dict) --

      The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide .

      • CoreCount (integer) --

        The number of CPU cores for the instance.

      • ThreadsPerCore (integer) --

        The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1 . Otherwise, specify the default value of 2 .

    • CapacityReservationSpecification (dict) --

      The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open , which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

      • CapacityReservationPreference (string) --

        Indicates the instance's Capacity Reservation preferences. Possible preferences include:

        • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
        • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
      • CapacityReservationTarget (dict) --

        Information about the target Capacity Reservation or Capacity Reservation group.

        • CapacityReservationId (string) --

          The ID of the Capacity Reservation in which to run the instance.

        • CapacityReservationResourceGroupArn (string) --

          The ARN of the Capacity Reservation resource group in which to run the instance.

    • LicenseSpecifications (list) --

      The license configurations.

      • (dict) --

        Describes a license configuration.

        • LicenseConfigurationArn (string) --

          The Amazon Resource Name (ARN) of the license configuration.

    • HibernationOptions (dict) --

      Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .

      • Configured (boolean) --

        If you set this parameter to true , the instance is enabled for hibernation.

        Default: false

    • MetadataOptions (dict) --

      The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .

      • HttpTokens (string) --

        The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional .

        If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

        If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

      • HttpPutResponseHopLimit (integer) --

        The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

        Default: 1

        Possible values: Integers from 1 to 64

      • HttpEndpoint (string) --

        Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled .

        Note

        If you specify a value of disabled , you will not be able to access your instance metadata.

      • HttpProtocolIpv6 (string) --

        Enables or disables the IPv6 endpoint for the instance metadata service.

        Default: disabled

      • InstanceMetadataTags (string) --

        Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

        Default: disabled

    • EnclaveOptions (dict) --

      Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide .

      You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

      • Enabled (boolean) --

        To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true .

    • InstanceRequirements (dict) --

      The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

      If you specify InstanceRequirements , you can't specify InstanceTypes .

      • VCpuCount (dict) -- [REQUIRED]

        The minimum and maximum number of vCPUs.

        • Min (integer) -- [REQUIRED]

          The minimum number of vCPUs. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

      • MemoryMiB (dict) -- [REQUIRED]

        The minimum and maximum amount of memory, in MiB.

        • Min (integer) -- [REQUIRED]

          The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

      • CpuManufacturers (list) --

        The CPU manufacturers to include.

        • For instance types with Intel CPUs, specify intel .
        • For instance types with AMD CPUs, specify amd .
        • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

        Note

        Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

        Default: Any manufacturer

        • (string) --
      • MemoryGiBPerVCpu (dict) --

        The minimum and maximum amount of memory per vCPU, in GiB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

      • ExcludedInstanceTypes (list) --

        The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

        For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

        Default: No excluded instance types

        • (string) --
      • InstanceGenerations (list) --

        Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

        For current generation instance types, specify current .

        For previous generation instance types, specify previous .

        Default: Current and previous generation instance types

        • (string) --
      • SpotMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 100

      • OnDemandMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 20

      • BareMetal (string) --

        Indicates whether bare metal instance types must be included, excluded, or required.

        • To include bare metal instance types, specify included .
        • To require only bare metal instance types, specify required .
        • To exclude bare metal instance types, specify excluded .

        Default: excluded

      • BurstablePerformance (string) --

        Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

        • To include burstable performance instance types, specify included .
        • To require only burstable performance instance types, specify required .
        • To exclude burstable performance instance types, specify excluded .

        Default: excluded

      • RequireHibernateSupport (boolean) --

        Indicates whether instance types must support hibernation for On-Demand Instances.

        This parameter is not supported for GetSpotPlacementScores .

        Default: false

      • NetworkInterfaceCount (dict) --

        The minimum and maximum number of network interfaces.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

      • LocalStorage (string) --

        Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

        • To include instance types with instance store volumes, specify included .
        • To require only instance types with instance store volumes, specify required .
        • To exclude instance types with instance store volumes, specify excluded .

        Default: included

      • LocalStorageTypes (list) --

        The type of local storage that is required.

        • For instance types with hard disk drive (HDD) storage, specify hdd .
        • For instance types with solid state drive (SSD) storage, specify ssd .

        Default: hdd and ssd

        • (string) --
      • TotalLocalStorageGB (dict) --

        The minimum and maximum amount of total local storage, in GB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

      • BaselineEbsBandwidthMbps (dict) --

        The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

      • AcceleratorTypes (list) --

        The accelerator types that must be on the instance type.

        • To include instance types with GPU hardware, specify gpu .
        • To include instance types with FPGA hardware, specify fpga .
        • To include instance types with inference hardware, specify inference .

        Default: Any accelerator type

        • (string) --
      • AcceleratorCount (dict) --

        The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

        To exclude accelerator-enabled instance types, set Max to 0 .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of accelerators. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

      • AcceleratorManufacturers (list) --

        Indicates whether instance types must have accelerators by specific manufacturers.

        • For instance types with NVIDIA devices, specify nvidia .
        • For instance types with AMD devices, specify amd .
        • For instance types with Amazon Web Services devices, specify amazon-web-services .
        • For instance types with Xilinx devices, specify xilinx .

        Default: Any manufacturer

        • (string) --
      • AcceleratorNames (list) --

        The accelerators that must be on the instance type.

        • For instance types with NVIDIA A100 GPUs, specify a100 .
        • For instance types with NVIDIA V100 GPUs, specify v100 .
        • For instance types with NVIDIA K80 GPUs, specify k80 .
        • For instance types with NVIDIA T4 GPUs, specify t4 .
        • For instance types with NVIDIA M60 GPUs, specify m60 .
        • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
        • For instance types with Xilinx VU9P FPGAs, specify vu9p .

        Default: Any accelerator

        • (string) --
      • AcceleratorTotalMemoryMiB (dict) --

        The minimum and maximum amount of total accelerator memory, in MiB.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

    • PrivateDnsNameOptions (dict) --

      The options for the instance hostname. The default values are inherited from the subnet.

      • HostnameType (string) --

        The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

      • EnableResourceNameDnsARecord (boolean) --

        Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

      • EnableResourceNameDnsAAAARecord (boolean) --

        Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

    • MaintenanceOptions (dict) --

      The maintenance options for the instance.

      • AutoRecovery (string) --

        Disables the automatic recovery behavior of your instance or sets it to default. For more information, see Simplified automatic recovery .

    • DisableApiStop (boolean) --

      Indicates whether to enable the instance for stop protection. For more information, see Stop Protection .

  • TagSpecifications (list) --

    The tags to apply to the launch template on creation. To tag the launch template, the resource type must be launch-template .

    Note

    To specify the tags for the resources that are created when an instance is launched, you must use the TagSpecifications parameter in the launch template data structure.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'LaunchTemplate': {
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'CreateTime': datetime(2015, 1, 1),
        'CreatedBy': 'string',
        'DefaultVersionNumber': 123,
        'LatestVersionNumber': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    'Warning': {
        'Errors': [
            {
                'Code': 'string',
                'Message': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LaunchTemplate (dict) --

      Information about the launch template.

      • LaunchTemplateId (string) --

        The ID of the launch template.

      • LaunchTemplateName (string) --

        The name of the launch template.

      • CreateTime (datetime) --

        The time launch template was created.

      • CreatedBy (string) --

        The principal that created the launch template.

      • DefaultVersionNumber (integer) --

        The version number of the default version of the launch template.

      • LatestVersionNumber (integer) --

        The version number of the latest version of the launch template.

      • Tags (list) --

        The tags for the launch template.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

    • Warning (dict) --

      If the launch template contains parameters or parameter combinations that are not valid, an error code and an error message are returned for each issue that's found.

      • Errors (list) --

        The error codes and error messages.

        • (dict) --

          The error code and error message that is returned for a parameter or parameter combination that is not valid when a new launch template or new version of a launch template is created.

          • Code (string) --

            The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see Error codes .

          • Message (string) --

            The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see Error codes .

Examples

This example creates a launch template that specifies the subnet in which to launch the instance, assigns a public IP address and an IPv6 address to the instance, and creates a tag for the instance.

response = client.create_launch_template(
    LaunchTemplateData={
        'ImageId': 'ami-8c1be5f6',
        'InstanceType': 't2.small',
        'NetworkInterfaces': [
            {
                'AssociatePublicIpAddress': True,
                'DeviceIndex': 0,
                'Ipv6AddressCount': 1,
                'SubnetId': 'subnet-7b16de0c',
            },
        ],
        'TagSpecifications': [
            {
                'ResourceType': 'instance',
                'Tags': [
                    {
                        'Key': 'Name',
                        'Value': 'webserver',
                    },
                ],
            },
        ],
    },
    LaunchTemplateName='my-template',
    VersionDescription='WebVersion1',
)

print(response)

Expected Output:

{
    'LaunchTemplate': {
        'CreateTime': datetime(2017, 11, 27, 9, 13, 24, 0, 331, 0),
        'CreatedBy': 'arn:aws:iam::123456789012:root',
        'DefaultVersionNumber': 1,
        'LatestVersionNumber': 1,
        'LaunchTemplateId': 'lt-01238c059e3466abc',
        'LaunchTemplateName': 'my-template',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_launch_template_version(**kwargs)

Creates a new version of a launch template. You can specify an existing version of launch template from which to base the new version.

Launch template versions are numbered in the order in which they are created. You cannot specify, change, or replace the numbering of launch template versions.

Launch templates are immutable; after you create a launch template, you can't modify it. Instead, you can create a new version of the launch template that includes any changes you require.

For more information, see Modify a launch template (manage launch template versions) in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_launch_template_version(
    DryRun=True|False,
    ClientToken='string',
    LaunchTemplateId='string',
    LaunchTemplateName='string',
    SourceVersion='string',
    VersionDescription='string',
    LaunchTemplateData={
        'KernelId': 'string',
        'EbsOptimized': True|False,
        'IamInstanceProfile': {
            'Arn': 'string',
            'Name': 'string'
        },
        'BlockDeviceMappings': [
            {
                'DeviceName': 'string',
                'VirtualName': 'string',
                'Ebs': {
                    'Encrypted': True|False,
                    'DeleteOnTermination': True|False,
                    'Iops': 123,
                    'KmsKeyId': 'string',
                    'SnapshotId': 'string',
                    'VolumeSize': 123,
                    'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                    'Throughput': 123
                },
                'NoDevice': 'string'
            },
        ],
        'NetworkInterfaces': [
            {
                'AssociateCarrierIpAddress': True|False,
                'AssociatePublicIpAddress': True|False,
                'DeleteOnTermination': True|False,
                'Description': 'string',
                'DeviceIndex': 123,
                'Groups': [
                    'string',
                ],
                'InterfaceType': 'string',
                'Ipv6AddressCount': 123,
                'Ipv6Addresses': [
                    {
                        'Ipv6Address': 'string'
                    },
                ],
                'NetworkInterfaceId': 'string',
                'PrivateIpAddress': 'string',
                'PrivateIpAddresses': [
                    {
                        'Primary': True|False,
                        'PrivateIpAddress': 'string'
                    },
                ],
                'SecondaryPrivateIpAddressCount': 123,
                'SubnetId': 'string',
                'NetworkCardIndex': 123,
                'Ipv4Prefixes': [
                    {
                        'Ipv4Prefix': 'string'
                    },
                ],
                'Ipv4PrefixCount': 123,
                'Ipv6Prefixes': [
                    {
                        'Ipv6Prefix': 'string'
                    },
                ],
                'Ipv6PrefixCount': 123
            },
        ],
        'ImageId': 'string',
        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
        'KeyName': 'string',
        'Monitoring': {
            'Enabled': True|False
        },
        'Placement': {
            'AvailabilityZone': 'string',
            'Affinity': 'string',
            'GroupName': 'string',
            'HostId': 'string',
            'Tenancy': 'default'|'dedicated'|'host',
            'SpreadDomain': 'string',
            'HostResourceGroupArn': 'string',
            'PartitionNumber': 123
        },
        'RamDiskId': 'string',
        'DisableApiTermination': True|False,
        'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
        'UserData': 'string',
        'TagSpecifications': [
            {
                'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
        ],
        'ElasticGpuSpecifications': [
            {
                'Type': 'string'
            },
        ],
        'ElasticInferenceAccelerators': [
            {
                'Type': 'string',
                'Count': 123
            },
        ],
        'SecurityGroupIds': [
            'string',
        ],
        'SecurityGroups': [
            'string',
        ],
        'InstanceMarketOptions': {
            'MarketType': 'spot',
            'SpotOptions': {
                'MaxPrice': 'string',
                'SpotInstanceType': 'one-time'|'persistent',
                'BlockDurationMinutes': 123,
                'ValidUntil': datetime(2015, 1, 1),
                'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
            }
        },
        'CreditSpecification': {
            'CpuCredits': 'string'
        },
        'CpuOptions': {
            'CoreCount': 123,
            'ThreadsPerCore': 123
        },
        'CapacityReservationSpecification': {
            'CapacityReservationPreference': 'open'|'none',
            'CapacityReservationTarget': {
                'CapacityReservationId': 'string',
                'CapacityReservationResourceGroupArn': 'string'
            }
        },
        'LicenseSpecifications': [
            {
                'LicenseConfigurationArn': 'string'
            },
        ],
        'HibernationOptions': {
            'Configured': True|False
        },
        'MetadataOptions': {
            'HttpTokens': 'optional'|'required',
            'HttpPutResponseHopLimit': 123,
            'HttpEndpoint': 'disabled'|'enabled',
            'HttpProtocolIpv6': 'disabled'|'enabled',
            'InstanceMetadataTags': 'disabled'|'enabled'
        },
        'EnclaveOptions': {
            'Enabled': True|False
        },
        'InstanceRequirements': {
            'VCpuCount': {
                'Min': 123,
                'Max': 123
            },
            'MemoryMiB': {
                'Min': 123,
                'Max': 123
            },
            'CpuManufacturers': [
                'intel'|'amd'|'amazon-web-services',
            ],
            'MemoryGiBPerVCpu': {
                'Min': 123.0,
                'Max': 123.0
            },
            'ExcludedInstanceTypes': [
                'string',
            ],
            'InstanceGenerations': [
                'current'|'previous',
            ],
            'SpotMaxPricePercentageOverLowestPrice': 123,
            'OnDemandMaxPricePercentageOverLowestPrice': 123,
            'BareMetal': 'included'|'required'|'excluded',
            'BurstablePerformance': 'included'|'required'|'excluded',
            'RequireHibernateSupport': True|False,
            'NetworkInterfaceCount': {
                'Min': 123,
                'Max': 123
            },
            'LocalStorage': 'included'|'required'|'excluded',
            'LocalStorageTypes': [
                'hdd'|'ssd',
            ],
            'TotalLocalStorageGB': {
                'Min': 123.0,
                'Max': 123.0
            },
            'BaselineEbsBandwidthMbps': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorTypes': [
                'gpu'|'fpga'|'inference',
            ],
            'AcceleratorCount': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorManufacturers': [
                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
            ],
            'AcceleratorNames': [
                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
            ],
            'AcceleratorTotalMemoryMiB': {
                'Min': 123,
                'Max': 123
            }
        },
        'PrivateDnsNameOptions': {
            'HostnameType': 'ip-name'|'resource-name',
            'EnableResourceNameDnsARecord': True|False,
            'EnableResourceNameDnsAAAARecord': True|False
        },
        'MaintenanceOptions': {
            'AutoRecovery': 'default'|'disabled'
        },
        'DisableApiStop': True|False
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    Constraint: Maximum 128 ASCII characters.

  • LaunchTemplateId (string) --

    The ID of the launch template.

    You must specify either the LaunchTemplateId or the LaunchTemplateName , but not both.

  • LaunchTemplateName (string) --

    The name of the launch template.

    You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

  • SourceVersion (string) -- The version number of the launch template version on which to base the new version. The new version inherits the same launch parameters as the source version, except for parameters that you specify in LaunchTemplateData . Snapshots applied to the block device mapping are ignored when creating a new version unless they are explicitly included.
  • VersionDescription (string) -- A description for the version of the launch template.
  • LaunchTemplateData (dict) --

    [REQUIRED]

    The information for the launch template.

    • KernelId (string) --

      The ID of the kernel.

      Warning

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

    • EbsOptimized (boolean) --

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

    • IamInstanceProfile (dict) --

      The name or Amazon Resource Name (ARN) of an IAM instance profile.

      • Arn (string) --

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

      • Name (string) --

        The name of the instance profile.

    • BlockDeviceMappings (list) --

      The block device mapping.

      • (dict) --

        Describes a block device mapping.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh).

        • VirtualName (string) --

          The virtual device name (ephemeralN). 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.

        • Ebs (dict) --

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

          • Encrypted (boolean) --

            Indicates whether the EBS volume is encrypted. Encrypted volumes can only be attached to instances that support Amazon EBS encryption. If you are creating a volume from a snapshot, you can't specify an encryption value.

          • DeleteOnTermination (boolean) --

            Indicates whether the EBS volume is deleted on instance termination.

          • Iops (integer) --

            The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3 : 3,000-16,000 IOPS
            • io1 : 100-64,000 IOPS
            • io2 : 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is supported for io1 , io2 , and gp3 volumes only. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

          • KmsKeyId (string) --

            The ARN of the symmetric Key Management Service (KMS) CMK used for encryption.

          • SnapshotId (string) --

            The ID of the snapshot.

          • VolumeSize (integer) --

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. The following are the supported volumes sizes for each volume type:

            • gp2 and gp3 : 1-16,384
            • io1 and io2 : 4-16,384
            • st1 and sc1 : 125-16,384
            • standard : 1-1,024
          • VolumeType (string) --

            The volume type. For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide .

          • Throughput (integer) --

            The throughput to provision for a gp3 volume, with a maximum of 1,000 MiB/s.

            Valid Range: Minimum value of 125. Maximum value of 1000.

        • NoDevice (string) --

          To omit the device from the block device mapping, specify an empty string.

    • NetworkInterfaces (list) --

      One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

      • (dict) --

        The parameters for a network interface.

        • AssociateCarrierIpAddress (boolean) --

          Associates a Carrier IP address with eth0 for a new network interface.

          Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide .

        • AssociatePublicIpAddress (boolean) --

          Associates a public IPv4 address with eth0 for a new network interface.

        • DeleteOnTermination (boolean) --

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

        • Description (string) --

          A description for the network interface.

        • DeviceIndex (integer) --

          The device index for the network interface attachment.

        • Groups (list) --

          The IDs of one or more security groups.

          • (string) --
        • InterfaceType (string) --

          The type of network interface. To create an Elastic Fabric Adapter (EFA), specify efa . For more information, see Elastic Fabric Adapter in the Amazon Elastic Compute Cloud User Guide .

          If you are not creating an EFA, specify interface or omit this parameter.

          Valid values: interface | efa

        • Ipv6AddressCount (integer) --

          The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses.

        • Ipv6Addresses (list) --

          One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

          • (dict) --

            Describes an IPv6 address.

            • Ipv6Address (string) --

              The IPv6 address.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • PrivateIpAddress (string) --

          The primary private IPv4 address of the network interface.

        • PrivateIpAddresses (list) --

          One or more private IPv4 addresses.

          • (dict) --

            Describes a secondary private IPv4 address for a network interface.

            • Primary (boolean) --

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

            • PrivateIpAddress (string) --

              The private IPv4 addresses.

        • SecondaryPrivateIpAddressCount (integer) --

          The number of secondary private IPv4 addresses to assign to a network interface.

        • SubnetId (string) --

          The ID of the subnet for the network interface.

        • NetworkCardIndex (integer) --

          The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        • Ipv4Prefixes (list) --

          One or more IPv4 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

        • Ipv4PrefixCount (integer) --

          The number of IPv4 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

        • Ipv6Prefixes (list) --

          One or more IPv6 prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

          • (dict) --

            Describes the IPv4 prefix option for a network interface.

            • Ipv6Prefix (string) --

              The IPv6 prefix.

        • Ipv6PrefixCount (integer) --

          The number of IPv6 prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

    • ImageId (string) --

      The ID of the AMI.

    • InstanceType (string) --

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

      If you specify InstanceTypes , you can't specify InstanceRequirements .

    • KeyName (string) --

      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.

    • Monitoring (dict) --

      The monitoring for the instance.

      • Enabled (boolean) --

        Specify true to enable detailed monitoring. Otherwise, basic monitoring is enabled.

    • Placement (dict) --

      The placement for the instance.

      • AvailabilityZone (string) --

        The Availability Zone for the instance.

      • Affinity (string) --

        The affinity setting for an instance on a Dedicated Host.

      • GroupName (string) --

        The name of the placement group for the instance.

      • HostId (string) --

        The ID of the Dedicated Host for the instance.

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

      • SpreadDomain (string) --

        Reserved for future use.

      • HostResourceGroupArn (string) --

        The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

      • PartitionNumber (integer) --

        The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition .

    • RamDiskId (string) --

      The ID of the RAM disk.

      Warning

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

    • DisableApiTermination (boolean) --

      If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from 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).

      Default: stop

    • UserData (string) --

      The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Run commands on your Linux instance at launch (Linux) or Work with instance user data (Windows) in the Amazon Elastic Compute Cloud User Guide .

      If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format . For more information, see Amazon EC2 user data in launch templates in the Batch User Guide .

    • TagSpecifications (list) --

      The tags to apply to the resources that are created during instance launch.

      You can specify tags for the following resources only:

      • Instances
      • Volumes
      • Elastic graphics
      • Spot Instance requests
      • Network interfaces

      To tag a resource after it has been created, see CreateTags .

      Note

      To tag the launch template itself, you must use the TagSpecification parameter.

      • (dict) --

        The tags specification for the resources that are created during instance launch.

        • ResourceType (string) --

          The type of resource to tag.

          The Valid Values are all the resource types that can be tagged. However, when creating a launch template, you can specify tags for the following resource types only: instance | volume | elastic-gpu | network-interface | spot-instances-request

          To tag a resource after it has been created, see CreateTags .

        • Tags (list) --

          The tags to apply 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 256 Unicode characters.

    • ElasticGpuSpecifications (list) --

      An elastic GPU to associate with the instance.

      • (dict) --

        A specification for an Elastic Graphics accelerator.

        • Type (string) -- [REQUIRED]

          The type of Elastic Graphics accelerator. For more information about the values to specify for Type , see Elastic Graphics Basics , specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances .

    • ElasticInferenceAccelerators (list) --

      The elastic inference accelerator for the instance.

      • (dict) --

        Describes an elastic inference accelerator.

        • Type (string) -- [REQUIRED]

          The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

        • Count (integer) --

          The number of elastic inference accelerators to attach to the instance.

          Default: 1

    • SecurityGroupIds (list) --

      One or more security group IDs. You can create a security group using CreateSecurityGroup . You cannot specify both a security group ID and security name in the same request.

      • (string) --
    • SecurityGroups (list) --

      One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.

      • (string) --
    • InstanceMarketOptions (dict) --

      The market (purchasing) option for the instances.

      • MarketType (string) --

        The market type.

      • SpotOptions (dict) --

        The options for Spot Instances.

        • MaxPrice (string) --

          The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

        • SpotInstanceType (string) --

          The Spot Instance request type.

        • BlockDurationMinutes (integer) --

          Deprecated.

        • ValidUntil (datetime) --

          The end date of the request, in UTC format (YYYY-MM-DD T*HH:MM:SS* Z). Supported only for persistent requests.

          • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.
          • For a one-time request, ValidUntil is not supported. The request remains active until all instances launch or you cancel the request.

          Default: 7 days from the current date

        • InstanceInterruptionBehavior (string) --

          The behavior when a Spot Instance is interrupted. The default is terminate .

    • CreditSpecification (dict) --

      The credit option for CPU usage of the instance. Valid only for T instances.

      • CpuCredits (string) -- [REQUIRED]

        The credit option for CPU usage of a T instance.

        Valid values: standard | unlimited

    • CpuOptions (dict) --

      The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide .

      • CoreCount (integer) --

        The number of CPU cores for the instance.

      • ThreadsPerCore (integer) --

        The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1 . Otherwise, specify the default value of 2 .

    • CapacityReservationSpecification (dict) --

      The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open , which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

      • CapacityReservationPreference (string) --

        Indicates the instance's Capacity Reservation preferences. Possible preferences include:

        • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
        • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
      • CapacityReservationTarget (dict) --

        Information about the target Capacity Reservation or Capacity Reservation group.

        • CapacityReservationId (string) --

          The ID of the Capacity Reservation in which to run the instance.

        • CapacityReservationResourceGroupArn (string) --

          The ARN of the Capacity Reservation resource group in which to run the instance.

    • LicenseSpecifications (list) --

      The license configurations.

      • (dict) --

        Describes a license configuration.

        • LicenseConfigurationArn (string) --

          The Amazon Resource Name (ARN) of the license configuration.

    • HibernationOptions (dict) --

      Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .

      • Configured (boolean) --

        If you set this parameter to true , the instance is enabled for hibernation.

        Default: false

    • MetadataOptions (dict) --

      The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .

      • HttpTokens (string) --

        The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional .

        If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

        If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

      • HttpPutResponseHopLimit (integer) --

        The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

        Default: 1

        Possible values: Integers from 1 to 64

      • HttpEndpoint (string) --

        Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled .

        Note

        If you specify a value of disabled , you will not be able to access your instance metadata.

      • HttpProtocolIpv6 (string) --

        Enables or disables the IPv6 endpoint for the instance metadata service.

        Default: disabled

      • InstanceMetadataTags (string) --

        Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

        Default: disabled

    • EnclaveOptions (dict) --

      Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide .

      You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

      • Enabled (boolean) --

        To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true .

    • InstanceRequirements (dict) --

      The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

      If you specify InstanceRequirements , you can't specify InstanceTypes .

      • VCpuCount (dict) -- [REQUIRED]

        The minimum and maximum number of vCPUs.

        • Min (integer) -- [REQUIRED]

          The minimum number of vCPUs. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

      • MemoryMiB (dict) -- [REQUIRED]

        The minimum and maximum amount of memory, in MiB.

        • Min (integer) -- [REQUIRED]

          The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

      • CpuManufacturers (list) --

        The CPU manufacturers to include.

        • For instance types with Intel CPUs, specify intel .
        • For instance types with AMD CPUs, specify amd .
        • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

        Note

        Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

        Default: Any manufacturer

        • (string) --
      • MemoryGiBPerVCpu (dict) --

        The minimum and maximum amount of memory per vCPU, in GiB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

      • ExcludedInstanceTypes (list) --

        The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

        For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

        Default: No excluded instance types

        • (string) --
      • InstanceGenerations (list) --

        Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

        For current generation instance types, specify current .

        For previous generation instance types, specify previous .

        Default: Current and previous generation instance types

        • (string) --
      • SpotMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 100

      • OnDemandMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 20

      • BareMetal (string) --

        Indicates whether bare metal instance types must be included, excluded, or required.

        • To include bare metal instance types, specify included .
        • To require only bare metal instance types, specify required .
        • To exclude bare metal instance types, specify excluded .

        Default: excluded

      • BurstablePerformance (string) --

        Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

        • To include burstable performance instance types, specify included .
        • To require only burstable performance instance types, specify required .
        • To exclude burstable performance instance types, specify excluded .

        Default: excluded

      • RequireHibernateSupport (boolean) --

        Indicates whether instance types must support hibernation for On-Demand Instances.

        This parameter is not supported for GetSpotPlacementScores .

        Default: false

      • NetworkInterfaceCount (dict) --

        The minimum and maximum number of network interfaces.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

      • LocalStorage (string) --

        Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

        • To include instance types with instance store volumes, specify included .
        • To require only instance types with instance store volumes, specify required .
        • To exclude instance types with instance store volumes, specify excluded .

        Default: included

      • LocalStorageTypes (list) --

        The type of local storage that is required.

        • For instance types with hard disk drive (HDD) storage, specify hdd .
        • For instance types with solid state drive (SSD) storage, specify ssd .

        Default: hdd and ssd

        • (string) --
      • TotalLocalStorageGB (dict) --

        The minimum and maximum amount of total local storage, in GB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

      • BaselineEbsBandwidthMbps (dict) --

        The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

      • AcceleratorTypes (list) --

        The accelerator types that must be on the instance type.

        • To include instance types with GPU hardware, specify gpu .
        • To include instance types with FPGA hardware, specify fpga .
        • To include instance types with inference hardware, specify inference .

        Default: Any accelerator type

        • (string) --
      • AcceleratorCount (dict) --

        The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

        To exclude accelerator-enabled instance types, set Max to 0 .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of accelerators. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

      • AcceleratorManufacturers (list) --

        Indicates whether instance types must have accelerators by specific manufacturers.

        • For instance types with NVIDIA devices, specify nvidia .
        • For instance types with AMD devices, specify amd .
        • For instance types with Amazon Web Services devices, specify amazon-web-services .
        • For instance types with Xilinx devices, specify xilinx .

        Default: Any manufacturer

        • (string) --
      • AcceleratorNames (list) --

        The accelerators that must be on the instance type.

        • For instance types with NVIDIA A100 GPUs, specify a100 .
        • For instance types with NVIDIA V100 GPUs, specify v100 .
        • For instance types with NVIDIA K80 GPUs, specify k80 .
        • For instance types with NVIDIA T4 GPUs, specify t4 .
        • For instance types with NVIDIA M60 GPUs, specify m60 .
        • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
        • For instance types with Xilinx VU9P FPGAs, specify vu9p .

        Default: Any accelerator

        • (string) --
      • AcceleratorTotalMemoryMiB (dict) --

        The minimum and maximum amount of total accelerator memory, in MiB.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

    • PrivateDnsNameOptions (dict) --

      The options for the instance hostname. The default values are inherited from the subnet.

      • HostnameType (string) --

        The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

      • EnableResourceNameDnsARecord (boolean) --

        Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

      • EnableResourceNameDnsAAAARecord (boolean) --

        Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

    • MaintenanceOptions (dict) --

      The maintenance options for the instance.

      • AutoRecovery (string) --

        Disables the automatic recovery behavior of your instance or sets it to default. For more information, see Simplified automatic recovery .

    • DisableApiStop (boolean) --

      Indicates whether to enable the instance for stop protection. For more information, see Stop Protection .

Return type

dict

Returns

Response Syntax

{
    'LaunchTemplateVersion': {
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'VersionNumber': 123,
        'VersionDescription': 'string',
        'CreateTime': datetime(2015, 1, 1),
        'CreatedBy': 'string',
        'DefaultVersion': True|False,
        'LaunchTemplateData': {
            'KernelId': 'string',
            'EbsOptimized': True|False,
            'IamInstanceProfile': {
                'Arn': 'string',
                'Name': 'string'
            },
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'VirtualName': 'string',
                    'Ebs': {
                        'Encrypted': True|False,
                        'DeleteOnTermination': True|False,
                        'Iops': 123,
                        'KmsKeyId': 'string',
                        'SnapshotId': 'string',
                        'VolumeSize': 123,
                        'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                        'Throughput': 123
                    },
                    'NoDevice': 'string'
                },
            ],
            'NetworkInterfaces': [
                {
                    'AssociateCarrierIpAddress': True|False,
                    'AssociatePublicIpAddress': True|False,
                    'DeleteOnTermination': True|False,
                    'Description': 'string',
                    'DeviceIndex': 123,
                    'Groups': [
                        'string',
                    ],
                    'InterfaceType': 'string',
                    'Ipv6AddressCount': 123,
                    'Ipv6Addresses': [
                        {
                            'Ipv6Address': 'string'
                        },
                    ],
                    'NetworkInterfaceId': 'string',
                    'PrivateIpAddress': 'string',
                    'PrivateIpAddresses': [
                        {
                            'Primary': True|False,
                            'PrivateIpAddress': 'string'
                        },
                    ],
                    'SecondaryPrivateIpAddressCount': 123,
                    'SubnetId': 'string',
                    'NetworkCardIndex': 123,
                    'Ipv4Prefixes': [
                        {
                            'Ipv4Prefix': 'string'
                        },
                    ],
                    'Ipv4PrefixCount': 123,
                    'Ipv6Prefixes': [
                        {
                            'Ipv6Prefix': 'string'
                        },
                    ],
                    'Ipv6PrefixCount': 123
                },
            ],
            'ImageId': 'string',
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'KeyName': 'string',
            'Monitoring': {
                'Enabled': True|False
            },
            'Placement': {
                'AvailabilityZone': 'string',
                'Affinity': 'string',
                'GroupName': 'string',
                'HostId': 'string',
                'Tenancy': 'default'|'dedicated'|'host',
                'SpreadDomain': 'string',
                'HostResourceGroupArn': 'string',
                'PartitionNumber': 123
            },
            'RamDiskId': 'string',
            'DisableApiTermination': True|False,
            'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
            'UserData': 'string',
            'TagSpecifications': [
                {
                    'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ]
                },
            ],
            'ElasticGpuSpecifications': [
                {
                    'Type': 'string'
                },
            ],
            'ElasticInferenceAccelerators': [
                {
                    'Type': 'string',
                    'Count': 123
                },
            ],
            'SecurityGroupIds': [
                'string',
            ],
            'SecurityGroups': [
                'string',
            ],
            'InstanceMarketOptions': {
                'MarketType': 'spot',
                'SpotOptions': {
                    'MaxPrice': 'string',
                    'SpotInstanceType': 'one-time'|'persistent',
                    'BlockDurationMinutes': 123,
                    'ValidUntil': datetime(2015, 1, 1),
                    'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
                }
            },
            'CreditSpecification': {
                'CpuCredits': 'string'
            },
            'CpuOptions': {
                'CoreCount': 123,
                'ThreadsPerCore': 123
            },
            'CapacityReservationSpecification': {
                'CapacityReservationPreference': 'open'|'none',
                'CapacityReservationTarget': {
                    'CapacityReservationId': 'string',
                    'CapacityReservationResourceGroupArn': 'string'
                }
            },
            'LicenseSpecifications': [
                {
                    'LicenseConfigurationArn': 'string'
                },
            ],
            'HibernationOptions': {
                'Configured': True|False
            },
            'MetadataOptions': {
                'State': 'pending'|'applied',
                'HttpTokens': 'optional'|'required',
                'HttpPutResponseHopLimit': 123,
                'HttpEndpoint': 'disabled'|'enabled',
                'HttpProtocolIpv6': 'disabled'|'enabled',
                'InstanceMetadataTags': 'disabled'|'enabled'
            },
            'EnclaveOptions': {
                'Enabled': True|False
            },
            'InstanceRequirements': {
                'VCpuCount': {
                    'Min': 123,
                    'Max': 123
                },
                'MemoryMiB': {
                    'Min': 123,
                    'Max': 123
                },
                'CpuManufacturers': [
                    'intel'|'amd'|'amazon-web-services',
                ],
                'MemoryGiBPerVCpu': {
                    'Min': 123.0,
                    'Max': 123.0
                },
                'ExcludedInstanceTypes': [
                    'string',
                ],
                'InstanceGenerations': [
                    'current'|'previous',
                ],
                'SpotMaxPricePercentageOverLowestPrice': 123,
                'OnDemandMaxPricePercentageOverLowestPrice': 123,
                'BareMetal': 'included'|'required'|'excluded',
                'BurstablePerformance': 'included'|'required'|'excluded',
                'RequireHibernateSupport': True|False,
                'NetworkInterfaceCount': {
                    'Min': 123,
                    'Max': 123
                },
                'LocalStorage': 'included'|'required'|'excluded',
                'LocalStorageTypes': [
                    'hdd'|'ssd',
                ],
                'TotalLocalStorageGB': {
                    'Min': 123.0,
                    'Max': 123.0
                },
                'BaselineEbsBandwidthMbps': {
                    'Min': 123,
                    'Max': 123
                },
                'AcceleratorTypes': [
                    'gpu'|'fpga'|'inference',
                ],
                'AcceleratorCount': {
                    'Min': 123,
                    'Max': 123
                },
                'AcceleratorManufacturers': [
                    'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                ],
                'AcceleratorNames': [
                    'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                ],
                'AcceleratorTotalMemoryMiB': {
                    'Min': 123,
                    'Max': 123
                }
            },
            'PrivateDnsNameOptions': {
                'HostnameType': 'ip-name'|'resource-name',
                'EnableResourceNameDnsARecord': True|False,
                'EnableResourceNameDnsAAAARecord': True|False
            },
            'MaintenanceOptions': {
                'AutoRecovery': 'default'|'disabled'
            },
            'DisableApiStop': True|False
        }
    },
    'Warning': {
        'Errors': [
            {
                'Code': 'string',
                'Message': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LaunchTemplateVersion (dict) --

      Information about the launch template version.

      • LaunchTemplateId (string) --

        The ID of the launch template.

      • LaunchTemplateName (string) --

        The name of the launch template.

      • VersionNumber (integer) --

        The version number.

      • VersionDescription (string) --

        The description for the version.

      • CreateTime (datetime) --

        The time the version was created.

      • CreatedBy (string) --

        The principal that created the version.

      • DefaultVersion (boolean) --

        Indicates whether the version is the default version.

      • LaunchTemplateData (dict) --

        Information about the launch template.

        • KernelId (string) --

          The ID of the kernel, if applicable.

        • EbsOptimized (boolean) --

          Indicates whether the instance is optimized for Amazon EBS I/O.

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

        • BlockDeviceMappings (list) --

          The block device mappings.

          • (dict) --

            Describes a block device mapping.

            • DeviceName (string) --

              The device name.

            • VirtualName (string) --

              The virtual device name (ephemeralN).

            • Ebs (dict) --

              Information about the block device for an EBS volume.

              • Encrypted (boolean) --

                Indicates whether the EBS volume is encrypted.

              • DeleteOnTermination (boolean) --

                Indicates whether the EBS volume is deleted on instance termination.

              • Iops (integer) --

                The number of I/O operations per second (IOPS) that the volume supports.

              • KmsKeyId (string) --

                The ARN of the Key Management Service (KMS) CMK used for encryption.

              • SnapshotId (string) --

                The ID of the snapshot.

              • VolumeSize (integer) --

                The size of the volume, in GiB.

              • VolumeType (string) --

                The volume type.

              • Throughput (integer) --

                The throughput that the volume supports, in MiB/s.

            • NoDevice (string) --

              To omit the device from the block device mapping, specify an empty string.

        • NetworkInterfaces (list) --

          The network interfaces.

          • (dict) --

            Describes a network interface.

            • AssociateCarrierIpAddress (boolean) --

              Indicates whether to associate a Carrier IP address with eth0 for a new network interface.

              Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide .

            • AssociatePublicIpAddress (boolean) --

              Indicates whether to associate a public IPv4 address with eth0 for a new network interface.

            • DeleteOnTermination (boolean) --

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

            • Description (string) --

              A description for the network interface.

            • DeviceIndex (integer) --

              The device index for the network interface attachment.

            • Groups (list) --

              The IDs of one or more security groups.

              • (string) --
            • InterfaceType (string) --

              The type of network interface.

            • Ipv6AddressCount (integer) --

              The number of IPv6 addresses for the network interface.

            • Ipv6Addresses (list) --

              The IPv6 addresses for the network interface.

              • (dict) --

                Describes an IPv6 address.

                • Ipv6Address (string) --

                  The IPv6 address.

            • NetworkInterfaceId (string) --

              The ID of the network interface.

            • PrivateIpAddress (string) --

              The primary private IPv4 address of the network interface.

            • PrivateIpAddresses (list) --

              One or more private IPv4 addresses.

              • (dict) --

                Describes a secondary private IPv4 address for a network interface.

                • Primary (boolean) --

                  Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                • PrivateIpAddress (string) --

                  The private IPv4 addresses.

            • SecondaryPrivateIpAddressCount (integer) --

              The number of secondary private IPv4 addresses for the network interface.

            • SubnetId (string) --

              The ID of the subnet for the network interface.

            • NetworkCardIndex (integer) --

              The index of the network card.

            • Ipv4Prefixes (list) --

              One or more IPv4 prefixes assigned to the network interface.

              • (dict) --

                Information about the IPv4 delegated prefixes assigned to a network interface.

                • Ipv4Prefix (string) --

                  One or more IPv4 delegated prefixes assigned to the network interface.

            • Ipv4PrefixCount (integer) --

              The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.

            • Ipv6Prefixes (list) --

              One or more IPv6 prefixes assigned to the network interface.

              • (dict) --

                Information about the IPv6 delegated prefixes assigned to a network interface.

                • Ipv6Prefix (string) --

                  One or more IPv6 delegated prefixes assigned to the network interface.

            • Ipv6PrefixCount (integer) --

              The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.

        • ImageId (string) --

          The ID of the AMI that was used to launch the instance.

        • InstanceType (string) --

          The instance type.

        • KeyName (string) --

          The name of the key pair.

        • Monitoring (dict) --

          The monitoring for the instance.

          • Enabled (boolean) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • Placement (dict) --

          The placement of the instance.

          • AvailabilityZone (string) --

            The Availability Zone of the instance.

          • Affinity (string) --

            The affinity setting for the instance on the Dedicated Host.

          • GroupName (string) --

            The name of the placement group for the instance.

          • HostId (string) --

            The ID of the Dedicated Host for the instance.

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

          • SpreadDomain (string) --

            Reserved for future use.

          • HostResourceGroupArn (string) --

            The ARN of the host resource group in which to launch the instances.

          • PartitionNumber (integer) --

            The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition .

        • RamDiskId (string) --

          The ID of the RAM disk, if applicable.

        • DisableApiTermination (boolean) --

          If set to true , indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.

        • InstanceInitiatedShutdownBehavior (string) --

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

        • UserData (string) --

          The user data for the instance.

        • TagSpecifications (list) --

          The tags that are applied to the resources that are created during instance launch.

          • (dict) --

            The tags specification for the launch template.

            • ResourceType (string) --

              The type of resource to tag.

            • Tags (list) --

              The tags for 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 256 Unicode characters.

        • ElasticGpuSpecifications (list) --

          The elastic GPU specification.

          • (dict) --

            Describes an elastic GPU.

            • Type (string) --

              The elastic GPU type.

        • ElasticInferenceAccelerators (list) --

          The elastic inference accelerator for the instance.

          • (dict) --

            Describes an elastic inference accelerator.

            • Type (string) --

              The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

            • Count (integer) --

              The number of elastic inference accelerators to attach to the instance.

              Default: 1

        • SecurityGroupIds (list) --

          The security group IDs.

          • (string) --
        • SecurityGroups (list) --

          The security group names.

          • (string) --
        • InstanceMarketOptions (dict) --

          The market (purchasing) option for the instances.

          • MarketType (string) --

            The market type.

          • SpotOptions (dict) --

            The options for Spot Instances.

            • MaxPrice (string) --

              The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

              Warning

              If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

            • SpotInstanceType (string) --

              The Spot Instance request type.

            • BlockDurationMinutes (integer) --

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

            • ValidUntil (datetime) --

              The end date of the request. For 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.

            • InstanceInterruptionBehavior (string) --

              The behavior when a Spot Instance is interrupted.

        • CreditSpecification (dict) --

          The credit option for CPU usage of the instance.

          • CpuCredits (string) --

            The credit option for CPU usage of a T instance.

            Valid values: standard | unlimited

        • CpuOptions (dict) --

          The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide .

          • CoreCount (integer) --

            The number of CPU cores for the instance.

          • ThreadsPerCore (integer) --

            The number of threads per CPU core.

        • CapacityReservationSpecification (dict) --

          Information about the Capacity Reservation targeting option.

          • CapacityReservationPreference (string) --

            Indicates the instance's Capacity Reservation preferences. Possible preferences include:

            • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
            • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
          • CapacityReservationTarget (dict) --

            Information about the target Capacity Reservation or Capacity Reservation group.

            • CapacityReservationId (string) --

              The ID of the targeted Capacity Reservation.

            • CapacityReservationResourceGroupArn (string) --

              The ARN of the targeted Capacity Reservation group.

        • LicenseSpecifications (list) --

          The license configurations.

          • (dict) --

            Describes a license configuration.

            • LicenseConfigurationArn (string) --

              The Amazon Resource Name (ARN) of the license configuration.

        • HibernationOptions (dict) --

          Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .

          • Configured (boolean) --

            If this parameter is set to true , the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

        • MetadataOptions (dict) --

          The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .

          • State (string) --

            The state of the metadata option changes.

            pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

            applied - The metadata options have been successfully applied on the instance.

          • HttpTokens (string) --

            The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional .

            If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

            If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

          • HttpPutResponseHopLimit (integer) --

            The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

            Default: 1

            Possible values: Integers from 1 to 64

          • HttpEndpoint (string) --

            Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled .

            Note

            If you specify a value of disabled , you will not be able to access your instance metadata.

          • HttpProtocolIpv6 (string) --

            Enables or disables the IPv6 endpoint for the instance metadata service.

            Default: disabled

          • InstanceMetadataTags (string) --

            Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

            Default: disabled

        • EnclaveOptions (dict) --

          Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

          • Enabled (boolean) --

            If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

        • InstanceRequirements (dict) --

          The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

          If you specify InstanceRequirements , you can't specify InstanceTypes .

          • VCpuCount (dict) --

            The minimum and maximum number of vCPUs.

            • Min (integer) --

              The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

            • Max (integer) --

              The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

          • MemoryMiB (dict) --

            The minimum and maximum amount of memory, in MiB.

            • Min (integer) --

              The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • CpuManufacturers (list) --

            The CPU manufacturers to include.

            • For instance types with Intel CPUs, specify intel .
            • For instance types with AMD CPUs, specify amd .
            • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

            Note

            Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

            Default: Any manufacturer

            • (string) --
          • MemoryGiBPerVCpu (dict) --

            The minimum and maximum amount of memory per vCPU, in GiB.

            Default: No minimum or maximum limits

            • Min (float) --

              The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

            • Max (float) --

              The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

          • ExcludedInstanceTypes (list) --

            The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

            For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

            Default: No excluded instance types

            • (string) --
          • InstanceGenerations (list) --

            Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

            For current generation instance types, specify current .

            For previous generation instance types, specify previous .

            Default: Current and previous generation instance types

            • (string) --
          • SpotMaxPricePercentageOverLowestPrice (integer) --

            The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999 .

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

            Note

            If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

            Default: 100

          • OnDemandMaxPricePercentageOverLowestPrice (integer) --

            The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999 .

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

            Note

            If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

            Default: 20

          • BareMetal (string) --

            Indicates whether bare metal instance types must be included, excluded, or required.

            • To include bare metal instance types, specify included .
            • To require only bare metal instance types, specify required .
            • To exclude bare metal instance types, specify excluded .

            Default: excluded

          • BurstablePerformance (string) --

            Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

            • To include burstable performance instance types, specify included .
            • To require only burstable performance instance types, specify required .
            • To exclude burstable performance instance types, specify excluded .

            Default: excluded

          • RequireHibernateSupport (boolean) --

            Indicates whether instance types must support hibernation for On-Demand Instances.

            This parameter is not supported for GetSpotPlacementScores .

            Default: false

          • NetworkInterfaceCount (dict) --

            The minimum and maximum number of network interfaces.

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

          • LocalStorage (string) --

            Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

            • To include instance types with instance store volumes, specify included .
            • To require only instance types with instance store volumes, specify required .
            • To exclude instance types with instance store volumes, specify excluded .

            Default: included

          • LocalStorageTypes (list) --

            The type of local storage that is required.

            • For instance types with hard disk drive (HDD) storage, specify hdd .
            • For instance types with solid state drive (SSD) storage, specify ssd .

            Default: hdd and ssd

            • (string) --
          • TotalLocalStorageGB (dict) --

            The minimum and maximum amount of total local storage, in GB.

            Default: No minimum or maximum limits

            • Min (float) --

              The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

            • Max (float) --

              The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

          • BaselineEbsBandwidthMbps (dict) --

            The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

          • AcceleratorTypes (list) --

            The accelerator types that must be on the instance type.

            • For instance types with GPU accelerators, specify gpu .
            • For instance types with FPGA accelerators, specify fpga .
            • For instance types with inference accelerators, specify inference .

            Default: Any accelerator type

            • (string) --
          • AcceleratorCount (dict) --

            The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

            To exclude accelerator-enabled instance types, set Max to 0 .

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

          • AcceleratorManufacturers (list) --

            Indicates whether instance types must have accelerators by specific manufacturers.

            • For instance types with NVIDIA devices, specify nvidia .
            • For instance types with AMD devices, specify amd .
            • For instance types with Amazon Web Services devices, specify amazon-web-services .
            • For instance types with Xilinx devices, specify xilinx .

            Default: Any manufacturer

            • (string) --
          • AcceleratorNames (list) --

            The accelerators that must be on the instance type.

            • For instance types with NVIDIA A100 GPUs, specify a100 .
            • For instance types with NVIDIA V100 GPUs, specify v100 .
            • For instance types with NVIDIA K80 GPUs, specify k80 .
            • For instance types with NVIDIA T4 GPUs, specify t4 .
            • For instance types with NVIDIA M60 GPUs, specify m60 .
            • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
            • For instance types with Xilinx VU9P FPGAs, specify vu9p .

            Default: Any accelerator

            • (string) --
          • AcceleratorTotalMemoryMiB (dict) --

            The minimum and maximum amount of total accelerator memory, in MiB.

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • PrivateDnsNameOptions (dict) --

          The options for the instance hostname.

          • HostnameType (string) --

            The type of hostname to assign to an instance.

          • EnableResourceNameDnsARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

          • EnableResourceNameDnsAAAARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

        • MaintenanceOptions (dict) --

          The maintenance options for your instance.

          • AutoRecovery (string) --

            Disables the automatic recovery behavior of your instance or sets it to default.

        • DisableApiStop (boolean) --

          Indicates whether the instance is enabled for stop protection. For more information, see Stop Protection .

    • Warning (dict) --

      If the new version of the launch template contains parameters or parameter combinations that are not valid, an error code and an error message are returned for each issue that's found.

      • Errors (list) --

        The error codes and error messages.

        • (dict) --

          The error code and error message that is returned for a parameter or parameter combination that is not valid when a new launch template or new version of a launch template is created.

          • Code (string) --

            The error code that indicates why the parameter or parameter combination is not valid. For more information about error codes, see Error codes .

          • Message (string) --

            The error message that describes why the parameter or parameter combination is not valid. For more information about error messages, see Error codes .

Examples

This example creates a new launch template version based on version 1 of the specified launch template and specifies a different AMI ID.

response = client.create_launch_template_version(
    LaunchTemplateData={
        'ImageId': 'ami-c998b6b2',
    },
    LaunchTemplateId='lt-0abcd290751193123',
    SourceVersion='1',
    VersionDescription='WebVersion2',
)

print(response)

Expected Output:

{
    'LaunchTemplateVersion': {
        'CreateTime': datetime(2017, 12, 1, 13, 35, 46, 4, 335, 0),
        'CreatedBy': 'arn:aws:iam::123456789012:root',
        'DefaultVersion': False,
        'LaunchTemplateData': {
            'ImageId': 'ami-c998b6b2',
            'InstanceType': 't2.micro',
            'NetworkInterfaces': [
                {
                    'AssociatePublicIpAddress': True,
                    'DeviceIndex': 0,
                    'Ipv6Addresses': [
                        {
                            'Ipv6Address': '2001:db8:1234:1a00::123',
                        },
                    ],
                    'SubnetId': 'subnet-7b16de0c',
                },
            ],
        },
        'LaunchTemplateId': 'lt-0abcd290751193123',
        'LaunchTemplateName': 'my-template',
        'VersionDescription': 'WebVersion2',
        'VersionNumber': 2,
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_local_gateway_route(**kwargs)

Creates a static route for the specified local gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.create_local_gateway_route(
    DestinationCidrBlock='string',
    LocalGatewayRouteTableId='string',
    LocalGatewayVirtualInterfaceGroupId='string',
    DryRun=True|False
)
Parameters
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR range used for destination matches. Routing decisions are based on the most specific match.

  • LocalGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the local gateway route table.

  • LocalGatewayVirtualInterfaceGroupId (string) --

    [REQUIRED]

    The ID of the virtual interface group.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Route': {
        'DestinationCidrBlock': 'string',
        'LocalGatewayVirtualInterfaceGroupId': 'string',
        'Type': 'static'|'propagated',
        'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted',
        'LocalGatewayRouteTableId': 'string',
        'LocalGatewayRouteTableArn': 'string',
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • Route (dict) --

      Information about the route.

      • DestinationCidrBlock (string) --

        The CIDR block used for destination matches.

      • LocalGatewayVirtualInterfaceGroupId (string) --

        The ID of the virtual interface group.

      • Type (string) --

        The route type.

      • State (string) --

        The state of the route.

      • LocalGatewayRouteTableId (string) --

        The ID of the local gateway route table.

      • LocalGatewayRouteTableArn (string) --

        The Amazon Resource Name (ARN) of the local gateway route table.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the local gateway route.

create_local_gateway_route_table_vpc_association(**kwargs)

Associates the specified VPC with the specified local gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.create_local_gateway_route_table_vpc_association(
    LocalGatewayRouteTableId='string',
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • LocalGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the local gateway route table.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • TagSpecifications (list) --

    The tags to assign to the local gateway route table VPC association.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTableVpcAssociation': {
        'LocalGatewayRouteTableVpcAssociationId': 'string',
        'LocalGatewayRouteTableId': 'string',
        'LocalGatewayRouteTableArn': 'string',
        'LocalGatewayId': 'string',
        'VpcId': 'string',
        'OwnerId': 'string',
        'State': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LocalGatewayRouteTableVpcAssociation (dict) --

      Information about the association.

      • LocalGatewayRouteTableVpcAssociationId (string) --

        The ID of the association.

      • LocalGatewayRouteTableId (string) --

        The ID of the local gateway route table.

      • LocalGatewayRouteTableArn (string) --

        The Amazon Resource Name (ARN) of the local gateway route table for the association.

      • LocalGatewayId (string) --

        The ID of the local gateway.

      • VpcId (string) --

        The ID of the VPC.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the local gateway route table for the association.

      • State (string) --

        The state of the association.

      • Tags (list) --

        The tags assigned to the association.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_managed_prefix_list(**kwargs)

Creates a managed prefix list. You can specify one or more entries for the prefix list. Each entry consists of a CIDR block and an optional description.

See also: AWS API Documentation

Request Syntax

response = client.create_managed_prefix_list(
    DryRun=True|False,
    PrefixListName='string',
    Entries=[
        {
            'Cidr': 'string',
            'Description': 'string'
        },
    ],
    MaxEntries=123,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    AddressFamily='string',
    ClientToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListName (string) --

    [REQUIRED]

    A name for the prefix list.

    Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws .

  • Entries (list) --

    One or more entries for the prefix list.

    • (dict) --

      An entry for a prefix list.

      • Cidr (string) -- [REQUIRED]

        The CIDR block.

      • Description (string) --

        A description for the entry.

        Constraints: Up to 255 characters in length.

  • MaxEntries (integer) --

    [REQUIRED]

    The maximum number of entries for the prefix list.

  • TagSpecifications (list) --

    The tags to apply to the prefix list during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • AddressFamily (string) --

    [REQUIRED]

    The IP address type.

    Valid Values: IPv4 | IPv6

  • ClientToken (string) --

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

    Constraints: Up to 255 UTF-8 characters in length.

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The current state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OwnerId (string) --

        The ID of the owner of the prefix list.

create_nat_gateway(**kwargs)

Creates a NAT gateway in the specified subnet. This action creates a network interface in the specified subnet with a private IP address from the IP address range of the subnet. You can create either a public NAT gateway or a private NAT gateway.

With a public NAT gateway, internet-bound traffic from a private subnet can be routed to the NAT gateway, so that instances in a private subnet can connect to the internet.

With a private NAT gateway, private communication is routed across VPCs and on-premises networks through a transit gateway or virtual private gateway. Common use cases include running large workloads behind a small pool of allowlisted IPv4 addresses, preserving private IPv4 addresses, and communicating between overlapping networks.

For more information, see NAT gateways in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_nat_gateway(
    AllocationId='string',
    ClientToken='string',
    DryRun=True|False,
    SubnetId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ConnectivityType='private'|'public'
)
Parameters
  • AllocationId (string) -- [Public NAT gateways only] The allocation ID of an Elastic IP address to associate with the NAT gateway. You cannot specify an Elastic IP address with a private NAT gateway. If the Elastic IP address is associated with another resource, you must first disassociate it.
  • ClientToken (string) --

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

    Constraint: Maximum 64 ASCII characters.

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SubnetId (string) --

    [REQUIRED]

    The subnet in which to create the NAT gateway.

  • TagSpecifications (list) --

    The tags to assign to the NAT gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ConnectivityType (string) -- Indicates whether the NAT gateway supports public or private connectivity. The default is public connectivity.
Return type

dict

Returns

Response Syntax

{
    'ClientToken': 'string',
    'NatGateway': {
        'CreateTime': datetime(2015, 1, 1),
        'DeleteTime': datetime(2015, 1, 1),
        'FailureCode': 'string',
        'FailureMessage': 'string',
        'NatGatewayAddresses': [
            {
                'AllocationId': 'string',
                'NetworkInterfaceId': 'string',
                'PrivateIp': 'string',
                'PublicIp': 'string'
            },
        ],
        'NatGatewayId': 'string',
        'ProvisionedBandwidth': {
            'ProvisionTime': datetime(2015, 1, 1),
            'Provisioned': 'string',
            'RequestTime': datetime(2015, 1, 1),
            'Requested': 'string',
            'Status': 'string'
        },
        'State': 'pending'|'failed'|'available'|'deleting'|'deleted',
        'SubnetId': 'string',
        'VpcId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'ConnectivityType': 'private'|'public'
    }
}

Response Structure

  • (dict) --

    • ClientToken (string) --

      Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

    • NatGateway (dict) --

      Information about the NAT gateway.

      • CreateTime (datetime) --

        The date and time the NAT gateway was created.

      • DeleteTime (datetime) --

        The date and time the NAT gateway was deleted, if applicable.

      • FailureCode (string) --

        If the NAT gateway could not be created, specifies the error code for the failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound )

      • FailureMessage (string) --

        If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

        • For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"
        • For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"
        • For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"
        • For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"
        • For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."
        • For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."
      • NatGatewayAddresses (list) --

        Information about the IP addresses and network interface associated with the NAT gateway.

        • (dict) --

          Describes the IP addresses and network interface associated with a NAT gateway.

          • AllocationId (string) --

            [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

          • NetworkInterfaceId (string) --

            The ID of the network interface associated with the NAT gateway.

          • PrivateIp (string) --

            The private IP address associated with the NAT gateway.

          • PublicIp (string) --

            [Public NAT gateway only] The Elastic IP address associated with the NAT gateway.

      • NatGatewayId (string) --

        The ID of the NAT gateway.

      • ProvisionedBandwidth (dict) --

        Reserved. If you need to sustain traffic greater than the documented limits , contact us through the Support Center .

      • State (string) --

        The state of the NAT gateway.

        • pending : The NAT gateway is being created and is not ready to process traffic.
        • failed : The NAT gateway could not be created. Check the failureCode and failureMessage fields for the reason.
        • available : The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.
        • deleting : The NAT gateway is in the process of being terminated and may still be processing traffic.
        • deleted : The NAT gateway has been terminated and is no longer processing traffic.
      • SubnetId (string) --

        The ID of the subnet in which the NAT gateway is located.

      • VpcId (string) --

        The ID of the VPC in which the NAT gateway is located.

      • Tags (list) --

        The tags for the NAT gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • ConnectivityType (string) --

        Indicates whether the NAT gateway supports public or private connectivity.

Examples

This example creates a NAT gateway in subnet subnet-1a2b3c4d and associates an Elastic IP address with the allocation ID eipalloc-37fc1a52 with the NAT gateway.

response = client.create_nat_gateway(
    AllocationId='eipalloc-37fc1a52',
    SubnetId='subnet-1a2b3c4d',
)

print(response)

Expected Output:

{
    'NatGateway': {
        'CreateTime': datetime(2015, 12, 17, 12, 45, 26, 3, 351, 0),
        'NatGatewayAddresses': [
            {
                'AllocationId': 'eipalloc-37fc1a52',
            },
        ],
        'NatGatewayId': 'nat-08d48af2a8e83edfd',
        'State': 'pending',
        'SubnetId': 'subnet-1a2b3c4d',
        'VpcId': 'vpc-1122aabb',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_network_acl(**kwargs)

Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_network_acl(
    DryRun=True|False,
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • TagSpecifications (list) --

    The tags to assign to the network ACL.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'NetworkAcl': {
        'Associations': [
            {
                'NetworkAclAssociationId': 'string',
                'NetworkAclId': 'string',
                'SubnetId': 'string'
            },
        ],
        'Entries': [
            {
                'CidrBlock': 'string',
                'Egress': True|False,
                'IcmpTypeCode': {
                    'Code': 123,
                    'Type': 123
                },
                'Ipv6CidrBlock': 'string',
                'PortRange': {
                    'From': 123,
                    'To': 123
                },
                'Protocol': 'string',
                'RuleAction': 'allow'|'deny',
                'RuleNumber': 123
            },
        ],
        'IsDefault': True|False,
        'NetworkAclId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VpcId': 'string',
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • NetworkAcl (dict) --

      Information about the network ACL.

      • Associations (list) --

        Any associations between the network ACL and one or more subnets

        • (dict) --

          Describes an association between a network ACL and a subnet.

          • NetworkAclAssociationId (string) --

            The ID of the association between a network ACL and a subnet.

          • NetworkAclId (string) --

            The ID of the network ACL.

          • SubnetId (string) --

            The ID of the subnet.

      • Entries (list) --

        One or more entries (rules) in the network ACL.

        • (dict) --

          Describes an entry in a network ACL.

          • CidrBlock (string) --

            The IPv4 network range to allow or deny, in CIDR notation.

          • Egress (boolean) --

            Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

          • IcmpTypeCode (dict) --

            ICMP protocol: The ICMP type and code.

            • Code (integer) --

              The ICMP code. A value of -1 means all codes for the specified ICMP type.

            • Type (integer) --

              The ICMP type. A value of -1 means all types.

          • Ipv6CidrBlock (string) --

            The IPv6 network range to allow or deny, in CIDR notation.

          • PortRange (dict) --

            TCP or UDP protocols: The range of ports the rule applies to.

            • From (integer) --

              The first port in the range.

            • To (integer) --

              The last port in the range.

          • Protocol (string) --

            The protocol number. A value of "-1" means all protocols.

          • RuleAction (string) --

            Indicates whether to allow or deny the traffic that matches the rule.

          • RuleNumber (integer) --

            The rule number for the entry. ACL entries are processed in ascending order by rule number.

      • IsDefault (boolean) --

        Indicates whether this is the default network ACL for the VPC.

      • NetworkAclId (string) --

        The ID of the network ACL.

      • Tags (list) --

        Any tags assigned to the network ACL.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • VpcId (string) --

        The ID of the VPC for the network ACL.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the network ACL.

Examples

This example creates a network ACL for the specified VPC.

response = client.create_network_acl(
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'NetworkAcl': {
        'Associations': [
        ],
        'Entries': [
            {
                'CidrBlock': '0.0.0.0/0',
                'Egress': True,
                'Protocol': '-1',
                'RuleAction': 'deny',
                'RuleNumber': 32767,
            },
            {
                'CidrBlock': '0.0.0.0/0',
                'Egress': False,
                'Protocol': '-1',
                'RuleAction': 'deny',
                'RuleNumber': 32767,
            },
        ],
        'IsDefault': False,
        'NetworkAclId': 'acl-5fb85d36',
        'Tags': [
        ],
        'VpcId': 'vpc-a01106c2',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_network_acl_entry(**kwargs)

Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.

We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.

After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.

For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_network_acl_entry(
    CidrBlock='string',
    DryRun=True|False,
    Egress=True|False,
    IcmpTypeCode={
        'Code': 123,
        'Type': 123
    },
    Ipv6CidrBlock='string',
    NetworkAclId='string',
    PortRange={
        'From': 123,
        'To': 123
    },
    Protocol='string',
    RuleAction='allow'|'deny',
    RuleNumber=123
)
Parameters
  • CidrBlock (string) -- The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ). We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Egress (boolean) --

    [REQUIRED]

    Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

  • IcmpTypeCode (dict) --

    ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

    • Code (integer) --

      The ICMP code. A value of -1 means all codes for the specified ICMP type.

    • Type (integer) --

      The ICMP type. A value of -1 means all types.

  • Ipv6CidrBlock (string) -- The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64 ).
  • NetworkAclId (string) --

    [REQUIRED]

    The ID of the network ACL.

  • PortRange (dict) --

    TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

    • From (integer) --

      The first port in the range.

    • To (integer) --

      The last port in the range.

  • Protocol (string) --

    [REQUIRED]

    The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

  • RuleAction (string) --

    [REQUIRED]

    Indicates whether to allow or deny the traffic that matches the rule.

  • RuleNumber (integer) --

    [REQUIRED]

    The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

    Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.

Returns

None

Examples

This example creates an entry for the specified network ACL. The rule allows ingress traffic from anywhere (0.0.0.0/0) on UDP port 53 (DNS) into any associated subnet.

response = client.create_network_acl_entry(
    CidrBlock='0.0.0.0/0',
    Egress=False,
    NetworkAclId='acl-5fb85d36',
    PortRange={
        'From': 53,
        'To': 53,
    },
    Protocol='17',
    RuleAction='allow',
    RuleNumber=100,
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
create_network_insights_access_scope(**kwargs)

Creates a Network Access Scope.

Amazon Web Services Network Access Analyzer enables cloud networking and cloud operations teams to verify that their networks on Amazon Web Services conform to their network security and governance objectives. For more information, see the Amazon Web Services Network Access Analyzer Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_network_insights_access_scope(
    MatchPaths=[
        {
            'Source': {
                'PacketHeaderStatement': {
                    'SourceAddresses': [
                        'string',
                    ],
                    'DestinationAddresses': [
                        'string',
                    ],
                    'SourcePorts': [
                        'string',
                    ],
                    'DestinationPorts': [
                        'string',
                    ],
                    'SourcePrefixLists': [
                        'string',
                    ],
                    'DestinationPrefixLists': [
                        'string',
                    ],
                    'Protocols': [
                        'tcp'|'udp',
                    ]
                },
                'ResourceStatement': {
                    'Resources': [
                        'string',
                    ],
                    'ResourceTypes': [
                        'string',
                    ]
                }
            },
            'Destination': {
                'PacketHeaderStatement': {
                    'SourceAddresses': [
                        'string',
                    ],
                    'DestinationAddresses': [
                        'string',
                    ],
                    'SourcePorts': [
                        'string',
                    ],
                    'DestinationPorts': [
                        'string',
                    ],
                    'SourcePrefixLists': [
                        'string',
                    ],
                    'DestinationPrefixLists': [
                        'string',
                    ],
                    'Protocols': [
                        'tcp'|'udp',
                    ]
                },
                'ResourceStatement': {
                    'Resources': [
                        'string',
                    ],
                    'ResourceTypes': [
                        'string',
                    ]
                }
            },
            'ThroughResources': [
                {
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
            ]
        },
    ],
    ExcludePaths=[
        {
            'Source': {
                'PacketHeaderStatement': {
                    'SourceAddresses': [
                        'string',
                    ],
                    'DestinationAddresses': [
                        'string',
                    ],
                    'SourcePorts': [
                        'string',
                    ],
                    'DestinationPorts': [
                        'string',
                    ],
                    'SourcePrefixLists': [
                        'string',
                    ],
                    'DestinationPrefixLists': [
                        'string',
                    ],
                    'Protocols': [
                        'tcp'|'udp',
                    ]
                },
                'ResourceStatement': {
                    'Resources': [
                        'string',
                    ],
                    'ResourceTypes': [
                        'string',
                    ]
                }
            },
            'Destination': {
                'PacketHeaderStatement': {
                    'SourceAddresses': [
                        'string',
                    ],
                    'DestinationAddresses': [
                        'string',
                    ],
                    'SourcePorts': [
                        'string',
                    ],
                    'DestinationPorts': [
                        'string',
                    ],
                    'SourcePrefixLists': [
                        'string',
                    ],
                    'DestinationPrefixLists': [
                        'string',
                    ],
                    'Protocols': [
                        'tcp'|'udp',
                    ]
                },
                'ResourceStatement': {
                    'Resources': [
                        'string',
                    ],
                    'ResourceTypes': [
                        'string',
                    ]
                }
            },
            'ThroughResources': [
                {
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
            ]
        },
    ],
    ClientToken='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • MatchPaths (list) --

    The paths to match.

    • (dict) --

      Describes a path.

      • Source (dict) --

        The source.

        • PacketHeaderStatement (dict) --

          The packet header statement.

          • SourceAddresses (list) --

            The source addresses.

            • (string) --
          • DestinationAddresses (list) --

            The destination addresses.

            • (string) --
          • SourcePorts (list) --

            The source ports.

            • (string) --
          • DestinationPorts (list) --

            The destination ports.

            • (string) --
          • SourcePrefixLists (list) --

            The source prefix lists.

            • (string) --
          • DestinationPrefixLists (list) --

            The destination prefix lists.

            • (string) --
          • Protocols (list) --

            The protocols.

            • (string) --
        • ResourceStatement (dict) --

          The resource statement.

          • Resources (list) --

            The resources.

            • (string) --
          • ResourceTypes (list) --

            The resource types.

            • (string) --
      • Destination (dict) --

        The destination.

        • PacketHeaderStatement (dict) --

          The packet header statement.

          • SourceAddresses (list) --

            The source addresses.

            • (string) --
          • DestinationAddresses (list) --

            The destination addresses.

            • (string) --
          • SourcePorts (list) --

            The source ports.

            • (string) --
          • DestinationPorts (list) --

            The destination ports.

            • (string) --
          • SourcePrefixLists (list) --

            The source prefix lists.

            • (string) --
          • DestinationPrefixLists (list) --

            The destination prefix lists.

            • (string) --
          • Protocols (list) --

            The protocols.

            • (string) --
        • ResourceStatement (dict) --

          The resource statement.

          • Resources (list) --

            The resources.

            • (string) --
          • ResourceTypes (list) --

            The resource types.

            • (string) --
      • ThroughResources (list) --

        The through resources.

        • (dict) --

          Describes a through resource statement.

          • ResourceStatement (dict) --

            The resource statement.

            • Resources (list) --

              The resources.

              • (string) --
            • ResourceTypes (list) --

              The resource types.

              • (string) --
  • ExcludePaths (list) --

    The paths to exclude.

    • (dict) --

      Describes a path.

      • Source (dict) --

        The source.

        • PacketHeaderStatement (dict) --

          The packet header statement.

          • SourceAddresses (list) --

            The source addresses.

            • (string) --
          • DestinationAddresses (list) --

            The destination addresses.

            • (string) --
          • SourcePorts (list) --

            The source ports.

            • (string) --
          • DestinationPorts (list) --

            The destination ports.

            • (string) --
          • SourcePrefixLists (list) --

            The source prefix lists.

            • (string) --
          • DestinationPrefixLists (list) --

            The destination prefix lists.

            • (string) --
          • Protocols (list) --

            The protocols.

            • (string) --
        • ResourceStatement (dict) --

          The resource statement.

          • Resources (list) --

            The resources.

            • (string) --
          • ResourceTypes (list) --

            The resource types.

            • (string) --
      • Destination (dict) --

        The destination.

        • PacketHeaderStatement (dict) --

          The packet header statement.

          • SourceAddresses (list) --

            The source addresses.

            • (string) --
          • DestinationAddresses (list) --

            The destination addresses.

            • (string) --
          • SourcePorts (list) --

            The source ports.

            • (string) --
          • DestinationPorts (list) --

            The destination ports.

            • (string) --
          • SourcePrefixLists (list) --

            The source prefix lists.

            • (string) --
          • DestinationPrefixLists (list) --

            The destination prefix lists.

            • (string) --
          • Protocols (list) --

            The protocols.

            • (string) --
        • ResourceStatement (dict) --

          The resource statement.

          • Resources (list) --

            The resources.

            • (string) --
          • ResourceTypes (list) --

            The resource types.

            • (string) --
      • ThroughResources (list) --

        The through resources.

        • (dict) --

          Describes a through resource statement.

          • ResourceStatement (dict) --

            The resource statement.

            • Resources (list) --

              The resources.

              • (string) --
            • ResourceTypes (list) --

              The resource types.

              • (string) --
  • ClientToken (string) --

    [REQUIRED]

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

    This field is autopopulated if not provided.

  • TagSpecifications (list) --

    The tags to apply.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScope': {
        'NetworkInsightsAccessScopeId': 'string',
        'NetworkInsightsAccessScopeArn': 'string',
        'CreatedDate': datetime(2015, 1, 1),
        'UpdatedDate': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    'NetworkInsightsAccessScopeContent': {
        'NetworkInsightsAccessScopeId': 'string',
        'MatchPaths': [
            {
                'Source': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'Destination': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'ThroughResources': [
                    {
                        'ResourceStatement': {
                            'Resources': [
                                'string',
                            ],
                            'ResourceTypes': [
                                'string',
                            ]
                        }
                    },
                ]
            },
        ],
        'ExcludePaths': [
            {
                'Source': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'Destination': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'ThroughResources': [
                    {
                        'ResourceStatement': {
                            'Resources': [
                                'string',
                            ],
                            'ResourceTypes': [
                                'string',
                            ]
                        }
                    },
                ]
            },
        ]
    }
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScope (dict) --

      The Network Access Scope.

      • NetworkInsightsAccessScopeId (string) --

        The ID of the Network Access Scope.

      • NetworkInsightsAccessScopeArn (string) --

        The Amazon Resource Name (ARN) of the Network Access Scope.

      • CreatedDate (datetime) --

        The creation date.

      • UpdatedDate (datetime) --

        The last updated date.

      • Tags (list) --

        The tags.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

    • NetworkInsightsAccessScopeContent (dict) --

      The Network Access Scope content.

      • NetworkInsightsAccessScopeId (string) --

        The ID of the Network Access Scope.

      • MatchPaths (list) --

        The paths to match.

        • (dict) --

          Describes a path.

          • Source (dict) --

            The source.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • Destination (dict) --

            The destination.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • ThroughResources (list) --

            The through resources.

            • (dict) --

              Describes a through resource statement.

              • ResourceStatement (dict) --

                The resource statement.

                • Resources (list) --

                  The resources.

                  • (string) --
                • ResourceTypes (list) --

                  The resource types.

                  • (string) --
      • ExcludePaths (list) --

        The paths to exclude.

        • (dict) --

          Describes a path.

          • Source (dict) --

            The source.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • Destination (dict) --

            The destination.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • ThroughResources (list) --

            The through resources.

            • (dict) --

              Describes a through resource statement.

              • ResourceStatement (dict) --

                The resource statement.

                • Resources (list) --

                  The resources.

                  • (string) --
                • ResourceTypes (list) --

                  The resource types.

                  • (string) --

create_network_insights_path(**kwargs)

Creates a path to analyze for reachability.

Reachability Analyzer enables you to analyze and debug network reachability between two resources in your virtual private cloud (VPC). For more information, see What is Reachability Analyzer .

See also: AWS API Documentation

Request Syntax

response = client.create_network_insights_path(
    SourceIp='string',
    DestinationIp='string',
    Source='string',
    Destination='string',
    Protocol='tcp'|'udp',
    DestinationPort=123,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    ClientToken='string'
)
Parameters
  • SourceIp (string) -- The IP address of the Amazon Web Services resource that is the source of the path.
  • DestinationIp (string) -- The IP address of the Amazon Web Services resource that is the destination of the path.
  • Source (string) --

    [REQUIRED]

    The Amazon Web Services resource that is the source of the path.

  • Destination (string) --

    [REQUIRED]

    The Amazon Web Services resource that is the destination of the path.

  • Protocol (string) --

    [REQUIRED]

    The protocol.

  • DestinationPort (integer) -- The destination port.
  • TagSpecifications (list) --

    The tags to add to the path.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

    [REQUIRED]

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsPath': {
        'NetworkInsightsPathId': 'string',
        'NetworkInsightsPathArn': 'string',
        'CreatedDate': datetime(2015, 1, 1),
        'Source': 'string',
        'Destination': 'string',
        'SourceIp': 'string',
        'DestinationIp': 'string',
        'Protocol': 'tcp'|'udp',
        'DestinationPort': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • NetworkInsightsPath (dict) --

      Information about the path.

      • NetworkInsightsPathId (string) --

        The ID of the path.

      • NetworkInsightsPathArn (string) --

        The Amazon Resource Name (ARN) of the path.

      • CreatedDate (datetime) --

        The time stamp when the path was created.

      • Source (string) --

        The Amazon Web Services resource that is the source of the path.

      • Destination (string) --

        The Amazon Web Services resource that is the destination of the path.

      • SourceIp (string) --

        The IP address of the Amazon Web Services resource that is the source of the path.

      • DestinationIp (string) --

        The IP address of the Amazon Web Services resource that is the destination of the path.

      • Protocol (string) --

        The protocol.

      • DestinationPort (integer) --

        The destination port.

      • Tags (list) --

        The tags associated with the path.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_network_interface(**kwargs)

Creates a network interface in the specified subnet.

For more information about network interfaces, see Elastic Network Interfaces in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_network_interface(
    Description='string',
    DryRun=True|False,
    Groups=[
        'string',
    ],
    Ipv6AddressCount=123,
    Ipv6Addresses=[
        {
            'Ipv6Address': 'string'
        },
    ],
    PrivateIpAddress='string',
    PrivateIpAddresses=[
        {
            'Primary': True|False,
            'PrivateIpAddress': 'string'
        },
    ],
    SecondaryPrivateIpAddressCount=123,
    Ipv4Prefixes=[
        {
            'Ipv4Prefix': 'string'
        },
    ],
    Ipv4PrefixCount=123,
    Ipv6Prefixes=[
        {
            'Ipv6Prefix': 'string'
        },
    ],
    Ipv6PrefixCount=123,
    InterfaceType='efa'|'branch'|'trunk',
    SubnetId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters
  • Description (string) -- A description for the network interface.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    The IDs of one or more security groups.

    • (string) --
  • Ipv6AddressCount (integer) -- The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true , you can specify 0 to override this setting.
  • Ipv6Addresses (list) --

    One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

    • (dict) --

      Describes an IPv6 address.

      • Ipv6Address (string) --

        The IPv6 address.

  • PrivateIpAddress (string) -- The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).
  • PrivateIpAddresses (list) --

    One or more private IPv4 addresses.

    • (dict) --

      Describes a secondary private IPv4 address for a network interface.

      • Primary (boolean) --

        Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

      • PrivateIpAddress (string) --

        The private IPv4 addresses.

  • SecondaryPrivateIpAddressCount (integer) --

    The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses .

    The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide .

  • Ipv4Prefixes (list) --

    One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

  • Ipv4PrefixCount (integer) -- The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv4 Prefixes option.
  • Ipv6Prefixes (list) --

    One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

    • (dict) --

      Describes the IPv4 prefix option for a network interface.

      • Ipv6Prefix (string) --

        The IPv6 prefix.

  • Ipv6PrefixCount (integer) -- The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv6Prefixes option.
  • InterfaceType (string) --

    The type of network interface. The default is interface .

    The only supported values are efa and trunk .

  • SubnetId (string) --

    [REQUIRED]

    The ID of the subnet to associate with the network interface.

  • TagSpecifications (list) --

    The tags to apply to the new network interface.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'NetworkInterface': {
        'Association': {
            'AllocationId': 'string',
            'AssociationId': 'string',
            'IpOwnerId': 'string',
            'PublicDnsName': 'string',
            'PublicIp': 'string',
            'CustomerOwnedIp': 'string',
            'CarrierIp': 'string'
        },
        'Attachment': {
            'AttachTime': datetime(2015, 1, 1),
            'AttachmentId': 'string',
            'DeleteOnTermination': True|False,
            'DeviceIndex': 123,
            'NetworkCardIndex': 123,
            'InstanceId': 'string',
            'InstanceOwnerId': 'string',
            'Status': 'attaching'|'attached'|'detaching'|'detached'
        },
        'AvailabilityZone': 'string',
        'Description': 'string',
        'Groups': [
            {
                'GroupName': 'string',
                'GroupId': 'string'
            },
        ],
        'InterfaceType': 'interface'|'natGateway'|'efa'|'trunk'|'load_balancer'|'network_load_balancer'|'vpc_endpoint'|'branch'|'transit_gateway'|'lambda'|'quicksight'|'global_accelerator_managed'|'api_gateway_managed'|'gateway_load_balancer'|'gateway_load_balancer_endpoint'|'iot_rules_managed'|'aws_codestar_connections_managed',
        'Ipv6Addresses': [
            {
                'Ipv6Address': 'string'
            },
        ],
        'MacAddress': 'string',
        'NetworkInterfaceId': 'string',
        'OutpostArn': 'string',
        'OwnerId': 'string',
        'PrivateDnsName': 'string',
        'PrivateIpAddress': 'string',
        'PrivateIpAddresses': [
            {
                'Association': {
                    'AllocationId': 'string',
                    'AssociationId': 'string',
                    'IpOwnerId': 'string',
                    'PublicDnsName': 'string',
                    'PublicIp': 'string',
                    'CustomerOwnedIp': 'string',
                    'CarrierIp': 'string'
                },
                'Primary': True|False,
                'PrivateDnsName': 'string',
                'PrivateIpAddress': 'string'
            },
        ],
        'Ipv4Prefixes': [
            {
                'Ipv4Prefix': 'string'
            },
        ],
        'Ipv6Prefixes': [
            {
                'Ipv6Prefix': 'string'
            },
        ],
        'RequesterId': 'string',
        'RequesterManaged': True|False,
        'SourceDestCheck': True|False,
        'Status': 'available'|'associated'|'attaching'|'in-use'|'detaching',
        'SubnetId': 'string',
        'TagSet': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VpcId': 'string',
        'DenyAllIgwTraffic': True|False,
        'Ipv6Native': True|False,
        'Ipv6Address': 'string'
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of CreateNetworkInterface.

    • NetworkInterface (dict) --

      Information about the network interface.

      • Association (dict) --

        The association information for an Elastic IP address (IPv4) associated with the network interface.

        • AllocationId (string) --

          The allocation ID.

        • AssociationId (string) --

          The association ID.

        • IpOwnerId (string) --

          The ID of the Elastic IP address owner.

        • PublicDnsName (string) --

          The public DNS name.

        • PublicIp (string) --

          The address of the Elastic IP address bound to the network interface.

        • CustomerOwnedIp (string) --

          The customer-owned IP address associated with the network interface.

        • CarrierIp (string) --

          The carrier IP address associated with the network interface.

          This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

      • Attachment (dict) --

        The network interface attachment.

        • AttachTime (datetime) --

          The timestamp indicating when the attachment initiated.

        • AttachmentId (string) --

          The ID of the network interface attachment.

        • DeleteOnTermination (boolean) --

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

        • DeviceIndex (integer) --

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

        • NetworkCardIndex (integer) --

          The index of the network card.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceOwnerId (string) --

          The Amazon Web Services account ID of the owner of the instance.

        • Status (string) --

          The attachment state.

      • AvailabilityZone (string) --

        The Availability Zone.

      • Description (string) --

        A description.

      • Groups (list) --

        Any security groups for the network interface.

        • (dict) --

          Describes a security group.

          • GroupName (string) --

            The name of the security group.

          • GroupId (string) --

            The ID of the security group.

      • InterfaceType (string) --

        The type of network interface.

      • Ipv6Addresses (list) --

        The IPv6 addresses associated with the network interface.

        • (dict) --

          Describes an IPv6 address associated with a network interface.

          • Ipv6Address (string) --

            The IPv6 address.

      • MacAddress (string) --

        The MAC address.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

      • OutpostArn (string) --

        The Amazon Resource Name (ARN) of the Outpost.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the network interface.

      • PrivateDnsName (string) --

        The private DNS name.

      • PrivateIpAddress (string) --

        The IPv4 address of the network interface within the subnet.

      • PrivateIpAddresses (list) --

        The private IPv4 addresses associated with the network interface.

        • (dict) --

          Describes the private IPv4 address of a network interface.

          • Association (dict) --

            The association information for an Elastic IP address (IPv4) associated with the network interface.

            • AllocationId (string) --

              The allocation ID.

            • AssociationId (string) --

              The association ID.

            • IpOwnerId (string) --

              The ID of the Elastic IP address owner.

            • PublicDnsName (string) --

              The public DNS name.

            • PublicIp (string) --

              The address of the Elastic IP address bound to the network interface.

            • CustomerOwnedIp (string) --

              The customer-owned IP address associated with the network interface.

            • CarrierIp (string) --

              The carrier IP address associated with the network interface.

              This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

          • Primary (boolean) --

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

          • PrivateDnsName (string) --

            The private DNS name.

          • PrivateIpAddress (string) --

            The private IPv4 address.

      • Ipv4Prefixes (list) --

        The IPv4 prefixes that are assigned to the network interface.

      • Ipv6Prefixes (list) --

        The IPv6 prefixes that are assigned to the network interface.

        • (dict) --

          Describes the IPv6 prefix.

          • Ipv6Prefix (string) --

            The IPv6 prefix.

      • RequesterId (string) --

        The alias or Amazon Web Services account ID of the principal or service that created the network interface.

      • RequesterManaged (boolean) --

        Indicates whether the network interface is being managed by Amazon Web Services.

      • SourceDestCheck (boolean) --

        Indicates whether source/destination checking is enabled.

      • Status (string) --

        The status of the network interface.

      • SubnetId (string) --

        The ID of the subnet.

      • TagSet (list) --

        Any tags assigned to the network interface.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • VpcId (string) --

        The ID of the VPC.

      • DenyAllIgwTraffic (boolean) --

        Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true , inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.

      • Ipv6Native (boolean) --

        Indicates whether this is an IPv6 only network interface.

      • Ipv6Address (string) --

        The IPv6 globally unique address associated with the network interface.

    • ClientToken (string) --

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

Examples

This example creates a network interface for the specified subnet.

response = client.create_network_interface(
    Description='my network interface',
    Groups=[
        'sg-903004f8',
    ],
    PrivateIpAddress='10.0.2.17',
    SubnetId='subnet-9d4a7b6c',
)

print(response)

Expected Output:

{
    'NetworkInterface': {
        'AvailabilityZone': 'us-east-1d',
        'Description': 'my network interface',
        'Groups': [
            {
                'GroupId': 'sg-903004f8',
                'GroupName': 'default',
            },
        ],
        'MacAddress': '02:1a:80:41:52:9c',
        'NetworkInterfaceId': 'eni-e5aa89a3',
        'OwnerId': '123456789012',
        'PrivateIpAddress': '10.0.2.17',
        'PrivateIpAddresses': [
            {
                'Primary': True,
                'PrivateIpAddress': '10.0.2.17',
            },
        ],
        'RequesterManaged': False,
        'SourceDestCheck': True,
        'Status': 'pending',
        'SubnetId': 'subnet-9d4a7b6c',
        'TagSet': [
        ],
        'VpcId': 'vpc-a01106c2',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_network_interface_permission(**kwargs)

Grants an Amazon Web Services-authorized account permission to attach the specified network interface to an instance in their account.

You can grant permission to a single Amazon Web Services account only, and only one account at a time.

See also: AWS API Documentation

Request Syntax

response = client.create_network_interface_permission(
    NetworkInterfaceId='string',
    AwsAccountId='string',
    AwsService='string',
    Permission='INSTANCE-ATTACH'|'EIP-ASSOCIATE',
    DryRun=True|False
)
Parameters
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

  • AwsAccountId (string) -- The Amazon Web Services account ID.
  • AwsService (string) -- The Amazon Web Service. Currently not supported.
  • Permission (string) --

    [REQUIRED]

    The type of permission to grant.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InterfacePermission': {
        'NetworkInterfacePermissionId': 'string',
        'NetworkInterfaceId': 'string',
        'AwsAccountId': 'string',
        'AwsService': 'string',
        'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE',
        'PermissionState': {
            'State': 'pending'|'granted'|'revoking'|'revoked',
            'StatusMessage': 'string'
        }
    }
}

Response Structure

  • (dict) --

    Contains the output of CreateNetworkInterfacePermission.

    • InterfacePermission (dict) --

      Information about the permission for the network interface.

      • NetworkInterfacePermissionId (string) --

        The ID of the network interface permission.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

      • AwsAccountId (string) --

        The Amazon Web Services account ID.

      • AwsService (string) --

        The Amazon Web Service.

      • Permission (string) --

        The type of permission.

      • PermissionState (dict) --

        Information about the state of the permission.

        • State (string) --

          The state of the permission.

        • StatusMessage (string) --

          A status message, if applicable.

create_placement_group(**kwargs)

Creates a placement group in which to launch instances. The strategy of the placement group determines how the instances are organized within the group.

A cluster placement group is a logical grouping of instances within a single Availability Zone that benefit from low network latency, high network throughput. A spread placement group places instances on distinct hardware. A partition placement group places groups of instances in different partitions, where instances in one partition do not share the same hardware with instances in another partition.

For more information, see Placement groups in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_placement_group(
    DryRun=True|False,
    GroupName='string',
    Strategy='cluster'|'spread'|'partition',
    PartitionCount=123,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    SpreadLevel='host'|'rack'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupName (string) --

    A name for the placement group. Must be unique within the scope of your account for the Region.

    Constraints: Up to 255 ASCII characters

  • Strategy (string) -- The placement strategy.
  • PartitionCount (integer) -- The number of partitions. Valid only when Strategy is set to partition .
  • TagSpecifications (list) --

    The tags to apply to the new placement group.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • SpreadLevel (string) --

    Determines how placement groups spread instances.

    • Host – You can use host only with Outpost placement groups.
    • Rack – No usage restrictions.
Return type

dict

Returns

Response Syntax

{
    'PlacementGroup': {
        'GroupName': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'Strategy': 'cluster'|'spread'|'partition',
        'PartitionCount': 123,
        'GroupId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'GroupArn': 'string',
        'SpreadLevel': 'host'|'rack'
    }
}

Response Structure

  • (dict) --

    • PlacementGroup (dict) --

      Describes a placement group.

      • GroupName (string) --

        The name of the placement group.

      • State (string) --

        The state of the placement group.

      • Strategy (string) --

        The placement strategy.

      • PartitionCount (integer) --

        The number of partitions. Valid only if strategy is set to partition .

      • GroupId (string) --

        The ID of the placement group.

      • Tags (list) --

        Any tags applied to the placement 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 256 Unicode characters.

      • GroupArn (string) --

        The Amazon Resource Name (ARN) of the placement group.

      • SpreadLevel (string) --

        The spread level for the placement group. Only Outpost placement groups can be spread across hosts.

Examples

This example creates a placement group with the specified name.

response = client.create_placement_group(
    GroupName='my-cluster',
    Strategy='cluster',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
create_public_ipv4_pool(**kwargs)

Creates a public IPv4 address pool. A public IPv4 pool is an EC2 IP address pool required for the public IPv4 CIDRs that you own and bring to Amazon Web Services to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, however, use IPAM pools only. To monitor the status of pool creation, use DescribePublicIpv4Pools .

See also: AWS API Documentation

Request Syntax

response = client.create_public_ipv4_pool(
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • TagSpecifications (list) --

    The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'PoolId': 'string'
}

Response Structure

  • (dict) --

    • PoolId (string) --

      The ID of the public IPv4 pool.

create_replace_root_volume_task(**kwargs)

Creates a root volume replacement task for an Amazon EC2 instance. The root volume can either be restored to its initial launch state, or it can be restored using a specific snapshot.

For more information, see Replace a root volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_replace_root_volume_task(
    InstanceId='string',
    SnapshotId='string',
    ClientToken='string',
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance for which to replace the root volume.

  • SnapshotId (string) -- The ID of the snapshot from which to restore the replacement root volume. If you want to restore the volume to the initial launch state, omit this parameter.
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency. For more information, see Ensuring idempotency .

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to apply to the root volume replacement task.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'ReplaceRootVolumeTask': {
        'ReplaceRootVolumeTaskId': 'string',
        'InstanceId': 'string',
        'TaskState': 'pending'|'in-progress'|'failing'|'succeeded'|'failed'|'failed-detached',
        'StartTime': 'string',
        'CompleteTime': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • ReplaceRootVolumeTask (dict) --

      Information about the root volume replacement task.

      • ReplaceRootVolumeTaskId (string) --

        The ID of the root volume replacement task.

      • InstanceId (string) --

        The ID of the instance for which the root volume replacement task was created.

      • TaskState (string) --

        The state of the task. The task can be in one of the following states:

        • pending - the replacement volume is being created.
        • in-progress - the original volume is being detached and the replacement volume is being attached.
        • succeeded - the replacement volume has been successfully attached to the instance and the instance is available.
        • failing - the replacement task is in the process of failing.
        • failed - the replacement task has failed but the original root volume is still attached.
        • failing-detached - the replacement task is in the process of failing. The instance might have no root volume attached.
        • failed-detached - the replacement task has failed and the instance has no root volume attached.
      • StartTime (string) --

        The time the task was started.

      • CompleteTime (string) --

        The time the task completed.

      • Tags (list) --

        The 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 256 Unicode characters.

create_reserved_instances_listing(**kwargs)

Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the Reserved Instance Marketplace. You can submit one Standard Reserved Instance listing at a time. To get a list of your Standard Reserved Instances, you can use the DescribeReservedInstances operation.

Note

Only Standard Reserved Instances can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances cannot be sold.

The Reserved Instance Marketplace matches sellers who want to resell Standard Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

To sell your Standard Reserved Instances, you must first register as a seller in the Reserved Instance Marketplace. After completing the registration process, you can create a Reserved Instance Marketplace listing of some or all of your Standard Reserved Instances, and specify the upfront price to receive for them. Your Standard Reserved Instance listings then become available for purchase. To view the details of your Standard Reserved Instance listing, you can use the DescribeReservedInstancesListings operation.

For more information, see Reserved Instance Marketplace in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_reserved_instances_listing(
    ClientToken='string',
    InstanceCount=123,
    PriceSchedules=[
        {
            'CurrencyCode': 'USD',
            'Price': 123.0,
            'Term': 123
        },
    ],
    ReservedInstancesId='string'
)
Parameters
  • ClientToken (string) --

    [REQUIRED]

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

  • InstanceCount (integer) --

    [REQUIRED]

    The number of instances that are a part of a Reserved Instance account to be listed in the Reserved Instance Marketplace. This number should be less than or equal to the instance count associated with the Reserved Instance ID specified in this call.

  • PriceSchedules (list) --

    [REQUIRED]

    A list specifying the price of the Standard Reserved Instance for each month remaining in the Reserved Instance term.

    • (dict) --

      Describes the price for a Reserved Instance.

      • CurrencyCode (string) --

        The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD .

      • Price (float) --

        The fixed price for the term.

      • Term (integer) --

        The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

  • ReservedInstancesId (string) --

    [REQUIRED]

    The ID of the active Standard Reserved Instance.

Return type

dict

Returns

Response Syntax

{
    'ReservedInstancesListings': [
        {
            'ClientToken': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'InstanceCounts': [
                {
                    'InstanceCount': 123,
                    'State': 'available'|'sold'|'cancelled'|'pending'
                },
            ],
            'PriceSchedules': [
                {
                    'Active': True|False,
                    'CurrencyCode': 'USD',
                    'Price': 123.0,
                    'Term': 123
                },
            ],
            'ReservedInstancesId': 'string',
            'ReservedInstancesListingId': 'string',
            'Status': 'active'|'pending'|'cancelled'|'closed',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'UpdateDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of CreateReservedInstancesListing.

    • ReservedInstancesListings (list) --

      Information about the Standard Reserved Instance listing.

      • (dict) --

        Describes a Reserved Instance listing.

        • ClientToken (string) --

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

        • CreateDate (datetime) --

          The time the listing was created.

        • InstanceCounts (list) --

          The number of instances in this state.

          • (dict) --

            Describes a Reserved Instance listing state.

            • InstanceCount (integer) --

              The number of listed Reserved Instances in the state specified by the state .

            • State (string) --

              The states of the listed Reserved Instances.

        • PriceSchedules (list) --

          The price of the Reserved Instance listing.

          • (dict) --

            Describes the price for a Reserved Instance.

            • Active (boolean) --

              The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

              A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

            • CurrencyCode (string) --

              The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD .

            • Price (float) --

              The fixed price for the term.

            • Term (integer) --

              The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

        • ReservedInstancesListingId (string) --

          The ID of the Reserved Instance listing.

        • Status (string) --

          The status of the Reserved Instance listing.

        • StatusMessage (string) --

          The reason for the current status of the Reserved Instance listing. The response can be blank.

        • 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 256 Unicode characters.

        • UpdateDate (datetime) --

          The last modified timestamp of the listing.

create_restore_image_task(**kwargs)

Starts a task that restores an AMI from an Amazon S3 object that was previously created by using CreateStoreImageTask .

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using Amazon S3 in the Amazon Elastic Compute Cloud User Guide .

For more information, see Store and restore an AMI using Amazon S3 in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_restore_image_task(
    Bucket='string',
    ObjectKey='string',
    Name='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Bucket (string) --

    [REQUIRED]

    The name of the Amazon S3 bucket that contains the stored AMI object.

  • ObjectKey (string) --

    [REQUIRED]

    The name of the stored AMI object in the bucket.

  • Name (string) -- The name for the restored AMI. The name must be unique for AMIs in the Region for this account. If you do not provide a name, the new AMI gets the same name as the original AMI.
  • TagSpecifications (list) --

    The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, the snapshots, or both.

    • To tag the AMI, the value for ResourceType must be image .
    • To tag the snapshots, the value for ResourceType must be snapshot . The same tag is applied to all of the snapshots that are created.
    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ImageId': 'string'
}

Response Structure

  • (dict) --

    • ImageId (string) --

      The AMI ID.

create_route(**kwargs)

Creates a route in a route table within a VPC.

You must specify either a destination CIDR block or a prefix list ID. You must also specify exactly one of the resources from the parameter list.

When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address 192.0.2.3 , and the route table includes the following two IPv4 routes:

  • 192.0.2.0/24 (goes to some target A)
  • 192.0.2.0/28 (goes to some target B)

Both routes apply to the traffic destined for 192.0.2.3 . However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.

For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_route(
    DestinationCidrBlock='string',
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    VpcEndpointId='string',
    EgressOnlyInternetGatewayId='string',
    GatewayId='string',
    InstanceId='string',
    NatGatewayId='string',
    TransitGatewayId='string',
    LocalGatewayId='string',
    CarrierGatewayId='string',
    NetworkInterfaceId='string',
    RouteTableId='string',
    VpcPeeringConnectionId='string',
    CoreNetworkArn='string'
)
Parameters
  • DestinationCidrBlock (string) -- The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .
  • DestinationIpv6CidrBlock (string) -- The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
  • DestinationPrefixListId (string) -- The ID of a prefix list used for the destination match.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointId (string) -- The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
  • EgressOnlyInternetGatewayId (string) -- [IPv6 traffic only] The ID of an egress-only internet gateway.
  • GatewayId (string) -- The ID of an internet gateway or virtual private gateway attached to your VPC.
  • InstanceId (string) -- The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
  • NatGatewayId (string) -- [IPv4 traffic only] The ID of a NAT gateway.
  • TransitGatewayId (string) -- The ID of a transit gateway.
  • LocalGatewayId (string) -- The ID of the local gateway.
  • CarrierGatewayId (string) --

    The ID of the carrier gateway.

    You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.

  • NetworkInterfaceId (string) -- The ID of a network interface.
  • RouteTableId (string) --

    [REQUIRED]

    The ID of the route table for the route.

  • VpcPeeringConnectionId (string) -- The ID of a VPC peering connection.
  • CoreNetworkArn (string) -- The Amazon Resource Name (ARN) of the core network.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

Examples

This example creates a route for the specified route table. The route matches all traffic (0.0.0.0/0) and routes it to the specified Internet gateway.

response = client.create_route(
    DestinationCidrBlock='0.0.0.0/0',
    GatewayId='igw-c0a643a9',
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
create_route_table(**kwargs)

Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_route_table(
    DryRun=True|False,
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • TagSpecifications (list) --

    The tags to assign to the route table.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'RouteTable': {
        'Associations': [
            {
                'Main': True|False,
                'RouteTableAssociationId': 'string',
                'RouteTableId': 'string',
                'SubnetId': 'string',
                'GatewayId': 'string',
                'AssociationState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failed',
                    'StatusMessage': 'string'
                }
            },
        ],
        'PropagatingVgws': [
            {
                'GatewayId': 'string'
            },
        ],
        'RouteTableId': 'string',
        'Routes': [
            {
                'DestinationCidrBlock': 'string',
                'DestinationIpv6CidrBlock': 'string',
                'DestinationPrefixListId': 'string',
                'EgressOnlyInternetGatewayId': 'string',
                'GatewayId': 'string',
                'InstanceId': 'string',
                'InstanceOwnerId': 'string',
                'NatGatewayId': 'string',
                'TransitGatewayId': 'string',
                'LocalGatewayId': 'string',
                'CarrierGatewayId': 'string',
                'NetworkInterfaceId': 'string',
                'Origin': 'CreateRouteTable'|'CreateRoute'|'EnableVgwRoutePropagation',
                'State': 'active'|'blackhole',
                'VpcPeeringConnectionId': 'string',
                'CoreNetworkArn': 'string'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VpcId': 'string',
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • RouteTable (dict) --

      Information about the route table.

      • Associations (list) --

        The associations between the route table and one or more subnets or a gateway.

        • (dict) --

          Describes an association between a route table and a subnet or gateway.

          • Main (boolean) --

            Indicates whether this is the main route table.

          • RouteTableAssociationId (string) --

            The ID of the association.

          • RouteTableId (string) --

            The ID of the route table.

          • SubnetId (string) --

            The ID of the subnet. A subnet ID is not returned for an implicit association.

          • GatewayId (string) --

            The ID of the internet gateway or virtual private gateway.

          • AssociationState (dict) --

            The state of the association.

            • State (string) --

              The state of the association.

            • StatusMessage (string) --

              The status message, if applicable.

      • PropagatingVgws (list) --

        Any virtual private gateway (VGW) propagating routes.

        • (dict) --

          Describes a virtual private gateway propagating route.

          • GatewayId (string) --

            The ID of the virtual private gateway.

      • RouteTableId (string) --

        The ID of the route table.

      • Routes (list) --

        The routes in the route table.

        • (dict) --

          Describes a route in a route table.

          • DestinationCidrBlock (string) --

            The IPv4 CIDR block used for the destination match.

          • DestinationIpv6CidrBlock (string) --

            The IPv6 CIDR block used for the destination match.

          • DestinationPrefixListId (string) --

            The prefix of the Amazon Web Service.

          • EgressOnlyInternetGatewayId (string) --

            The ID of the egress-only internet gateway.

          • GatewayId (string) --

            The ID of a gateway attached to your VPC.

          • InstanceId (string) --

            The ID of a NAT instance in your VPC.

          • InstanceOwnerId (string) --

            The ID of Amazon Web Services account that owns the instance.

          • NatGatewayId (string) --

            The ID of a NAT gateway.

          • TransitGatewayId (string) --

            The ID of a transit gateway.

          • LocalGatewayId (string) --

            The ID of the local gateway.

          • CarrierGatewayId (string) --

            The ID of the carrier gateway.

          • NetworkInterfaceId (string) --

            The ID of the network interface.

          • Origin (string) --

            Describes how the route was created.

            • CreateRouteTable - The route was automatically created when the route table was created.
            • CreateRoute - The route was manually added to the route table.
            • EnableVgwRoutePropagation - The route was propagated by route propagation.
          • State (string) --

            The state of the route. The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

          • VpcPeeringConnectionId (string) --

            The ID of a VPC peering connection.

          • CoreNetworkArn (string) --

            The Amazon Resource Name (ARN) of the core network.

      • Tags (list) --

        Any tags assigned to the route table.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • VpcId (string) --

        The ID of the VPC.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the route table.

Examples

This example creates a route table for the specified VPC.

response = client.create_route_table(
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'RouteTable': {
        'Associations': [
        ],
        'PropagatingVgws': [
        ],
        'RouteTableId': 'rtb-22574640',
        'Routes': [
            {
                'DestinationCidrBlock': '10.0.0.0/16',
                'GatewayId': 'local',
                'State': 'active',
            },
        ],
        'Tags': [
        ],
        'VpcId': 'vpc-a01106c2',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_security_group(**kwargs)

Creates a security group.

A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. 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 .

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress , AuthorizeSecurityGroupEgress , RevokeSecurityGroupIngress , and RevokeSecurityGroupEgress .

For more information about VPC security group limits, see Amazon VPC Limits .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_security_group(
    Description='string',
    GroupName='string',
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) --

    [REQUIRED]

    A description for the security group. This is informational only.

    Constraints: Up to 255 characters in length

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • GroupName (string) --

    [REQUIRED]

    The name of the security group.

    Constraints: Up to 255 characters in length. Cannot start with sg- .

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • VpcId (string) -- [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
  • TagSpecifications (list) --

    The tags to assign to the security group.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'GroupId': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • GroupId (string) --

      The ID of the security group.

    • Tags (list) --

      The 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 256 Unicode characters.

Examples

This example creates a security group for the specified VPC.

response = client.create_security_group(
    Description='My security group',
    GroupName='my-security-group',
    VpcId='vpc-1a2b3c4d',
)

print(response)

Expected Output:

{
    'GroupId': 'sg-903004f8',
    'ResponseMetadata': {
        '...': '...',
    },
}
create_snapshot(**kwargs)

Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

You can create snapshots of volumes in a Region and volumes on an Outpost. If you create a snapshot of a volume in a Region, the snapshot must be stored in the same Region as the volume. If you create a snapshot of a volume on an Outpost, the snapshot can be stored on the same Outpost as the volume, or in the Region for that Outpost.

When a snapshot is created, any Amazon Web Services Marketplace product codes that are associated with the source volume are propagated to the snapshot.

You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your Amazon EBS volume at the time the snapshot command is issued; this might exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending .

To create a snapshot for Amazon EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

You can tag your snapshots during creation. For more information, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

For more information, see Amazon Elastic Block Store and Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_snapshot(
    Description='string',
    OutpostArn='string',
    VolumeId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) -- A description for the snapshot.
  • OutpostArn (string) --

    The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.

    • To create a snapshot of a volume in a Region, omit this parameter. The snapshot is created in the same Region as the volume.
    • To create a snapshot of a volume on an Outpost and store the snapshot in the Region, omit this parameter. The snapshot is created in the Region for the Outpost.
    • To create a snapshot of a volume on an Outpost and store the snapshot on an Outpost, specify the ARN of the destination Outpost. The snapshot must be created on the same Outpost as the volume.

    For more information, see Create local snapshots from volumes on an Outpost in the Amazon Elastic Compute Cloud User Guide .

  • VolumeId (string) --

    [REQUIRED]

    The ID of the Amazon EBS volume.

  • TagSpecifications (list) --

    The tags to apply to the snapshot during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'DataEncryptionKeyId': 'string',
    'Description': 'string',
    'Encrypted': True|False,
    'KmsKeyId': 'string',
    'OwnerId': 'string',
    'Progress': 'string',
    'SnapshotId': 'string',
    'StartTime': datetime(2015, 1, 1),
    'State': 'pending'|'completed'|'error'|'recoverable'|'recovering',
    'StateMessage': 'string',
    'VolumeId': 'string',
    'VolumeSize': 123,
    'OwnerAlias': 'string',
    'OutpostArn': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'StorageTier': 'archive'|'standard',
    'RestoreExpiryTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Describes a snapshot.

    • DataEncryptionKeyId (string) --

      The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by DescribeSnapshots .

    • Description (string) --

      The description for the snapshot.

    • Encrypted (boolean) --

      Indicates whether the snapshot is encrypted.

    • KmsKeyId (string) --

      The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.

    • OwnerId (string) --

      The ID of the Amazon Web Services account that owns the EBS snapshot.

    • Progress (string) --

      The progress of the snapshot, as a percentage.

    • SnapshotId (string) --

      The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

    • StartTime (datetime) --

      The time stamp when the snapshot was initiated.

    • State (string) --

      The snapshot state.

    • StateMessage (string) --

      Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by DescribeSnapshots .

    • VolumeId (string) --

      The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

    • VolumeSize (integer) --

      The size of the volume, in GiB.

    • OwnerAlias (string) --

      The Amazon Web Services owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console.

    • OutpostArn (string) --

      The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

    • Tags (list) --

      Any tags assigned to the snapshot.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

    • StorageTier (string) --

      The storage tier in which the snapshot is stored. standard indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. archive indicates that the snapshot is currently archived and that it must be restored before it can be used.

    • RestoreExpiryTime (datetime) --

      Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.

Examples

This example creates a snapshot of the volume with a volume ID of vol-1234567890abcdef0 and a short description to identify the snapshot.

response = client.create_snapshot(
    Description='This is my root volume snapshot.',
    VolumeId='vol-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'Description': 'This is my root volume snapshot.',
    'OwnerId': '012345678910',
    'SnapshotId': 'snap-066877671789bd71b',
    'StartTime': datetime(2014, 2, 28, 21, 6, 1, 4, 59, 0),
    'State': 'pending',
    'Tags': [
    ],
    'VolumeId': 'vol-1234567890abcdef0',
    'VolumeSize': 8,
    'ResponseMetadata': {
        '...': '...',
    },
}
create_snapshots(**kwargs)

Creates crash-consistent snapshots of multiple EBS volumes and stores the data in S3. Volumes are chosen by specifying an instance. Any attached volumes will produce one snapshot each that is crash-consistent across the instance. Boot volumes can be excluded by changing the parameters.

You can create multi-volume snapshots of instances in a Region and instances on an Outpost. If you create snapshots from an instance in a Region, the snapshots must be stored in the same Region as the instance. If you create snapshots from an instance on an Outpost, the snapshots can be stored on the same Outpost as the instance, or in the Region for that Outpost.

See also: AWS API Documentation

Request Syntax

response = client.create_snapshots(
    Description='string',
    InstanceSpecification={
        'InstanceId': 'string',
        'ExcludeBootVolume': True|False
    },
    OutpostArn='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    CopyTagsFromSource='volume'
)
Parameters
  • Description (string) -- A description propagated to every snapshot specified by the instance.
  • InstanceSpecification (dict) --

    [REQUIRED]

    The instance to specify which volumes should be included in the snapshots.

    • InstanceId (string) --

      The instance to specify which volumes should be snapshotted.

    • ExcludeBootVolume (boolean) --

      Excludes the root volume from being snapshotted.

  • OutpostArn (string) --

    The Amazon Resource Name (ARN) of the Outpost on which to create the local snapshots.

    • To create snapshots from an instance in a Region, omit this parameter. The snapshots are created in the same Region as the instance.
    • To create snapshots from an instance on an Outpost and store the snapshots in the Region, omit this parameter. The snapshots are created in the Region for the Outpost.
    • To create snapshots from an instance on an Outpost and store the snapshots on an Outpost, specify the ARN of the destination Outpost. The snapshots must be created on the same Outpost as the instance.

    For more information, see Create multi-volume local snapshots from instances on an Outpost in the Amazon Elastic Compute Cloud User Guide .

  • TagSpecifications (list) --

    Tags to apply to every snapshot specified by the instance.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • CopyTagsFromSource (string) -- Copies the tags from the specified volume to corresponding snapshot.
Return type

dict

Returns

Response Syntax

{
    'Snapshots': [
        {
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Encrypted': True|False,
            'VolumeId': 'string',
            'State': 'pending'|'completed'|'error'|'recoverable'|'recovering',
            'VolumeSize': 123,
            'StartTime': datetime(2015, 1, 1),
            'Progress': 'string',
            'OwnerId': 'string',
            'SnapshotId': 'string',
            'OutpostArn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Snapshots (list) --

      List of snapshots.

      • (dict) --

        Information about a snapshot.

        • Description (string) --

          Description specified by the CreateSnapshotRequest that has been applied to all snapshots.

        • Tags (list) --

          Tags associated with this snapshot.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • Encrypted (boolean) --

          Indicates whether the snapshot is encrypted.

        • VolumeId (string) --

          Source volume from which this snapshot was created.

        • State (string) --

          Current state of the snapshot.

        • VolumeSize (integer) --

          Size of the volume from which this snapshot was created.

        • StartTime (datetime) --

          Time this snapshot was started. This is the same for all snapshots initiated by the same request.

        • Progress (string) --

          Progress this snapshot has made towards completing.

        • OwnerId (string) --

          Account id used when creating this snapshot.

        • SnapshotId (string) --

          Snapshot id that can be used to describe this snapshot.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

create_spot_datafeed_subscription(**kwargs)

Creates a data feed for Spot Instances, enabling you to view Spot Instance usage logs. You can create one data feed per Amazon Web Services account. For more information, see Spot Instance data feed in the Amazon EC2 User Guide for Linux Instances .

See also: AWS API Documentation

Request Syntax

response = client.create_spot_datafeed_subscription(
    Bucket='string',
    DryRun=True|False,
    Prefix='string'
)
Parameters
  • Bucket (string) --

    [REQUIRED]

    The name of the Amazon S3 bucket in which to store the Spot Instance data feed. For more information about bucket names, see Rules for bucket naming in the Amazon S3 Developer Guide .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Prefix (string) -- The prefix for the data feed file names.
Return type

dict

Returns

Response Syntax

{
    'SpotDatafeedSubscription': {
        'Bucket': 'string',
        'Fault': {
            'Code': 'string',
            'Message': 'string'
        },
        'OwnerId': 'string',
        'Prefix': 'string',
        'State': 'Active'|'Inactive'
    }
}

Response Structure

  • (dict) --

    Contains the output of CreateSpotDatafeedSubscription.

    • SpotDatafeedSubscription (dict) --

      The Spot Instance data feed subscription.

      • Bucket (string) --

        The name of the Amazon S3 bucket where the Spot Instance data feed is located.

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

      • OwnerId (string) --

        The Amazon Web Services account ID of the account.

      • Prefix (string) --

        The prefix for the data feed files.

      • State (string) --

        The state of the Spot Instance data feed subscription.

Examples

This example creates a Spot Instance data feed for your AWS account.

response = client.create_spot_datafeed_subscription(
    Bucket='my-s3-bucket',
    Prefix='spotdata',
)

print(response)

Expected Output:

{
    'SpotDatafeedSubscription': {
        'Bucket': 'my-s3-bucket',
        'OwnerId': '123456789012',
        'Prefix': 'spotdata',
        'State': 'Active',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_store_image_task(**kwargs)

Stores an AMI as a single object in an Amazon S3 bucket.

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using Amazon S3 in the Amazon Elastic Compute Cloud User Guide .

For more information, see Store and restore an AMI using Amazon S3 in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_store_image_task(
    ImageId='string',
    Bucket='string',
    S3ObjectTags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    DryRun=True|False
)
Parameters
  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI.

  • Bucket (string) --

    [REQUIRED]

    The name of the Amazon S3 bucket in which the AMI object will be stored. The bucket must be in the Region in which the request is being made. The AMI object appears in the bucket only after the upload task has completed.

  • S3ObjectTags (list) --

    The tags to apply to the AMI object that will be stored in the Amazon S3 bucket.

    • (dict) --

      The tags to apply to the AMI object that will be stored in the Amazon S3 bucket. For more information, see Categorizing your storage using tags in the Amazon Simple Storage Service User Guide .

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters in length. May not begin with aws :.

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters in length.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ObjectKey': 'string'
}

Response Structure

  • (dict) --

    • ObjectKey (string) --

      The name of the stored AMI object in the S3 bucket.

create_subnet(**kwargs)

Creates a subnet in a specified VPC.

You must specify an IPv4 CIDR block for the subnet. After you create a subnet, you can't change its CIDR block. The allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP addresses). The CIDR block must not overlap with the CIDR block of an existing subnet in the VPC.

If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length.

Warning

Amazon Web Services reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.

If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

When you stop an instance in a subnet, it retains its private IPv4 address. It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

For more information about subnets, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_subnet(
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    AvailabilityZone='string',
    AvailabilityZoneId='string',
    CidrBlock='string',
    Ipv6CidrBlock='string',
    OutpostArn='string',
    VpcId='string',
    DryRun=True|False,
    Ipv6Native=True|False
)
Parameters
  • TagSpecifications (list) --

    The tags to assign to the subnet.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • AvailabilityZone (string) --

    The Availability Zone or Local Zone for the subnet.

    Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not necessarily select a different zone for each subnet.

    To create a subnet in a Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a . For information about the Regions that support Local Zones, see Available Regions in the Amazon Elastic Compute Cloud User Guide .

    To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

  • AvailabilityZoneId (string) -- The AZ ID or the Local Zone ID of the subnet.
  • CidrBlock (string) --

    The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24 . We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .

    This parameter is not supported for an IPv6 only subnet.

  • Ipv6CidrBlock (string) --

    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

    This parameter is required for an IPv6 only subnet.

  • OutpostArn (string) -- The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the Availability Zone of the Outpost subnet.
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Ipv6Native (boolean) -- Indicates whether to create an IPv6 only subnet.
Return type

dict

Returns

Response Syntax

{
    'Subnet': {
        'AvailabilityZone': 'string',
        'AvailabilityZoneId': 'string',
        'AvailableIpAddressCount': 123,
        'CidrBlock': 'string',
        'DefaultForAz': True|False,
        'EnableLniAtDeviceIndex': 123,
        'MapPublicIpOnLaunch': True|False,
        'MapCustomerOwnedIpOnLaunch': True|False,
        'CustomerOwnedIpv4Pool': 'string',
        'State': 'pending'|'available',
        'SubnetId': 'string',
        'VpcId': 'string',
        'OwnerId': 'string',
        'AssignIpv6AddressOnCreation': True|False,
        'Ipv6CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'SubnetArn': 'string',
        'OutpostArn': 'string',
        'EnableDns64': True|False,
        'Ipv6Native': True|False,
        'PrivateDnsNameOptionsOnLaunch': {
            'HostnameType': 'ip-name'|'resource-name',
            'EnableResourceNameDnsARecord': True|False,
            'EnableResourceNameDnsAAAARecord': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Subnet (dict) --

      Information about the subnet.

      • AvailabilityZone (string) --

        The Availability Zone of the subnet.

      • AvailabilityZoneId (string) --

        The AZ ID of the subnet.

      • AvailableIpAddressCount (integer) --

        The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

      • CidrBlock (string) --

        The IPv4 CIDR block assigned to the subnet.

      • DefaultForAz (boolean) --

        Indicates whether this is the default subnet for the Availability Zone.

      • EnableLniAtDeviceIndex (integer) --

        Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).

      • MapPublicIpOnLaunch (boolean) --

        Indicates whether instances launched in this subnet receive a public IPv4 address.

      • MapCustomerOwnedIpOnLaunch (boolean) --

        Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives a customer-owned IPv4 address.

      • CustomerOwnedIpv4Pool (string) --

        The customer-owned IPv4 address pool associated with the subnet.

      • State (string) --

        The current state of the subnet.

      • SubnetId (string) --

        The ID of the subnet.

      • VpcId (string) --

        The ID of the VPC the subnet is in.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the subnet.

      • AssignIpv6AddressOnCreation (boolean) --

        Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives an IPv6 address.

      • Ipv6CidrBlockAssociationSet (list) --

        Information about the IPv6 CIDR blocks associated with the subnet.

        • (dict) --

          Describes an association between a subnet and an IPv6 CIDR block.

          • AssociationId (string) --

            The ID of the association.

          • Ipv6CidrBlock (string) --

            The IPv6 CIDR block.

          • Ipv6CidrBlockState (dict) --

            The state of the CIDR block.

            • State (string) --

              The state of a CIDR block.

            • StatusMessage (string) --

              A message about the status of the CIDR block, if applicable.

      • Tags (list) --

        Any tags assigned to the subnet.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • SubnetArn (string) --

        The Amazon Resource Name (ARN) of the subnet.

      • OutpostArn (string) --

        The Amazon Resource Name (ARN) of the Outpost.

      • EnableDns64 (boolean) --

        Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

      • Ipv6Native (boolean) --

        Indicates whether this is an IPv6 only subnet.

      • PrivateDnsNameOptionsOnLaunch (dict) --

        The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.

        • HostnameType (string) --

          The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

        • EnableResourceNameDnsARecord (boolean) --

          Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

        • EnableResourceNameDnsAAAARecord (boolean) --

          Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.

Examples

This example creates a subnet in the specified VPC with the specified CIDR block. We recommend that you let us select an Availability Zone for you.

response = client.create_subnet(
    CidrBlock='10.0.1.0/24',
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'Subnet': {
        'AvailabilityZone': 'us-west-2c',
        'AvailableIpAddressCount': 251,
        'CidrBlock': '10.0.1.0/24',
        'State': 'pending',
        'SubnetId': 'subnet-9d4a7b6c',
        'VpcId': 'vpc-a01106c2',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_subnet_cidr_reservation(**kwargs)

Creates a subnet CIDR reservation. For information about subnet CIDR reservations, see Subnet CIDR reservations in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_subnet_cidr_reservation(
    SubnetId='string',
    Cidr='string',
    ReservationType='prefix'|'explicit',
    Description='string',
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • SubnetId (string) --

    [REQUIRED]

    The ID of the subnet.

  • Cidr (string) --

    [REQUIRED]

    The IPv4 or IPV6 CIDR range to reserve.

  • ReservationType (string) --

    [REQUIRED]

    The type of reservation.

    The following are valid values:

    • prefix : The Amazon EC2 Prefix Delegation feature assigns the IP addresses to network interfaces that are associated with an instance. For information about Prefix Delegation, see Prefix Delegation for Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide .
    • explicit : You manually assign the IP addresses to resources that reside in your subnet.
  • Description (string) -- The description to assign to the subnet CIDR reservation.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to assign to the subnet CIDR reservation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'SubnetCidrReservation': {
        'SubnetCidrReservationId': 'string',
        'SubnetId': 'string',
        'Cidr': 'string',
        'ReservationType': 'prefix'|'explicit',
        'OwnerId': 'string',
        'Description': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • SubnetCidrReservation (dict) --

      Information about the created subnet CIDR reservation.

      • SubnetCidrReservationId (string) --

        The ID of the subnet CIDR reservation.

      • SubnetId (string) --

        The ID of the subnet.

      • Cidr (string) --

        The CIDR that has been reserved.

      • ReservationType (string) --

        The type of reservation.

      • OwnerId (string) --

        The ID of the account that owns the subnet CIDR reservation.

      • Description (string) --

        The description assigned to the subnet CIDR reservation.

      • Tags (list) --

        The tags assigned to the subnet CIDR reservation.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_tags(
    DryRun=True|False,
    Resources=[
        'string',
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Resources (list) --

    [REQUIRED]

    The IDs of the resources, separated by spaces.

    Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

    • (string) --
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

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

      • Value (string) --

        The value of the tag.

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

Returns

None

Examples

This example adds the tag Stack=production to the specified image, or overwrites an existing tag for the AMI where the tag key is Stack.

response = client.create_tags(
    Resources=[
        'ami-78a54011',
    ],
    Tags=[
        {
            'Key': 'Stack',
            'Value': 'production',
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
create_traffic_mirror_filter(**kwargs)

Creates a Traffic Mirror filter.

A Traffic Mirror filter is a set of rules that defines the traffic to mirror.

By default, no traffic is mirrored. To mirror traffic, use CreateTrafficMirrorFilterRule to add Traffic Mirror rules to the filter. The rules you add define what traffic gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices to mirror supported network services.

See also: AWS API Documentation

Request Syntax

response = client.create_traffic_mirror_filter(
    Description='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    ClientToken='string'
)
Parameters
  • Description (string) -- The description of the Traffic Mirror filter.
  • TagSpecifications (list) --

    The tags to assign to a Traffic Mirror filter.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilter': {
        'TrafficMirrorFilterId': 'string',
        'IngressFilterRules': [
            {
                'TrafficMirrorFilterRuleId': 'string',
                'TrafficMirrorFilterId': 'string',
                'TrafficDirection': 'ingress'|'egress',
                'RuleNumber': 123,
                'RuleAction': 'accept'|'reject',
                'Protocol': 123,
                'DestinationPortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'SourcePortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'DestinationCidrBlock': 'string',
                'SourceCidrBlock': 'string',
                'Description': 'string'
            },
        ],
        'EgressFilterRules': [
            {
                'TrafficMirrorFilterRuleId': 'string',
                'TrafficMirrorFilterId': 'string',
                'TrafficDirection': 'ingress'|'egress',
                'RuleNumber': 123,
                'RuleAction': 'accept'|'reject',
                'Protocol': 123,
                'DestinationPortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'SourcePortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'DestinationCidrBlock': 'string',
                'SourceCidrBlock': 'string',
                'Description': 'string'
            },
        ],
        'NetworkServices': [
            'amazon-dns',
        ],
        'Description': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorFilter (dict) --

      Information about the Traffic Mirror filter.

      • TrafficMirrorFilterId (string) --

        The ID of the Traffic Mirror filter.

      • IngressFilterRules (list) --

        Information about the ingress rules that are associated with the Traffic Mirror filter.

        • (dict) --

          Describes the Traffic Mirror rule.

          • TrafficMirrorFilterRuleId (string) --

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId (string) --

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection (string) --

            The traffic direction assigned to the Traffic Mirror rule.

          • RuleNumber (integer) --

            The rule number of the Traffic Mirror rule.

          • RuleAction (string) --

            The action assigned to the Traffic Mirror rule.

          • Protocol (integer) --

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange (dict) --

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange (dict) --

            The source port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock (string) --

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock (string) --

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description (string) --

            The description of the Traffic Mirror rule.

      • EgressFilterRules (list) --

        Information about the egress rules that are associated with the Traffic Mirror filter.

        • (dict) --

          Describes the Traffic Mirror rule.

          • TrafficMirrorFilterRuleId (string) --

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId (string) --

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection (string) --

            The traffic direction assigned to the Traffic Mirror rule.

          • RuleNumber (integer) --

            The rule number of the Traffic Mirror rule.

          • RuleAction (string) --

            The action assigned to the Traffic Mirror rule.

          • Protocol (integer) --

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange (dict) --

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange (dict) --

            The source port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock (string) --

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock (string) --

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description (string) --

            The description of the Traffic Mirror rule.

      • NetworkServices (list) --

        The network service traffic that is associated with the Traffic Mirror filter.

        • (string) --
      • Description (string) --

        The description of the Traffic Mirror filter.

      • Tags (list) --

        The tags assigned to the Traffic Mirror filter.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

    • ClientToken (string) --

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

create_traffic_mirror_filter_rule(**kwargs)

Creates a Traffic Mirror filter rule.

A Traffic Mirror rule defines the Traffic Mirror source traffic to mirror.

You need the Traffic Mirror filter ID when you create the rule.

See also: AWS API Documentation

Request Syntax

response = client.create_traffic_mirror_filter_rule(
    TrafficMirrorFilterId='string',
    TrafficDirection='ingress'|'egress',
    RuleNumber=123,
    RuleAction='accept'|'reject',
    DestinationPortRange={
        'FromPort': 123,
        'ToPort': 123
    },
    SourcePortRange={
        'FromPort': 123,
        'ToPort': 123
    },
    Protocol=123,
    DestinationCidrBlock='string',
    SourceCidrBlock='string',
    Description='string',
    DryRun=True|False,
    ClientToken='string'
)
Parameters
  • TrafficMirrorFilterId (string) --

    [REQUIRED]

    The ID of the filter that this rule is associated with.

  • TrafficDirection (string) --

    [REQUIRED]

    The type of traffic.

  • RuleNumber (integer) --

    [REQUIRED]

    The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.

  • RuleAction (string) --

    [REQUIRED]

    The action to take on the filtered traffic.

  • DestinationPortRange (dict) --

    The destination port range.

    • FromPort (integer) --

      The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • ToPort (integer) --

      The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

  • SourcePortRange (dict) --

    The source port range.

    • FromPort (integer) --

      The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • ToPort (integer) --

      The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

  • Protocol (integer) --

    The protocol, for example UDP, to assign to the Traffic Mirror rule.

    For information about the protocol value, see Protocol Numbers on the Internet Assigned Numbers Authority (IANA) website.

  • DestinationCidrBlock (string) --

    [REQUIRED]

    The destination CIDR block to assign to the Traffic Mirror rule.

  • SourceCidrBlock (string) --

    [REQUIRED]

    The source CIDR block to assign to the Traffic Mirror rule.

  • Description (string) -- The description of the Traffic Mirror rule.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilterRule': {
        'TrafficMirrorFilterRuleId': 'string',
        'TrafficMirrorFilterId': 'string',
        'TrafficDirection': 'ingress'|'egress',
        'RuleNumber': 123,
        'RuleAction': 'accept'|'reject',
        'Protocol': 123,
        'DestinationPortRange': {
            'FromPort': 123,
            'ToPort': 123
        },
        'SourcePortRange': {
            'FromPort': 123,
            'ToPort': 123
        },
        'DestinationCidrBlock': 'string',
        'SourceCidrBlock': 'string',
        'Description': 'string'
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorFilterRule (dict) --

      The Traffic Mirror rule.

      • TrafficMirrorFilterRuleId (string) --

        The ID of the Traffic Mirror rule.

      • TrafficMirrorFilterId (string) --

        The ID of the Traffic Mirror filter that the rule is associated with.

      • TrafficDirection (string) --

        The traffic direction assigned to the Traffic Mirror rule.

      • RuleNumber (integer) --

        The rule number of the Traffic Mirror rule.

      • RuleAction (string) --

        The action assigned to the Traffic Mirror rule.

      • Protocol (integer) --

        The protocol assigned to the Traffic Mirror rule.

      • DestinationPortRange (dict) --

        The destination port range assigned to the Traffic Mirror rule.

        • FromPort (integer) --

          The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • ToPort (integer) --

          The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • SourcePortRange (dict) --

        The source port range assigned to the Traffic Mirror rule.

        • FromPort (integer) --

          The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • ToPort (integer) --

          The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • DestinationCidrBlock (string) --

        The destination CIDR block assigned to the Traffic Mirror rule.

      • SourceCidrBlock (string) --

        The source CIDR block assigned to the Traffic Mirror rule.

      • Description (string) --

        The description of the Traffic Mirror rule.

    • ClientToken (string) --

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

create_traffic_mirror_session(**kwargs)

Creates a Traffic Mirror session.

A Traffic Mirror session actively copies packets from a Traffic Mirror source to a Traffic Mirror target. Create a filter, and then assign it to the session to define a subset of the traffic to mirror, for example all TCP traffic.

The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in a different VPC connected via VPC peering or a transit gateway.

By default, no traffic is mirrored. Use CreateTrafficMirrorFilter to create filter rules that specify the traffic to mirror.

See also: AWS API Documentation

Request Syntax

response = client.create_traffic_mirror_session(
    NetworkInterfaceId='string',
    TrafficMirrorTargetId='string',
    TrafficMirrorFilterId='string',
    PacketLength=123,
    SessionNumber=123,
    VirtualNetworkId=123,
    Description='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    ClientToken='string'
)
Parameters
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the source network interface.

  • TrafficMirrorTargetId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror target.

  • TrafficMirrorFilterId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror filter.

  • PacketLength (integer) --

    The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target.

    If you do not want to mirror the entire packet, use the PacketLength parameter to specify the number of bytes in each packet to mirror.

  • SessionNumber (integer) --

    [REQUIRED]

    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

    Valid values are 1-32766.

  • VirtualNetworkId (integer) -- The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348 . If you do not specify a VirtualNetworkId , an account-wide unique id is chosen at random.
  • Description (string) -- The description of the Traffic Mirror session.
  • TagSpecifications (list) --

    The tags to assign to a Traffic Mirror session.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorSession': {
        'TrafficMirrorSessionId': 'string',
        'TrafficMirrorTargetId': 'string',
        'TrafficMirrorFilterId': 'string',
        'NetworkInterfaceId': 'string',
        'OwnerId': 'string',
        'PacketLength': 123,
        'SessionNumber': 123,
        'VirtualNetworkId': 123,
        'Description': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorSession (dict) --

      Information about the Traffic Mirror session.

      • TrafficMirrorSessionId (string) --

        The ID for the Traffic Mirror session.

      • TrafficMirrorTargetId (string) --

        The ID of the Traffic Mirror target.

      • TrafficMirrorFilterId (string) --

        The ID of the Traffic Mirror filter.

      • NetworkInterfaceId (string) --

        The ID of the Traffic Mirror session's network interface.

      • OwnerId (string) --

        The ID of the account that owns the Traffic Mirror session.

      • PacketLength (integer) --

        The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet

      • SessionNumber (integer) --

        The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

        Valid values are 1-32766.

      • VirtualNetworkId (integer) --

        The virtual network ID associated with the Traffic Mirror session.

      • Description (string) --

        The description of the Traffic Mirror session.

      • Tags (list) --

        The tags assigned to the Traffic Mirror session.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

    • ClientToken (string) --

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

create_traffic_mirror_target(**kwargs)

Creates a target for your Traffic Mirror session.

A Traffic Mirror target is the destination for mirrored traffic. The Traffic Mirror source and the Traffic Mirror target (monitoring appliances) can be in the same VPC, or in different VPCs connected via VPC peering or a transit gateway.

A Traffic Mirror target can be a network interface, a Network Load Balancer, or a Gateway Load Balancer endpoint.

To use the target in a Traffic Mirror session, use CreateTrafficMirrorSession .

See also: AWS API Documentation

Request Syntax

response = client.create_traffic_mirror_target(
    NetworkInterfaceId='string',
    NetworkLoadBalancerArn='string',
    Description='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    ClientToken='string',
    GatewayLoadBalancerEndpointId='string'
)
Parameters
  • NetworkInterfaceId (string) -- The network interface ID that is associated with the target.
  • NetworkLoadBalancerArn (string) -- The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the target.
  • Description (string) -- The description of the Traffic Mirror target.
  • TagSpecifications (list) --

    The tags to assign to the Traffic Mirror target.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • GatewayLoadBalancerEndpointId (string) -- The ID of the Gateway Load Balancer endpoint.
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorTarget': {
        'TrafficMirrorTargetId': 'string',
        'NetworkInterfaceId': 'string',
        'NetworkLoadBalancerArn': 'string',
        'Type': 'network-interface'|'network-load-balancer'|'gateway-load-balancer-endpoint',
        'Description': 'string',
        'OwnerId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'GatewayLoadBalancerEndpointId': 'string'
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorTarget (dict) --

      Information about the Traffic Mirror target.

      • TrafficMirrorTargetId (string) --

        The ID of the Traffic Mirror target.

      • NetworkInterfaceId (string) --

        The network interface ID that is attached to the target.

      • NetworkLoadBalancerArn (string) --

        The Amazon Resource Name (ARN) of the Network Load Balancer.

      • Type (string) --

        The type of Traffic Mirror target.

      • Description (string) --

        Information about the Traffic Mirror target.

      • OwnerId (string) --

        The ID of the account that owns the Traffic Mirror target.

      • Tags (list) --

        The tags assigned to the Traffic Mirror target.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • GatewayLoadBalancerEndpointId (string) --

        The ID of the Gateway Load Balancer endpoint.

    • ClientToken (string) --

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

create_transit_gateway(**kwargs)

Creates a transit gateway.

You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway.

To attach your VPCs, use CreateTransitGatewayVpcAttachment .

To attach a VPN connection, use CreateCustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to CreateVpnConnection .

When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use CreateTransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable to associate a resource attachment with a transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway(
    Description='string',
    Options={
        'AmazonSideAsn': 123,
        'AutoAcceptSharedAttachments': 'enable'|'disable',
        'DefaultRouteTableAssociation': 'enable'|'disable',
        'DefaultRouteTablePropagation': 'enable'|'disable',
        'VpnEcmpSupport': 'enable'|'disable',
        'DnsSupport': 'enable'|'disable',
        'MulticastSupport': 'enable'|'disable',
        'TransitGatewayCidrBlocks': [
            'string',
        ]
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) -- A description of the transit gateway.
  • Options (dict) --

    The transit gateway options.

    • AmazonSideAsn (integer) --

      A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs. The default is 64512 .

    • AutoAcceptSharedAttachments (string) --

      Enable or disable automatic acceptance of attachment requests. Disabled by default.

    • DefaultRouteTableAssociation (string) --

      Enable or disable automatic association with the default association route table. Enabled by default.

    • DefaultRouteTablePropagation (string) --

      Enable or disable automatic propagation of routes to the default propagation route table. Enabled by default.

    • VpnEcmpSupport (string) --

      Enable or disable Equal Cost Multipath Protocol support. Enabled by default.

    • DnsSupport (string) --

      Enable or disable DNS support. Enabled by default.

    • MulticastSupport (string) --

      Indicates whether multicast is enabled on the transit gateway

    • TransitGatewayCidrBlocks (list) --

      One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.

      • (string) --
  • TagSpecifications (list) --

    The tags to apply to the transit gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGateway': {
        'TransitGatewayId': 'string',
        'TransitGatewayArn': 'string',
        'State': 'pending'|'available'|'modifying'|'deleting'|'deleted',
        'OwnerId': 'string',
        'Description': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'AmazonSideAsn': 123,
            'TransitGatewayCidrBlocks': [
                'string',
            ],
            'AutoAcceptSharedAttachments': 'enable'|'disable',
            'DefaultRouteTableAssociation': 'enable'|'disable',
            'AssociationDefaultRouteTableId': 'string',
            'DefaultRouteTablePropagation': 'enable'|'disable',
            'PropagationDefaultRouteTableId': 'string',
            'VpnEcmpSupport': 'enable'|'disable',
            'DnsSupport': 'enable'|'disable',
            'MulticastSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGateway (dict) --

      Information about the transit gateway.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • TransitGatewayArn (string) --

        The Amazon Resource Name (ARN) of the transit gateway.

      • State (string) --

        The state of the transit gateway.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the transit gateway.

      • Description (string) --

        The description of the transit gateway.

      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The transit gateway options.

        • AmazonSideAsn (integer) --

          A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

        • TransitGatewayCidrBlocks (list) --

          The transit gateway CIDR blocks.

          • (string) --
        • AutoAcceptSharedAttachments (string) --

          Indicates whether attachment requests are automatically accepted.

        • DefaultRouteTableAssociation (string) --

          Indicates whether resource attachments are automatically associated with the default association route table.

        • AssociationDefaultRouteTableId (string) --

          The ID of the default association route table.

        • DefaultRouteTablePropagation (string) --

          Indicates whether resource attachments automatically propagate routes to the default propagation route table.

        • PropagationDefaultRouteTableId (string) --

          The ID of the default propagation route table.

        • VpnEcmpSupport (string) --

          Indicates whether Equal Cost Multipath Protocol support is enabled.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • MulticastSupport (string) --

          Indicates whether multicast is enabled on the transit gateway

      • Tags (list) --

        The tags for the transit gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_connect(**kwargs)

Creates a Connect attachment from a specified transit gateway attachment. A Connect attachment is a GRE-based tunnel attachment that you can use to establish a connection between a transit gateway and an appliance.

A Connect attachment uses an existing VPC or Amazon Web Services Direct Connect attachment as the underlying transport mechanism.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_connect(
    TransportTransitGatewayAttachmentId='string',
    Options={
        'Protocol': 'gre'
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransportTransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the transit gateway attachment. You can specify a VPC attachment or Amazon Web Services Direct Connect attachment.

  • Options (dict) --

    [REQUIRED]

    The Connect attachment options.

    • Protocol (string) -- [REQUIRED]

      The tunnel protocol.

  • TagSpecifications (list) --

    The tags to apply to the Connect attachment.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnect': {
        'TransitGatewayAttachmentId': 'string',
        'TransportTransitGatewayAttachmentId': 'string',
        'TransitGatewayId': 'string',
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'Protocol': 'gre'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayConnect (dict) --

      Information about the Connect attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the Connect attachment.

      • TransportTransitGatewayAttachmentId (string) --

        The ID of the attachment from which the Connect attachment was created.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • State (string) --

        The state of the attachment.

      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The Connect attachment options.

        • Protocol (string) --

          The tunnel protocol.

      • Tags (list) --

        The tags for the attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_connect_peer(**kwargs)

Creates a Connect peer for a specified transit gateway Connect attachment between a transit gateway and an appliance.

The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).

For more information, see Connect peers in the Transit Gateways Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_connect_peer(
    TransitGatewayAttachmentId='string',
    TransitGatewayAddress='string',
    PeerAddress='string',
    BgpOptions={
        'PeerAsn': 123
    },
    InsideCidrBlocks=[
        'string',
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the Connect attachment.

  • TransitGatewayAddress (string) -- The peer IP address (GRE outer IP address) on the transit gateway side of the Connect peer, which must be specified from a transit gateway CIDR block. If not specified, Amazon automatically assigns the first available IP address from the transit gateway CIDR block.
  • PeerAddress (string) --

    [REQUIRED]

    The peer IP address (GRE outer IP address) on the appliance side of the Connect peer.

  • BgpOptions (dict) --

    The BGP options for the Connect peer.

    • PeerAsn (integer) --

      The peer Autonomous System Number (ASN).

  • InsideCidrBlocks (list) --

    [REQUIRED]

    The range of inside IP addresses that are used for BGP peering. You must specify a size /29 IPv4 CIDR block from the 169.254.0.0/16 range. The first address from the range must be configured on the appliance as the BGP IP address. You can also optionally specify a size /125 IPv6 CIDR block from the fd00::/8 range.

    • (string) --
  • TagSpecifications (list) --

    The tags to apply to the Connect peer.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnectPeer': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayConnectPeerId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'ConnectPeerConfiguration': {
            'TransitGatewayAddress': 'string',
            'PeerAddress': 'string',
            'InsideCidrBlocks': [
                'string',
            ],
            'Protocol': 'gre',
            'BgpConfigurations': [
                {
                    'TransitGatewayAsn': 123,
                    'PeerAsn': 123,
                    'TransitGatewayAddress': 'string',
                    'PeerAddress': 'string',
                    'BgpStatus': 'up'|'down'
                },
            ]
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayConnectPeer (dict) --

      Information about the Connect peer.

      • TransitGatewayAttachmentId (string) --

        The ID of the Connect attachment.

      • TransitGatewayConnectPeerId (string) --

        The ID of the Connect peer.

      • State (string) --

        The state of the Connect peer.

      • CreationTime (datetime) --

        The creation time.

      • ConnectPeerConfiguration (dict) --

        The Connect peer details.

        • TransitGatewayAddress (string) --

          The Connect peer IP address on the transit gateway side of the tunnel.

        • PeerAddress (string) --

          The Connect peer IP address on the appliance side of the tunnel.

        • InsideCidrBlocks (list) --

          The range of interior BGP peer IP addresses.

          • (string) --
        • Protocol (string) --

          The tunnel protocol.

        • BgpConfigurations (list) --

          The BGP configuration details.

          • (dict) --

            The BGP configuration information.

            • TransitGatewayAsn (integer) --

              The transit gateway Autonomous System Number (ASN).

            • PeerAsn (integer) --

              The peer Autonomous System Number (ASN).

            • TransitGatewayAddress (string) --

              The interior BGP peer IP address for the transit gateway.

            • PeerAddress (string) --

              The interior BGP peer IP address for the appliance.

            • BgpStatus (string) --

              The BGP status.

      • Tags (list) --

        The tags for the Connect peer.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_multicast_domain(**kwargs)

Creates a multicast domain using the specified transit gateway.

The transit gateway must be in the available state before you create a domain. Use DescribeTransitGateways to see the state of transit gateway.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_multicast_domain(
    TransitGatewayId='string',
    Options={
        'Igmpv2Support': 'enable'|'disable',
        'StaticSourcesSupport': 'enable'|'disable',
        'AutoAcceptSharedAssociations': 'enable'|'disable'
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayId (string) --

    [REQUIRED]

    The ID of the transit gateway.

  • Options (dict) --

    The options for the transit gateway multicast domain.

    • Igmpv2Support (string) --

      Specify whether to enable Internet Group Management Protocol (IGMP) version 2 for the transit gateway multicast domain.

    • StaticSourcesSupport (string) --

      Specify whether to enable support for statically configuring multicast group sources for a domain.

    • AutoAcceptSharedAssociations (string) --

      Indicates whether to automatically accept cross-account subnet associations that are associated with the transit gateway multicast domain.

  • TagSpecifications (list) --

    The tags for the transit gateway multicast domain.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayMulticastDomain': {
        'TransitGatewayMulticastDomainId': 'string',
        'TransitGatewayId': 'string',
        'TransitGatewayMulticastDomainArn': 'string',
        'OwnerId': 'string',
        'Options': {
            'Igmpv2Support': 'enable'|'disable',
            'StaticSourcesSupport': 'enable'|'disable',
            'AutoAcceptSharedAssociations': 'enable'|'disable'
        },
        'State': 'pending'|'available'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayMulticastDomain (dict) --

      Information about the transit gateway multicast domain.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • TransitGatewayMulticastDomainArn (string) --

        The Amazon Resource Name (ARN) of the transit gateway multicast domain.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the transit gateway multicast domain.

      • Options (dict) --

        The options for the transit gateway multicast domain.

        • Igmpv2Support (string) --

          Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.

        • StaticSourcesSupport (string) --

          Indicates whether support for statically configuring transit gateway multicast group sources is turned on.

        • AutoAcceptSharedAssociations (string) --

          Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.

      • State (string) --

        The state of the transit gateway multicast domain.

      • CreationTime (datetime) --

        The time the transit gateway multicast domain was created.

      • Tags (list) --

        The tags for the transit gateway multicast domain.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_peering_attachment(**kwargs)

Requests a transit gateway peering attachment between the specified transit gateway (requester) and a peer transit gateway (accepter). The peer transit gateway can be in your account or a different Amazon Web Services account.

After you create the peering attachment, the owner of the accepter transit gateway must accept the attachment request.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_peering_attachment(
    TransitGatewayId='string',
    PeerTransitGatewayId='string',
    PeerAccountId='string',
    PeerRegion='string',
    Options={
        'DynamicRouting': 'enable'|'disable'
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayId (string) --

    [REQUIRED]

    The ID of the transit gateway.

  • PeerTransitGatewayId (string) --

    [REQUIRED]

    The ID of the peer transit gateway with which to create the peering attachment.

  • PeerAccountId (string) --

    [REQUIRED]

    The ID of the Amazon Web Services account that owns the peer transit gateway.

  • PeerRegion (string) --

    [REQUIRED]

    The Region where the peer transit gateway is located.

  • Options (dict) --

    Requests a transit gateway peering attachment.

    • DynamicRouting (string) --

      Indicates whether dynamic routing is enabled or disabled.

  • TagSpecifications (list) --

    The tags to apply to the transit gateway peering attachment.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPeeringAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'AccepterTransitGatewayAttachmentId': 'string',
        'RequesterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'AccepterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'Options': {
            'DynamicRouting': 'enable'|'disable'
        },
        'Status': {
            'Code': 'string',
            'Message': 'string'
        },
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPeeringAttachment (dict) --

      The transit gateway peering attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway peering attachment.

      • AccepterTransitGatewayAttachmentId (string) --

        The ID of the accepter transit gateway attachment.

      • RequesterTgwInfo (dict) --

        Information about the requester transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • AccepterTgwInfo (dict) --

        Information about the accepter transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • Options (dict) --

        Details about the transit gateway peering attachment.

        • DynamicRouting (string) --

          Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.

      • Status (dict) --

        The status of the transit gateway peering attachment.

        • Code (string) --

          The status code.

        • Message (string) --

          The status message, if applicable.

      • State (string) --

        The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

      • CreationTime (datetime) --

        The time the transit gateway peering attachment was created.

      • Tags (list) --

        The tags for the transit gateway peering attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_policy_table(**kwargs)

Creates a transit gateway policy table.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_policy_table(
    TransitGatewayId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayId (string) --

    [REQUIRED]

    The ID of the transit gateway used for the policy table.

  • TagSpecifications (list) --

    The tags specification for the transit gateway policy table created during the request.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPolicyTable': {
        'TransitGatewayPolicyTableId': 'string',
        'TransitGatewayId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPolicyTable (dict) --

      Describes the created transit gateway policy table.

      • TransitGatewayPolicyTableId (string) --

        The ID of the transit gateway policy table.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • State (string) --

        The state of the transit gateway policy table

      • CreationTime (datetime) --

        The timestamp when the transit gateway policy table was created.

      • Tags (list) --

        he key-value pairs associated with the transit gateway policy table.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_prefix_list_reference(**kwargs)

Creates a reference (route) to a prefix list in a specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_prefix_list_reference(
    TransitGatewayRouteTableId='string',
    PrefixListId='string',
    TransitGatewayAttachmentId='string',
    Blackhole=True|False,
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list that is used for destination matches.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment to which traffic is routed.
  • Blackhole (boolean) -- Indicates whether to drop traffic that matches this route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPrefixListReference': {
        'TransitGatewayRouteTableId': 'string',
        'PrefixListId': 'string',
        'PrefixListOwnerId': 'string',
        'State': 'pending'|'available'|'modifying'|'deleting',
        'Blackhole': True|False,
        'TransitGatewayAttachment': {
            'TransitGatewayAttachmentId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceId': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPrefixListReference (dict) --

      Information about the prefix list reference.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • PrefixListId (string) --

        The ID of the prefix list.

      • PrefixListOwnerId (string) --

        The ID of the prefix list owner.

      • State (string) --

        The state of the prefix list reference.

      • Blackhole (boolean) --

        Indicates whether traffic that matches this route is dropped.

      • TransitGatewayAttachment (dict) --

        Information about the transit gateway attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • ResourceType (string) --

          The resource type. Note that the tgw-peering resource type has been deprecated.

        • ResourceId (string) --

          The ID of the resource.

create_transit_gateway_route(**kwargs)

Creates a static route for the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_route(
    DestinationCidrBlock='string',
    TransitGatewayRouteTableId='string',
    TransitGatewayAttachmentId='string',
    Blackhole=True|False,
    DryRun=True|False
)
Parameters
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR range used for destination matches. Routing decisions are based on the most specific match.

  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment.
  • Blackhole (boolean) -- Indicates whether to drop traffic that matches this route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Route': {
        'DestinationCidrBlock': 'string',
        'PrefixListId': 'string',
        'TransitGatewayRouteTableAnnouncementId': 'string',
        'TransitGatewayAttachments': [
            {
                'ResourceId': 'string',
                'TransitGatewayAttachmentId': 'string',
                'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'
            },
        ],
        'Type': 'static'|'propagated',
        'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted'
    }
}

Response Structure

  • (dict) --

    • Route (dict) --

      Information about the route.

      • DestinationCidrBlock (string) --

        The CIDR block used for destination matches.

      • PrefixListId (string) --

        The ID of the prefix list used for destination matches.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

      • TransitGatewayAttachments (list) --

        The attachments.

        • (dict) --

          Describes a route attachment.

          • ResourceId (string) --

            The ID of the resource.

          • TransitGatewayAttachmentId (string) --

            The ID of the attachment.

          • ResourceType (string) --

            The resource type. Note that the tgw-peering resource type has been deprecated.

      • Type (string) --

        The route type.

      • State (string) --

        The state of the route.

create_transit_gateway_route_table(**kwargs)

Creates a route table for the specified transit gateway.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_route_table(
    TransitGatewayId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayId (string) --

    [REQUIRED]

    The ID of the transit gateway.

  • TagSpecifications (list) --

    The tags to apply to the transit gateway route table.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTable': {
        'TransitGatewayRouteTableId': 'string',
        'TransitGatewayId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'DefaultAssociationRouteTable': True|False,
        'DefaultPropagationRouteTable': True|False,
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayRouteTable (dict) --

      Information about the transit gateway route table.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • State (string) --

        The state of the transit gateway route table.

      • DefaultAssociationRouteTable (boolean) --

        Indicates whether this is the default association route table for the transit gateway.

      • DefaultPropagationRouteTable (boolean) --

        Indicates whether this is the default propagation route table for the transit gateway.

      • CreationTime (datetime) --

        The creation time.

      • Tags (list) --

        Any tags assigned to the route table.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_route_table_announcement(**kwargs)

Advertises a new transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_route_table_announcement(
    TransitGatewayRouteTableId='string',
    PeeringAttachmentId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • PeeringAttachmentId (string) --

    [REQUIRED]

    The ID of the peering attachment.

  • TagSpecifications (list) --

    The tags specifications applied to the transit gateway route table announcement.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTableAnnouncement': {
        'TransitGatewayRouteTableAnnouncementId': 'string',
        'TransitGatewayId': 'string',
        'CoreNetworkId': 'string',
        'PeerTransitGatewayId': 'string',
        'PeerCoreNetworkId': 'string',
        'PeeringAttachmentId': 'string',
        'AnnouncementDirection': 'outgoing'|'incoming',
        'TransitGatewayRouteTableId': 'string',
        'State': 'available'|'pending'|'failing'|'failed'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayRouteTableAnnouncement (dict) --

      Provides details about the transit gateway route table announcement.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • CoreNetworkId (string) --

        The ID of the core network for the transit gateway route table announcement.

      • PeerTransitGatewayId (string) --

        The ID of the peer transit gateway.

      • PeerCoreNetworkId (string) --

        The ID of the core network ID for the peer.

      • PeeringAttachmentId (string) --

        The ID of the peering attachment.

      • AnnouncementDirection (string) --

        The direction for the route table announcement.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • State (string) --

        The state of the transit gateway announcement.

      • CreationTime (datetime) --

        The timestamp when the transit gateway route table announcement was created.

      • Tags (list) --

        The key-value pairs associated with the route table announcement.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_transit_gateway_vpc_attachment(**kwargs)

Attaches the specified VPC to the specified transit gateway.

If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.

To send VPC traffic to an attached transit gateway, add a route to the VPC route table using CreateRoute .

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_vpc_attachment(
    TransitGatewayId='string',
    VpcId='string',
    SubnetIds=[
        'string',
    ],
    Options={
        'DnsSupport': 'enable'|'disable',
        'Ipv6Support': 'enable'|'disable',
        'ApplianceModeSupport': 'enable'|'disable'
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayId (string) --

    [REQUIRED]

    The ID of the transit gateway.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • SubnetIds (list) --

    [REQUIRED]

    The IDs of one or more subnets. You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.

    • (string) --
  • Options (dict) --

    The VPC attachment options.

    • DnsSupport (string) --

      Enable or disable DNS support. The default is enable .

    • Ipv6Support (string) --

      Enable or disable IPv6 support. The default is disable .

    • ApplianceModeSupport (string) --

      Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is disable .

  • TagSpecifications (list) --

    The tags to apply to the VPC attachment.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayVpcAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayId': 'string',
        'VpcId': 'string',
        'VpcOwnerId': 'string',
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'SubnetIds': [
            'string',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'DnsSupport': 'enable'|'disable',
            'Ipv6Support': 'enable'|'disable',
            'ApplianceModeSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayVpcAttachment (dict) --

      Information about the VPC attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • VpcId (string) --

        The ID of the VPC.

      • VpcOwnerId (string) --

        The ID of the Amazon Web Services account that owns the VPC.

      • State (string) --

        The state of the VPC attachment. Note that the initiating state has been deprecated.

      • SubnetIds (list) --

        The IDs of the subnets.

        • (string) --
      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The VPC attachment options.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • Ipv6Support (string) --

          Indicates whether IPv6 support is disabled.

        • ApplianceModeSupport (string) --

          Indicates whether appliance mode support is enabled.

      • Tags (list) --

        The tags for the VPC attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

create_volume(**kwargs)

Creates an EBS volume that can be attached to an instance in the same Availability Zone.

You can create a new empty volume or restore a volume from an EBS snapshot. Any Amazon Web Services Marketplace product codes from the snapshot are propagated to the volume.

You can create encrypted volumes. Encrypted volumes must be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

You can tag your volumes during creation. For more information, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

For more information, see Create an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_volume(
    AvailabilityZone='string',
    Encrypted=True|False,
    Iops=123,
    KmsKeyId='string',
    OutpostArn='string',
    Size=123,
    SnapshotId='string',
    VolumeType='standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    MultiAttachEnabled=True|False,
    Throughput=123,
    ClientToken='string'
)
Parameters
  • AvailabilityZone (string) --

    [REQUIRED]

    The Availability Zone in which to create the volume.

  • Encrypted (boolean) --

    Indicates whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by default in the Amazon Elastic Compute Cloud User Guide .

    Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

  • Iops (integer) --

    The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

    The following are the supported values for each volume type:

    • gp3 : 3,000-16,000 IOPS
    • io1 : 100-64,000 IOPS
    • io2 : 100-64,000 IOPS
    io1 and io2 volumes support up to 64,000 IOPS only on Instances built on the Nitro System . Other instance families support performance up to 32,000 IOPS.

    This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

  • KmsKeyId (string) --

    The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true .

    You can specify the KMS key using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
    • Key alias. For example, alias/ExampleAlias.
    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

  • OutpostArn (string) -- The Amazon Resource Name (ARN) of the Outpost.
  • Size (integer) --

    The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

    The following are the supported volumes sizes for each volume type:

    • gp2 and gp3 : 1-16,384
    • io1 and io2 : 4-16,384
    • st1 and sc1 : 125-16,384
    • standard : 1-1,024
  • SnapshotId (string) -- The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.
  • VolumeType (string) --

    The volume type. This parameter can be one of the following values:

    • General Purpose SSD: gp2 | gp3
    • Provisioned IOPS SSD: io1 | io2
    • Throughput Optimized HDD: st1
    • Cold HDD: sc1
    • Magnetic: standard

    For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide .

    Default: gp2

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to apply to the volume during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • MultiAttachEnabled (boolean) -- Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 Instances built on the Nitro System in the same Availability Zone. This parameter is supported with io1 and io2 volumes only. For more information, see Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User Guide .
  • Throughput (integer) --

    The throughput to provision for a volume, with a maximum of 1,000 MiB/s.

    This parameter is valid only for gp3 volumes.

    Valid Range: Minimum value of 125. Maximum value of 1000.

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'Attachments': [
        {
            'AttachTime': datetime(2015, 1, 1),
            'Device': 'string',
            'InstanceId': 'string',
            'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
            'VolumeId': 'string',
            'DeleteOnTermination': True|False
        },
    ],
    'AvailabilityZone': 'string',
    'CreateTime': datetime(2015, 1, 1),
    'Encrypted': True|False,
    'KmsKeyId': 'string',
    'OutpostArn': 'string',
    'Size': 123,
    'SnapshotId': 'string',
    'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
    'VolumeId': 'string',
    'Iops': 123,
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
    'FastRestored': True|False,
    'MultiAttachEnabled': True|False,
    'Throughput': 123
}

Response Structure

  • (dict) --

    Describes a volume.

    • Attachments (list) --

      Information about the volume attachments.

      • (dict) --

        Describes volume attachment details.

        • AttachTime (datetime) --

          The time stamp when the attachment initiated.

        • Device (string) --

          The device name.

        • InstanceId (string) --

          The ID of the instance.

        • State (string) --

          The attachment state of the volume.

        • VolumeId (string) --

          The ID of the volume.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination.

    • AvailabilityZone (string) --

      The Availability Zone for the volume.

    • CreateTime (datetime) --

      The time stamp when volume creation was initiated.

    • Encrypted (boolean) --

      Indicates whether the volume is encrypted.

    • KmsKeyId (string) --

      The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

    • OutpostArn (string) --

      The Amazon Resource Name (ARN) of the Outpost.

    • Size (integer) --

      The size of the volume, in GiBs.

    • SnapshotId (string) --

      The snapshot from which the volume was created, if applicable.

    • State (string) --

      The volume state.

    • VolumeId (string) --

      The ID of the volume.

    • Iops (integer) --

      The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

    • Tags (list) --

      Any tags assigned to the volume.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

    • VolumeType (string) --

      The volume type.

    • FastRestored (boolean) --

      Indicates whether the volume was created using fast snapshot restore.

    • MultiAttachEnabled (boolean) --

      Indicates whether Amazon EBS Multi-Attach is enabled.

    • Throughput (integer) --

      The throughput that the volume supports, in MiB/s.

Examples

This example creates an 80 GiB General Purpose (SSD) volume in the Availability Zone us-east-1a.

response = client.create_volume(
    AvailabilityZone='us-east-1a',
    Size=80,
    VolumeType='gp2',
)

print(response)

Expected Output:

{
    'AvailabilityZone': 'us-east-1a',
    'CreateTime': datetime(2016, 8, 29, 18, 52, 32, 0, 242, 0),
    'Encrypted': False,
    'Iops': 240,
    'Size': 80,
    'SnapshotId': '',
    'State': 'creating',
    'VolumeId': 'vol-6b60b7c7',
    'VolumeType': 'gp2',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example creates a new Provisioned IOPS (SSD) volume with 1000 provisioned IOPS from a snapshot in the Availability Zone us-east-1a.

response = client.create_volume(
    AvailabilityZone='us-east-1a',
    Iops=1000,
    SnapshotId='snap-066877671789bd71b',
    VolumeType='io1',
)

print(response)

Expected Output:

{
    'Attachments': [
    ],
    'AvailabilityZone': 'us-east-1a',
    'CreateTime': datetime(2016, 8, 29, 18, 52, 32, 0, 242, 0),
    'Iops': 1000,
    'Size': 500,
    'SnapshotId': 'snap-066877671789bd71b',
    'State': 'creating',
    'Tags': [
    ],
    'VolumeId': 'vol-1234567890abcdef0',
    'VolumeType': 'io1',
    'ResponseMetadata': {
        '...': '...',
    },
}
create_vpc(**kwargs)

Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). For more information about how large to make your VPC, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide .

You can optionally request an IPv6 CIDR block for the VPC. You can request an Amazon-provided IPv6 CIDR block from Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP ).

By default, each instance you launch in the VPC has the default DHCP options, which include only a default DNS server that we provide (AmazonProvidedDNS). For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_vpc(
    CidrBlock='string',
    AmazonProvidedIpv6CidrBlock=True|False,
    Ipv6Pool='string',
    Ipv6CidrBlock='string',
    Ipv4IpamPoolId='string',
    Ipv4NetmaskLength=123,
    Ipv6IpamPoolId='string',
    Ipv6NetmaskLength=123,
    DryRun=True|False,
    InstanceTenancy='default'|'dedicated'|'host',
    Ipv6CidrBlockNetworkBorderGroup='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • CidrBlock (string) -- The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16 . We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .
  • AmazonProvidedIpv6CidrBlock (boolean) -- Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.
  • Ipv6Pool (string) -- The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
  • Ipv6CidrBlock (string) --

    The IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

    To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

  • Ipv4IpamPoolId (string) -- The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv4NetmaskLength (integer) -- The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv6IpamPoolId (string) -- The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv6NetmaskLength (integer) -- The netmask length of the IPv6 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTenancy (string) --

    The tenancy options for instances launched into the VPC. For default , instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For dedicated , instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of dedicated or host into a dedicated tenancy VPC.

    Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

    Default: default

  • Ipv6CidrBlockNetworkBorderGroup (string) --

    The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.

    You must set AmazonProvidedIpv6CidrBlock to true to use this parameter.

  • TagSpecifications (list) --

    The tags to assign to the VPC.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'Vpc': {
        'CidrBlock': 'string',
        'DhcpOptionsId': 'string',
        'State': 'pending'|'available',
        'VpcId': 'string',
        'OwnerId': 'string',
        'InstanceTenancy': 'default'|'dedicated'|'host',
        'Ipv6CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                },
                'NetworkBorderGroup': 'string',
                'Ipv6Pool': 'string'
            },
        ],
        'CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'CidrBlock': 'string',
                'CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
        ],
        'IsDefault': True|False,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Vpc (dict) --

      Information about the VPC.

      • CidrBlock (string) --

        The primary IPv4 CIDR block for the VPC.

      • DhcpOptionsId (string) --

        The ID of the set of DHCP options you've associated with the VPC.

      • State (string) --

        The current state of the VPC.

      • VpcId (string) --

        The ID of the VPC.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the VPC.

      • InstanceTenancy (string) --

        The allowed tenancy of instances launched into the VPC.

      • Ipv6CidrBlockAssociationSet (list) --

        Information about the IPv6 CIDR blocks associated with the VPC.

        • (dict) --

          Describes an IPv6 CIDR block associated with a VPC.

          • AssociationId (string) --

            The association ID for the IPv6 CIDR block.

          • Ipv6CidrBlock (string) --

            The IPv6 CIDR block.

          • Ipv6CidrBlockState (dict) --

            Information about the state of the CIDR block.

            • State (string) --

              The state of the CIDR block.

            • StatusMessage (string) --

              A message about the status of the CIDR block, if applicable.

          • NetworkBorderGroup (string) --

            The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1 .

          • Ipv6Pool (string) --

            The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

      • CidrBlockAssociationSet (list) --

        Information about the IPv4 CIDR blocks associated with the VPC.

        • (dict) --

          Describes an IPv4 CIDR block associated with a VPC.

          • AssociationId (string) --

            The association ID for the IPv4 CIDR block.

          • CidrBlock (string) --

            The IPv4 CIDR block.

          • CidrBlockState (dict) --

            Information about the state of the CIDR block.

            • State (string) --

              The state of the CIDR block.

            • StatusMessage (string) --

              A message about the status of the CIDR block, if applicable.

      • IsDefault (boolean) --

        Indicates whether the VPC is the default VPC.

      • Tags (list) --

        Any tags assigned to the VPC.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

Examples

This example creates a VPC with the specified CIDR block.

response = client.create_vpc(
    CidrBlock='10.0.0.0/16',
)

print(response)

Expected Output:

{
    'Vpc': {
        'CidrBlock': '10.0.0.0/16',
        'DhcpOptionsId': 'dopt-7a8b9c2d',
        'InstanceTenancy': 'default',
        'State': 'pending',
        'VpcId': 'vpc-a01106c2',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
create_vpc_endpoint(**kwargs)

Creates a VPC endpoint for a specified service. An endpoint enables you to create a private connection between your VPC and the service. The service may be provided by Amazon Web Services, an Amazon Web Services Marketplace Partner, or another Amazon Web Services account. For more information, see the Amazon Web Services PrivateLink Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_vpc_endpoint(
    DryRun=True|False,
    VpcEndpointType='Interface'|'Gateway'|'GatewayLoadBalancer',
    VpcId='string',
    ServiceName='string',
    PolicyDocument='string',
    RouteTableIds=[
        'string',
    ],
    SubnetIds=[
        'string',
    ],
    SecurityGroupIds=[
        'string',
    ],
    IpAddressType='ipv4'|'dualstack'|'ipv6',
    DnsOptions={
        'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined'
    },
    ClientToken='string',
    PrivateDnsEnabled=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointType (string) --

    The type of endpoint.

    Default: Gateway

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC in which the endpoint will be used.

  • ServiceName (string) --

    [REQUIRED]

    The service name. To get a list of available services, use the DescribeVpcEndpointServices request, or get the name from the service provider.

  • PolicyDocument (string) -- (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format. If this parameter is not specified, we attach a default policy that allows full access to the service.
  • RouteTableIds (list) --

    (Gateway endpoint) One or more route table IDs.

    • (string) --
  • SubnetIds (list) --

    (Interface and Gateway Load Balancer endpoints) The ID of one or more subnets in which to create an endpoint network interface. For a Gateway Load Balancer endpoint, you can specify one subnet only.

    • (string) --
  • SecurityGroupIds (list) --

    (Interface endpoint) The ID of one or more security groups to associate with the endpoint network interface.

    • (string) --
  • IpAddressType (string) -- The IP address type for the endpoint.
  • DnsOptions (dict) --

    The DNS options for the endpoint.

    • DnsRecordIpType (string) --

      The DNS records created for the endpoint.

  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency .
  • PrivateDnsEnabled (boolean) --

    (Interface endpoint) Indicates whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, kinesis.us-east-1.amazonaws.com ), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.

    To use a private hosted zone, you must set the following VPC attributes to true : enableDnsHostnames and enableDnsSupport . Use ModifyVpcAttribute to set the VPC attributes.

    Default: true

  • TagSpecifications (list) --

    The tags to associate with the endpoint.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'VpcEndpoint': {
        'VpcEndpointId': 'string',
        'VpcEndpointType': 'Interface'|'Gateway'|'GatewayLoadBalancer',
        'VpcId': 'string',
        'ServiceName': 'string',
        'State': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired',
        'PolicyDocument': 'string',
        'RouteTableIds': [
            'string',
        ],
        'SubnetIds': [
            'string',
        ],
        'Groups': [
            {
                'GroupId': 'string',
                'GroupName': 'string'
            },
        ],
        'IpAddressType': 'ipv4'|'dualstack'|'ipv6',
        'DnsOptions': {
            'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined'
        },
        'PrivateDnsEnabled': True|False,
        'RequesterManaged': True|False,
        'NetworkInterfaceIds': [
            'string',
        ],
        'DnsEntries': [
            {
                'DnsName': 'string',
                'HostedZoneId': 'string'
            },
        ],
        'CreationTimestamp': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string',
        'LastError': {
            'Message': 'string',
            'Code': 'string'
        }
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of CreateVpcEndpoint.

    • VpcEndpoint (dict) --

      Information about the endpoint.

      • VpcEndpointId (string) --

        The ID of the endpoint.

      • VpcEndpointType (string) --

        The type of endpoint.

      • VpcId (string) --

        The ID of the VPC to which the endpoint is associated.

      • ServiceName (string) --

        The name of the service to which the endpoint is associated.

      • State (string) --

        The state of the endpoint.

      • PolicyDocument (string) --

        The policy document associated with the endpoint, if applicable.

      • RouteTableIds (list) --

        (Gateway endpoint) One or more route tables associated with the endpoint.

        • (string) --
      • SubnetIds (list) --

        (Interface endpoint) The subnets for the endpoint.

        • (string) --
      • Groups (list) --

        (Interface endpoint) Information about the security groups that are associated with the network interface.

        • (dict) --

          Describes a security group.

          • GroupId (string) --

            The ID of the security group.

          • GroupName (string) --

            The name of the security group.

      • IpAddressType (string) --

        The IP address type for the endpoint.

      • DnsOptions (dict) --

        The DNS options for the endpoint.

        • DnsRecordIpType (string) --

          The DNS records created for the endpoint.

      • PrivateDnsEnabled (boolean) --

        (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.

      • RequesterManaged (boolean) --

        Indicates whether the endpoint is being managed by its service.

      • NetworkInterfaceIds (list) --

        (Interface endpoint) One or more network interfaces for the endpoint.

        • (string) --
      • DnsEntries (list) --

        (Interface endpoint) The DNS entries for the endpoint.

        • (dict) --

          Describes a DNS entry.

          • DnsName (string) --

            The DNS name.

          • HostedZoneId (string) --

            The ID of the private hosted zone.

      • CreationTimestamp (datetime) --

        The date and time that the endpoint was created.

      • Tags (list) --

        Any tags assigned to the endpoint.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the endpoint.

      • LastError (dict) --

        The last error that occurred for endpoint.

        • Message (string) --

          The error message for the VPC endpoint error.

        • Code (string) --

          The error code for the VPC endpoint error.

    • ClientToken (string) --

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

create_vpc_endpoint_connection_notification(**kwargs)

Creates a connection notification for a specified VPC endpoint or VPC endpoint service. A connection notification notifies you of specific endpoint events. You must create an SNS topic to receive notifications. For more information, see Create a Topic in the Amazon Simple Notification Service Developer Guide .

You can create a connection notification for interface endpoints only.

See also: AWS API Documentation

Request Syntax

response = client.create_vpc_endpoint_connection_notification(
    DryRun=True|False,
    ServiceId='string',
    VpcEndpointId='string',
    ConnectionNotificationArn='string',
    ConnectionEvents=[
        'string',
    ],
    ClientToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) -- The ID of the endpoint service.
  • VpcEndpointId (string) -- The ID of the endpoint.
  • ConnectionNotificationArn (string) --

    [REQUIRED]

    The ARN of the SNS topic for the notifications.

  • ConnectionEvents (list) --

    [REQUIRED]

    One or more endpoint events for which to receive notifications. Valid values are Accept , Connect , Delete , and Reject .

    • (string) --
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency .
Return type

dict

Returns

Response Syntax

{
    'ConnectionNotification': {
        'ConnectionNotificationId': 'string',
        'ServiceId': 'string',
        'VpcEndpointId': 'string',
        'ConnectionNotificationType': 'Topic',
        'ConnectionNotificationArn': 'string',
        'ConnectionEvents': [
            'string',
        ],
        'ConnectionNotificationState': 'Enabled'|'Disabled'
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • ConnectionNotification (dict) --

      Information about the notification.

      • ConnectionNotificationId (string) --

        The ID of the notification.

      • ServiceId (string) --

        The ID of the endpoint service.

      • VpcEndpointId (string) --

        The ID of the VPC endpoint.

      • ConnectionNotificationType (string) --

        The type of notification.

      • ConnectionNotificationArn (string) --

        The ARN of the SNS topic for the notification.

      • ConnectionEvents (list) --

        The events for the notification. Valid values are Accept , Connect , Delete , and Reject .

        • (string) --
      • ConnectionNotificationState (string) --

        The state of the notification.

    • ClientToken (string) --

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

create_vpc_endpoint_service_configuration(**kwargs)

Creates a VPC endpoint service to which service consumers (Amazon Web Services accounts, IAM users, and IAM roles) can connect.

Before you create an endpoint service, you must create one of the following for your service:

If you set the private DNS name, you must prove that you own the private DNS domain name.

For more information, see the Amazon Web Services PrivateLink Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_vpc_endpoint_service_configuration(
    DryRun=True|False,
    AcceptanceRequired=True|False,
    PrivateDnsName='string',
    NetworkLoadBalancerArns=[
        'string',
    ],
    GatewayLoadBalancerArns=[
        'string',
    ],
    SupportedIpAddressTypes=[
        'string',
    ],
    ClientToken='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • AcceptanceRequired (boolean) -- Indicates whether requests from service consumers to create an endpoint to your service must be accepted manually.
  • PrivateDnsName (string) -- (Interface endpoint configuration) The private DNS name to assign to the VPC endpoint service.
  • NetworkLoadBalancerArns (list) --

    The Amazon Resource Names (ARNs) of one or more Network Load Balancers for your service.

    • (string) --
  • GatewayLoadBalancerArns (list) --

    The Amazon Resource Names (ARNs) of one or more Gateway Load Balancers.

    • (string) --
  • SupportedIpAddressTypes (list) --

    The supported IP address types. The possible values are ipv4 and ipv6 .

    • (string) --
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency .
  • TagSpecifications (list) --

    The tags to associate with the service.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'ServiceConfiguration': {
        'ServiceType': [
            {
                'ServiceType': 'Interface'|'Gateway'|'GatewayLoadBalancer'
            },
        ],
        'ServiceId': 'string',
        'ServiceName': 'string',
        'ServiceState': 'Pending'|'Available'|'Deleting'|'Deleted'|'Failed',
        'AvailabilityZones': [
            'string',
        ],
        'AcceptanceRequired': True|False,
        'ManagesVpcEndpoints': True|False,
        'NetworkLoadBalancerArns': [
            'string',
        ],
        'GatewayLoadBalancerArns': [
            'string',
        ],
        'SupportedIpAddressTypes': [
            'ipv4'|'ipv6',
        ],
        'BaseEndpointDnsNames': [
            'string',
        ],
        'PrivateDnsName': 'string',
        'PrivateDnsNameConfiguration': {
            'State': 'pendingVerification'|'verified'|'failed',
            'Type': 'string',
            'Value': 'string',
            'Name': 'string'
        },
        'PayerResponsibility': 'ServiceOwner',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • ServiceConfiguration (dict) --

      Information about the service configuration.

      • ServiceType (list) --

        The type of service.

        • (dict) --

          Describes the type of service for a VPC endpoint.

          • ServiceType (string) --

            The type of service.

      • ServiceId (string) --

        The ID of the service.

      • ServiceName (string) --

        The name of the service.

      • ServiceState (string) --

        The service state.

      • AvailabilityZones (list) --

        The Availability Zones in which the service is available.

        • (string) --
      • AcceptanceRequired (boolean) --

        Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.

      • ManagesVpcEndpoints (boolean) --

        Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

      • NetworkLoadBalancerArns (list) --

        The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.

        • (string) --
      • GatewayLoadBalancerArns (list) --

        The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

        • (string) --
      • SupportedIpAddressTypes (list) --

        The supported IP address types.

        • (string) --
      • BaseEndpointDnsNames (list) --

        The DNS names for the service.

        • (string) --
      • PrivateDnsName (string) --

        The private DNS name for the service.

      • PrivateDnsNameConfiguration (dict) --

        Information about the endpoint service private DNS name configuration.

        • State (string) --

          The verification state of the VPC endpoint service.

          >Consumers of the endpoint service can use the private name only when the state is verified .

        • Type (string) --

          The endpoint service verification type, for example TXT.

        • Value (string) --

          The value the service provider adds to the private DNS name domain record before verification.

        • Name (string) --

          The name of the record subdomain the service provider needs to create. The service provider adds the value text to the name .

      • PayerResponsibility (string) --

        The payer responsibility.

      • Tags (list) --

        Any tags assigned to the service.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

    • ClientToken (string) --

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

create_vpc_peering_connection(**kwargs)

Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.

Note

Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide .

The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed .

See also: AWS API Documentation

Request Syntax

response = client.create_vpc_peering_connection(
    DryRun=True|False,
    PeerOwnerId='string',
    PeerVpcId='string',
    VpcId='string',
    PeerRegion='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PeerOwnerId (string) --

    The Amazon Web Services account ID of the owner of the accepter VPC.

    Default: Your Amazon Web Services account ID

  • PeerVpcId (string) -- The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
  • VpcId (string) -- The ID of the requester VPC. You must specify this parameter in the request.
  • PeerRegion (string) --

    The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

    Default: The Region in which you make the request.

  • TagSpecifications (list) --

    The tags to assign to the peering connection.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'VpcPeeringConnection': {
        'AccepterVpcInfo': {
            'CidrBlock': 'string',
            'Ipv6CidrBlockSet': [
                {
                    'Ipv6CidrBlock': 'string'
                },
            ],
            'CidrBlockSet': [
                {
                    'CidrBlock': 'string'
                },
            ],
            'OwnerId': 'string',
            'PeeringOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            },
            'VpcId': 'string',
            'Region': 'string'
        },
        'ExpirationTime': datetime(2015, 1, 1),
        'RequesterVpcInfo': {
            'CidrBlock': 'string',
            'Ipv6CidrBlockSet': [
                {
                    'Ipv6CidrBlock': 'string'
                },
            ],
            'CidrBlockSet': [
                {
                    'CidrBlock': 'string'
                },
            ],
            'OwnerId': 'string',
            'PeeringOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            },
            'VpcId': 'string',
            'Region': 'string'
        },
        'Status': {
            'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
            'Message': 'string'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VpcPeeringConnectionId': 'string'
    }
}

Response Structure

  • (dict) --

    • VpcPeeringConnection (dict) --

      Information about the VPC peering connection.

      • AccepterVpcInfo (dict) --

        Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

        • CidrBlock (string) --

          The IPv4 CIDR block for the VPC.

        • Ipv6CidrBlockSet (list) --

          The IPv6 CIDR block for the VPC.

          • (dict) --

            Describes an IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

        • CidrBlockSet (list) --

          Information about the IPv4 CIDR blocks for the VPC.

          • (dict) --

            Describes an IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • PeeringOptions (dict) --

          Information about the VPC peering connection options for the accepter or requester VPC.

          • AllowDnsResolutionFromRemoteVpc (boolean) --

            Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

            Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

            Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

        • VpcId (string) --

          The ID of the VPC.

        • Region (string) --

          The Region in which the VPC is located.

      • ExpirationTime (datetime) --

        The time that an unaccepted VPC peering connection will expire.

      • RequesterVpcInfo (dict) --

        Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

        • CidrBlock (string) --

          The IPv4 CIDR block for the VPC.

        • Ipv6CidrBlockSet (list) --

          The IPv6 CIDR block for the VPC.

          • (dict) --

            Describes an IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

        • CidrBlockSet (list) --

          Information about the IPv4 CIDR blocks for the VPC.

          • (dict) --

            Describes an IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • PeeringOptions (dict) --

          Information about the VPC peering connection options for the accepter or requester VPC.

          • AllowDnsResolutionFromRemoteVpc (boolean) --

            Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

            Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

            Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

        • VpcId (string) --

          The ID of the VPC.

        • Region (string) --

          The Region in which the VPC is located.

      • Status (dict) --

        The status of the VPC peering connection.

        • Code (string) --

          The status of the VPC peering connection.

        • Message (string) --

          A message that provides more information about the status, if applicable.

      • 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 256 Unicode characters.

      • VpcPeeringConnectionId (string) --

        The ID of the VPC peering connection.

create_vpn_connection(**kwargs)

Creates a VPN connection between an existing virtual private gateway or transit gateway and a customer gateway. The supported connection type is ipsec.1 .

The response includes information that you need to give to your network administrator to configure your customer gateway.

Warning

We strongly recommend that you use HTTPS when calling this operation because the response contains sensitive cryptographic information for configuring your customer gateway device.

If you decide to shut down your VPN connection for any reason and later create a new VPN connection, you must reconfigure your customer gateway with the new information returned from this call.

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_vpn_connection(
    CustomerGatewayId='string',
    Type='string',
    VpnGatewayId='string',
    TransitGatewayId='string',
    DryRun=True|False,
    Options={
        'EnableAcceleration': True|False,
        'StaticRoutesOnly': True|False,
        'TunnelInsideIpVersion': 'ipv4'|'ipv6',
        'TunnelOptions': [
            {
                'TunnelInsideCidr': 'string',
                'TunnelInsideIpv6Cidr': 'string',
                'PreSharedKey': 'string',
                'Phase1LifetimeSeconds': 123,
                'Phase2LifetimeSeconds': 123,
                'RekeyMarginTimeSeconds': 123,
                'RekeyFuzzPercentage': 123,
                'ReplayWindowSize': 123,
                'DPDTimeoutSeconds': 123,
                'DPDTimeoutAction': 'string',
                'Phase1EncryptionAlgorithms': [
                    {
                        'Value': 'string'
                    },
                ],
                'Phase2EncryptionAlgorithms': [
                    {
                        'Value': 'string'
                    },
                ],
                'Phase1IntegrityAlgorithms': [
                    {
                        'Value': 'string'
                    },
                ],
                'Phase2IntegrityAlgorithms': [
                    {
                        'Value': 'string'
                    },
                ],
                'Phase1DHGroupNumbers': [
                    {
                        'Value': 123
                    },
                ],
                'Phase2DHGroupNumbers': [
                    {
                        'Value': 123
                    },
                ],
                'IKEVersions': [
                    {
                        'Value': 'string'
                    },
                ],
                'StartupAction': 'string'
            },
        ],
        'LocalIpv4NetworkCidr': 'string',
        'RemoteIpv4NetworkCidr': 'string',
        'LocalIpv6NetworkCidr': 'string',
        'RemoteIpv6NetworkCidr': 'string',
        'OutsideIpAddressType': 'string',
        'TransportTransitGatewayAttachmentId': 'string'
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • CustomerGatewayId (string) --

    [REQUIRED]

    The ID of the customer gateway.

  • Type (string) --

    [REQUIRED]

    The type of VPN connection (ipsec.1 ).

  • VpnGatewayId (string) -- The ID of the virtual private gateway. If you specify a virtual private gateway, you cannot specify a transit gateway.
  • TransitGatewayId (string) -- The ID of the transit gateway. If you specify a transit gateway, you cannot specify a virtual private gateway.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Options (dict) --

    The options for the VPN connection.

    • EnableAcceleration (boolean) --

      Indicate whether to enable acceleration for the VPN connection.

      Default: false

    • StaticRoutesOnly (boolean) --

      Indicate whether the VPN connection uses static routes only. If you are creating a VPN connection for a device that does not support BGP, you must specify true . Use CreateVpnConnectionRoute to create a static route.

      Default: false

    • TunnelInsideIpVersion (string) --

      Indicate whether the VPN tunnels process IPv4 or IPv6 traffic.

      Default: ipv4

    • TunnelOptions (list) --

      The tunnel options for the VPN connection.

      • (dict) --

        The tunnel options for a single VPN tunnel.

        • TunnelInsideCidr (string) --

          The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.

          Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following CIDR blocks are reserved and cannot be used:

          • 169.254.0.0/30
          • 169.254.1.0/30
          • 169.254.2.0/30
          • 169.254.3.0/30
          • 169.254.4.0/30
          • 169.254.5.0/30
          • 169.254.169.252/30
        • TunnelInsideIpv6Cidr (string) --

          The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.

          Constraints: A size /126 CIDR block from the local fd00::/8 range.

        • PreSharedKey (string) --

          The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.

          Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).

        • Phase1LifetimeSeconds (integer) --

          The lifetime for phase 1 of the IKE negotiation, in seconds.

          Constraints: A value between 900 and 28,800.

          Default: 28800

        • Phase2LifetimeSeconds (integer) --

          The lifetime for phase 2 of the IKE negotiation, in seconds.

          Constraints: A value between 900 and 3,600. The value must be less than the value for Phase1LifetimeSeconds .

          Default: 3600

        • RekeyMarginTimeSeconds (integer) --

          The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for RekeyFuzzPercentage .

          Constraints: A value between 60 and half of Phase2LifetimeSeconds .

          Default: 540

        • RekeyFuzzPercentage (integer) --

          The percentage of the rekey window (determined by RekeyMarginTimeSeconds ) during which the rekey time is randomly selected.

          Constraints: A value between 0 and 100.

          Default: 100

        • ReplayWindowSize (integer) --

          The number of packets in an IKE replay window.

          Constraints: A value between 64 and 2048.

          Default: 1024

        • DPDTimeoutSeconds (integer) --

          The number of seconds after which a DPD timeout occurs.

          Constraints: A value greater than or equal to 30.

          Default: 30

        • DPDTimeoutAction (string) --

          The action to take after DPD timeout occurs. Specify restart to restart the IKE initiation. Specify clear to end the IKE session.

          Valid Values: clear | none | restart

          Default: clear

        • Phase1EncryptionAlgorithms (list) --

          One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

          Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

          • (dict) --

            Specifies the encryption algorithm for the VPN tunnel for phase 1 IKE negotiations.

            • Value (string) --

              The value for the encryption algorithm.

        • Phase2EncryptionAlgorithms (list) --

          One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

          Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

          • (dict) --

            Specifies the encryption algorithm for the VPN tunnel for phase 2 IKE negotiations.

            • Value (string) --

              The encryption algorithm.

        • Phase1IntegrityAlgorithms (list) --

          One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

          Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

          • (dict) --

            Specifies the integrity algorithm for the VPN tunnel for phase 1 IKE negotiations.

            • Value (string) --

              The value for the integrity algorithm.

        • Phase2IntegrityAlgorithms (list) --

          One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

          Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

          • (dict) --

            Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE negotiations.

            • Value (string) --

              The integrity algorithm.

        • Phase1DHGroupNumbers (list) --

          One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.

          Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

          • (dict) --

            Specifies a Diffie-Hellman group number for the VPN tunnel for phase 1 IKE negotiations.

            • Value (integer) --

              The Diffie-Hellmann group number.

        • Phase2DHGroupNumbers (list) --

          One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.

          Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

          • (dict) --

            Specifies a Diffie-Hellman group number for the VPN tunnel for phase 2 IKE negotiations.

            • Value (integer) --

              The Diffie-Hellmann group number.

        • IKEVersions (list) --

          The IKE versions that are permitted for the VPN tunnel.

          Valid values: ikev1 | ikev2

          • (dict) --

            The IKE version that is permitted for the VPN tunnel.

            • Value (string) --

              The IKE version.

        • StartupAction (string) --

          The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for Amazon Web Services to initiate the IKE negotiation.

          Valid Values: add | start

          Default: add

    • LocalIpv4NetworkCidr (string) --

      The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

      Default: 0.0.0.0/0

    • RemoteIpv4NetworkCidr (string) --

      The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

      Default: 0.0.0.0/0

    • LocalIpv6NetworkCidr (string) --

      The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

      Default: ::/0

    • RemoteIpv6NetworkCidr (string) --

      The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

      Default: ::/0

    • OutsideIpAddressType (string) --

      The type of IPv4 address assigned to the outside interface of the customer gateway device.

      Valid values: PrivateIpv4 | PublicIpv4

      Default: PublicIpv4

    • TransportTransitGatewayAttachmentId (string) --

      The transit gateway attachment ID to use for the VPN tunnel.

      Required if OutsideIpAddressType is set to PrivateIpv4 .

  • TagSpecifications (list) --

    The tags to apply to the VPN connection.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'VpnConnection': {
        'CustomerGatewayConfiguration': 'string',
        'CustomerGatewayId': 'string',
        'Category': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'Type': 'ipsec.1',
        'VpnConnectionId': 'string',
        'VpnGatewayId': 'string',
        'TransitGatewayId': 'string',
        'CoreNetworkArn': 'string',
        'CoreNetworkAttachmentArn': 'string',
        'GatewayAssociationState': 'associated'|'not-associated'|'associating'|'disassociating',
        'Options': {
            'EnableAcceleration': True|False,
            'StaticRoutesOnly': True|False,
            'LocalIpv4NetworkCidr': 'string',
            'RemoteIpv4NetworkCidr': 'string',
            'LocalIpv6NetworkCidr': 'string',
            'RemoteIpv6NetworkCidr': 'string',
            'OutsideIpAddressType': 'string',
            'TransportTransitGatewayAttachmentId': 'string',
            'TunnelInsideIpVersion': 'ipv4'|'ipv6',
            'TunnelOptions': [
                {
                    'OutsideIpAddress': 'string',
                    'TunnelInsideCidr': 'string',
                    'TunnelInsideIpv6Cidr': 'string',
                    'PreSharedKey': 'string',
                    'Phase1LifetimeSeconds': 123,
                    'Phase2LifetimeSeconds': 123,
                    'RekeyMarginTimeSeconds': 123,
                    'RekeyFuzzPercentage': 123,
                    'ReplayWindowSize': 123,
                    'DpdTimeoutSeconds': 123,
                    'DpdTimeoutAction': 'string',
                    'Phase1EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'Phase2DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'IkeVersions': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'StartupAction': 'string'
                },
            ]
        },
        'Routes': [
            {
                'DestinationCidrBlock': 'string',
                'Source': 'Static',
                'State': 'pending'|'available'|'deleting'|'deleted'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VgwTelemetry': [
            {
                'AcceptedRouteCount': 123,
                'LastStatusChange': datetime(2015, 1, 1),
                'OutsideIpAddress': 'string',
                'Status': 'UP'|'DOWN',
                'StatusMessage': 'string',
                'CertificateArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Contains the output of CreateVpnConnection.

    • VpnConnection (dict) --

      Information about the VPN connection.

      • CustomerGatewayConfiguration (string) --

        The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.

      • CustomerGatewayId (string) --

        The ID of the customer gateway at your end of the VPN connection.

      • Category (string) --

        The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

      • State (string) --

        The current state of the VPN connection.

      • Type (string) --

        The type of VPN connection.

      • VpnConnectionId (string) --

        The ID of the VPN connection.

      • VpnGatewayId (string) --

        The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

      • TransitGatewayId (string) --

        The ID of the transit gateway associated with the VPN connection.

      • CoreNetworkArn (string) --

        The ARN of the core network.

      • CoreNetworkAttachmentArn (string) --

        The ARN of the core network attachment.

      • GatewayAssociationState (string) --

        The current state of the gateway association.

      • Options (dict) --

        The VPN connection options.

        • EnableAcceleration (boolean) --

          Indicates whether acceleration is enabled for the VPN connection.

        • StaticRoutesOnly (boolean) --

          Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

        • LocalIpv4NetworkCidr (string) --

          The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv4NetworkCidr (string) --

          The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

        • LocalIpv6NetworkCidr (string) --

          The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv6NetworkCidr (string) --

          The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

        • OutsideIpAddressType (string) --

          The type of IPv4 address assigned to the outside interface of the customer gateway.

          Valid values: PrivateIpv4 | PublicIpv4

          Default: PublicIpv4

        • TransportTransitGatewayAttachmentId (string) --

          The transit gateway attachment ID in use for the VPN tunnel.

        • TunnelInsideIpVersion (string) --

          Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

        • TunnelOptions (list) --

          Indicates the VPN tunnel options.

          • (dict) --

            The VPN tunnel options.

            • OutsideIpAddress (string) --

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr (string) --

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr (string) --

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey (string) --

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds (integer) --

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds (integer) --

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds (integer) --

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage (integer) --

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize (integer) --

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds (integer) --

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction (string) --

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The encryption algorithm.

            • Phase1IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The integrity algorithm.

            • Phase1DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 1 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 2 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • IkeVersions (list) --

              The IKE versions that are permitted for the VPN tunnel.

              • (dict) --

                The internet key exchange (IKE) version permitted for the VPN tunnel.

                • Value (string) --

                  The IKE version.

            • StartupAction (string) --

              The action to take when the establishing the VPN tunnels for a VPN connection.

      • Routes (list) --

        The static routes associated with the VPN connection.

        • (dict) --

          Describes a static route for a VPN connection.

          • DestinationCidrBlock (string) --

            The CIDR block associated with the local subnet of the customer data center.

          • Source (string) --

            Indicates how the routes were provided.

          • State (string) --

            The current state of the static route.

      • Tags (list) --

        Any tags assigned to the VPN connection.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • VgwTelemetry (list) --

        Information about the VPN tunnel.

        • (dict) --

          Describes telemetry for a VPN tunnel.

          • AcceptedRouteCount (integer) --

            The number of accepted routes.

          • LastStatusChange (datetime) --

            The date and time of the last change in status.

          • OutsideIpAddress (string) --

            The Internet-routable IP address of the virtual private gateway's outside interface.

          • Status (string) --

            The status of the VPN tunnel.

          • StatusMessage (string) --

            If an error occurs, a description of the error.

          • CertificateArn (string) --

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

create_vpn_connection_route(**kwargs)

Creates a static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_vpn_connection_route(
    DestinationCidrBlock='string',
    VpnConnectionId='string'
)
Parameters
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR block associated with the local subnet of the customer network.

  • VpnConnectionId (string) --

    [REQUIRED]

    The ID of the VPN connection.

Returns

None

create_vpn_gateway(**kwargs)

Creates a virtual private gateway. A virtual private gateway is the endpoint on the VPC side of your VPN connection. You can create a virtual private gateway before creating the VPC itself.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_vpn_gateway(
    AvailabilityZone='string',
    Type='ipsec.1',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    AmazonSideAsn=123,
    DryRun=True|False
)
Parameters
  • AvailabilityZone (string) -- The Availability Zone for the virtual private gateway.
  • Type (string) --

    [REQUIRED]

    The type of VPN connection this virtual private gateway supports.

  • TagSpecifications (list) --

    The tags to apply to the virtual private gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • AmazonSideAsn (integer) --

    A private Autonomous System Number (ASN) for the Amazon side of a BGP session. If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If you're using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range.

    Default: 64512

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnGateway': {
        'AvailabilityZone': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'Type': 'ipsec.1',
        'VpcAttachments': [
            {
                'State': 'attaching'|'attached'|'detaching'|'detached',
                'VpcId': 'string'
            },
        ],
        'VpnGatewayId': 'string',
        'AmazonSideAsn': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    Contains the output of CreateVpnGateway.

    • VpnGateway (dict) --

      Information about the virtual private gateway.

      • AvailabilityZone (string) --

        The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.

      • State (string) --

        The current state of the virtual private gateway.

      • Type (string) --

        The type of VPN connection the virtual private gateway supports.

      • VpcAttachments (list) --

        Any VPCs attached to the virtual private gateway.

        • (dict) --

          Describes an attachment between a virtual private gateway and a VPC.

          • State (string) --

            The current state of the attachment.

          • VpcId (string) --

            The ID of the VPC.

      • VpnGatewayId (string) --

        The ID of the virtual private gateway.

      • AmazonSideAsn (integer) --

        The private Autonomous System Number (ASN) for the Amazon side of a BGP session.

      • Tags (list) --

        Any tags assigned to the virtual private gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_carrier_gateway(**kwargs)

Deletes a carrier gateway.

Warning

If you do not delete the route that contains the carrier gateway as the Target, the route is a blackhole route. For information about how to delete a route, see DeleteRoute .

See also: AWS API Documentation

Request Syntax

response = client.delete_carrier_gateway(
    CarrierGatewayId='string',
    DryRun=True|False
)
Parameters
  • CarrierGatewayId (string) --

    [REQUIRED]

    The ID of the carrier gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CarrierGateway': {
        'CarrierGatewayId': 'string',
        'VpcId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'OwnerId': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • CarrierGateway (dict) --

      Information about the carrier gateway.

      • CarrierGatewayId (string) --

        The ID of the carrier gateway.

      • VpcId (string) --

        The ID of the VPC associated with the carrier gateway.

      • State (string) --

        The state of the carrier gateway.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the carrier gateway.

      • Tags (list) --

        The tags assigned to the carrier gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_client_vpn_endpoint(**kwargs)

Deletes the specified Client VPN endpoint. You must disassociate all target networks before you can delete a Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.delete_client_vpn_endpoint(
    ClientVpnEndpointId='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN to be deleted.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Status': {
        'Code': 'pending-associate'|'available'|'deleting'|'deleted',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • Status (dict) --

      The current state of the Client VPN endpoint.

      • Code (string) --

        The state of the Client VPN endpoint. Possible states include:

        • pending-associate - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.
        • available - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.
        • deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.
        • deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.
      • Message (string) --

        A message about the status of the Client VPN endpoint.

delete_client_vpn_route(**kwargs)

Deletes a route from a Client VPN endpoint. You can only delete routes that you manually added using the CreateClientVpnRoute action. You cannot delete routes that were automatically added when associating a subnet. To remove routes that have been automatically added, disassociate the target subnet from the Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.delete_client_vpn_route(
    ClientVpnEndpointId='string',
    TargetVpcSubnetId='string',
    DestinationCidrBlock='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint from which the route is to be deleted.

  • TargetVpcSubnetId (string) -- The ID of the target subnet used by the route.
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The IPv4 address range, in CIDR notation, of the route to be deleted.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Status': {
        'Code': 'creating'|'active'|'failed'|'deleting',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • Status (dict) --

      The current state of the route.

      • Code (string) --

        The state of the Client VPN endpoint route.

      • Message (string) --

        A message about the status of the Client VPN endpoint route, if applicable.

delete_customer_gateway(**kwargs)

Deletes the specified customer gateway. You must delete the VPN connection before you can delete the customer gateway.

See also: AWS API Documentation

Request Syntax

response = client.delete_customer_gateway(
    CustomerGatewayId='string',
    DryRun=True|False
)
Parameters
  • CustomerGatewayId (string) --

    [REQUIRED]

    The ID of the customer gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes the specified customer gateway.

response = client.delete_customer_gateway(
    CustomerGatewayId='cgw-0e11f167',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_dhcp_options(**kwargs)

Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.

See also: AWS API Documentation

Request Syntax

response = client.delete_dhcp_options(
    DhcpOptionsId='string',
    DryRun=True|False
)
Parameters
  • DhcpOptionsId (string) --

    [REQUIRED]

    The ID of the DHCP options set.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes the specified DHCP options set.

response = client.delete_dhcp_options(
    DhcpOptionsId='dopt-d9070ebb',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_egress_only_internet_gateway(**kwargs)

Deletes an egress-only internet gateway.

See also: AWS API Documentation

Request Syntax

response = client.delete_egress_only_internet_gateway(
    DryRun=True|False,
    EgressOnlyInternetGatewayId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EgressOnlyInternetGatewayId (string) --

    [REQUIRED]

    The ID of the egress-only internet gateway.

Return type

dict

Returns

Response Syntax

{
    'ReturnCode': True|False
}

Response Structure

  • (dict) --

    • ReturnCode (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

delete_fleets(**kwargs)

Deletes the specified EC2 Fleet.

After you delete an EC2 Fleet, it launches no new instances.

You must specify whether a deleted EC2 Fleet should also terminate its instances. If you choose to terminate the instances, the EC2 Fleet enters the deleted_terminating state. Otherwise, the EC2 Fleet enters the deleted_running state, and the instances continue to run until they are interrupted or you terminate them manually.

For instant fleets, EC2 Fleet must terminate the instances when the fleet is deleted. A deleted instant fleet with running instances is not supported.

Restrictions
  • You can delete up to 25 instant fleets in a single request. If you exceed this number, no instant fleets are deleted and an error is returned. There is no restriction on the number of fleets of type maintain or request that can be deleted in a single request.
  • Up to 1000 instances can be terminated in a single request to delete instant fleets.

For more information, see Delete an EC2 Fleet in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_fleets(
    DryRun=True|False,
    FleetIds=[
        'string',
    ],
    TerminateInstances=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FleetIds (list) --

    [REQUIRED]

    The IDs of the EC2 Fleets.

    • (string) --
  • TerminateInstances (boolean) --

    [REQUIRED]

    Indicates whether to terminate the instances when the EC2 Fleet is deleted. The default is to terminate the instances.

    To let the instances continue to run after the EC2 Fleet is deleted, specify NoTerminateInstances . Supported only for fleets of type maintain and request .

    For instant fleets, you cannot specify NoTerminateInstances . A deleted instant fleet with running instances is not supported.

Return type

dict

Returns

Response Syntax

{
    'SuccessfulFleetDeletions': [
        {
            'CurrentFleetState': 'submitted'|'active'|'deleted'|'failed'|'deleted_running'|'deleted_terminating'|'modifying',
            'PreviousFleetState': 'submitted'|'active'|'deleted'|'failed'|'deleted_running'|'deleted_terminating'|'modifying',
            'FleetId': 'string'
        },
    ],
    'UnsuccessfulFleetDeletions': [
        {
            'Error': {
                'Code': 'fleetIdDoesNotExist'|'fleetIdMalformed'|'fleetNotInDeletableState'|'unexpectedError',
                'Message': 'string'
            },
            'FleetId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfulFleetDeletions (list) --

      Information about the EC2 Fleets that are successfully deleted.

      • (dict) --

        Describes an EC2 Fleet that was successfully deleted.

        • CurrentFleetState (string) --

          The current state of the EC2 Fleet.

        • PreviousFleetState (string) --

          The previous state of the EC2 Fleet.

        • FleetId (string) --

          The ID of the EC2 Fleet.

    • UnsuccessfulFleetDeletions (list) --

      Information about the EC2 Fleets that are not successfully deleted.

      • (dict) --

        Describes an EC2 Fleet that was not successfully deleted.

        • Error (dict) --

          The error.

          • Code (string) --

            The error code.

          • Message (string) --

            The description for the error code.

        • FleetId (string) --

          The ID of the EC2 Fleet.

delete_flow_logs(**kwargs)

Deletes one or more flow logs.

See also: AWS API Documentation

Request Syntax

response = client.delete_flow_logs(
    DryRun=True|False,
    FlowLogIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FlowLogIds (list) --

    [REQUIRED]

    One or more flow log IDs.

    Constraint: Maximum of 1000 flow log IDs.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Unsuccessful (list) --

      Information about the flow logs that could not be deleted successfully.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

delete_fpga_image(**kwargs)

Deletes the specified Amazon FPGA Image (AFI).

See also: AWS API Documentation

Request Syntax

response = client.delete_fpga_image(
    DryRun=True|False,
    FpgaImageId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FpgaImageId (string) --

    [REQUIRED]

    The ID of the AFI.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Is true if the request succeeds, and an error otherwise.

delete_instance_event_window(**kwargs)

Deletes the specified event window.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_instance_event_window(
    DryRun=True|False,
    ForceDelete=True|False,
    InstanceEventWindowId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ForceDelete (boolean) -- Specify true to force delete the event window. Use the force delete parameter if the event window is currently associated with targets.
  • InstanceEventWindowId (string) --

    [REQUIRED]

    The ID of the event window.

Return type

dict

Returns

Response Syntax

{
    'InstanceEventWindowState': {
        'InstanceEventWindowId': 'string',
        'State': 'creating'|'deleting'|'active'|'deleted'
    }
}

Response Structure

  • (dict) --

    • InstanceEventWindowState (dict) --

      The state of the event window.

      • InstanceEventWindowId (string) --

        The ID of the event window.

      • State (string) --

        The current state of the event window.

delete_internet_gateway(**kwargs)

Deletes the specified internet gateway. You must detach the internet gateway from the VPC before you can delete it.

See also: AWS API Documentation

Request Syntax

response = client.delete_internet_gateway(
    DryRun=True|False,
    InternetGatewayId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayId (string) --

    [REQUIRED]

    The ID of the internet gateway.

Returns

None

Examples

This example deletes the specified Internet gateway.

response = client.delete_internet_gateway(
    InternetGatewayId='igw-c0a643a9',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_ipam(**kwargs)

Delete an IPAM. Deleting an IPAM removes all monitored data associated with the IPAM including the historical data for CIDRs.

For more information, see Delete an IPAM in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_ipam(
    DryRun=True|False,
    IpamId='string',
    Cascade=True|False
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamId (string) --

    [REQUIRED]

    The ID of the IPAM to delete.

  • Cascade (boolean) --

    Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. You cannot delete the IPAM with this option if there is a pool in your public scope. If you use this option, IPAM does the following:

    • Deallocates any CIDRs allocated to VPC resources (such as VPCs) in pools in private scopes.

    Note

    No VPC resources are deleted as a result of enabling this option. The CIDR associated with the resource will no longer be allocated from an IPAM pool, but the CIDR itself will remain unchanged.

    • Deprovisions all IPv4 CIDRs provisioned to IPAM pools in private scopes.
    • Deletes all IPAM pools in private scopes.
    • Deletes all non-default private scopes in the IPAM.
    • Deletes the default public and private scopes and the IPAM.
Return type

dict

Returns

Response Syntax

{
    'Ipam': {
        'OwnerId': 'string',
        'IpamId': 'string',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'PublicDefaultScopeId': 'string',
        'PrivateDefaultScopeId': 'string',
        'ScopeCount': 123,
        'Description': 'string',
        'OperatingRegions': [
            {
                'RegionName': 'string'
            },
        ],
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Ipam (dict) --

      Information about the results of the deletion.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the IPAM.

      • IpamId (string) --

        The ID of the IPAM.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM.

      • PublicDefaultScopeId (string) --

        The ID of the IPAM's default public scope.

      • PrivateDefaultScopeId (string) --

        The ID of the IPAM's default private scope.

      • ScopeCount (integer) --

        The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

      • Description (string) --

        The description for the IPAM.

      • OperatingRegions (list) --

        The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

        For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

        • (dict) --

          The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

          For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

          • RegionName (string) --

            The name of the operating Region.

      • State (string) --

        The state of the IPAM.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_ipam_pool(**kwargs)

Delete an IPAM pool.

Note

You cannot delete an IPAM pool if there are allocations in it or CIDRs provisioned to it. To release allocations, see ReleaseIpamPoolAllocation . To deprovision pool CIDRs, see DeprovisionIpamPoolCidr .

For more information, see Delete a pool in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_ipam_pool(
    DryRun=True|False,
    IpamPoolId='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the pool to delete.

Return type

dict

Returns

Response Syntax

{
    'IpamPool': {
        'OwnerId': 'string',
        'IpamPoolId': 'string',
        'SourceIpamPoolId': 'string',
        'IpamPoolArn': 'string',
        'IpamScopeArn': 'string',
        'IpamScopeType': 'public'|'private',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'Locale': 'string',
        'PoolDepth': 123,
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'StateMessage': 'string',
        'Description': 'string',
        'AutoImport': True|False,
        'PubliclyAdvertisable': True|False,
        'AddressFamily': 'ipv4'|'ipv6',
        'AllocationMinNetmaskLength': 123,
        'AllocationMaxNetmaskLength': 123,
        'AllocationDefaultNetmaskLength': 123,
        'AllocationResourceTags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'AwsService': 'ec2'
    }
}

Response Structure

  • (dict) --

    • IpamPool (dict) --

      Information about the results of the deletion.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the IPAM pool.

      • IpamPoolId (string) --

        The ID of the IPAM pool.

      • SourceIpamPoolId (string) --

        The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.

      • IpamPoolArn (string) --

        The ARN of the IPAM pool.

      • IpamScopeArn (string) --

        The ARN of the scope of the IPAM pool.

      • IpamScopeType (string) --

        In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM pool.

      • Locale (string) --

        The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.

      • PoolDepth (integer) --

        The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

      • State (string) --

        The state of the IPAM pool.

      • StateMessage (string) --

        A message related to the failed creation of an IPAM pool.

      • Description (string) --

        The description of the IPAM pool.

      • AutoImport (boolean) --

        If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

        A locale must be set on the pool for this feature to work.

      • PubliclyAdvertisable (boolean) --

        Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to ipv4 .

      • AddressFamily (string) --

        The address family of the pool.

      • AllocationMinNetmaskLength (integer) --

        The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

      • AllocationMaxNetmaskLength (integer) --

        The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

      • AllocationDefaultNetmaskLength (integer) --

        The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.

      • AllocationResourceTags (list) --

        Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.

        • (dict) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • Key (string) --

            The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

          • Value (string) --

            The value of the tag.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • AwsService (string) --

        Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.

delete_ipam_scope(**kwargs)

Delete the scope for an IPAM. You cannot delete the default scopes.

For more information, see Delete a scope in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_ipam_scope(
    DryRun=True|False,
    IpamScopeId='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamScopeId (string) --

    [REQUIRED]

    The ID of the scope to delete.

Return type

dict

Returns

Response Syntax

{
    'IpamScope': {
        'OwnerId': 'string',
        'IpamScopeId': 'string',
        'IpamScopeArn': 'string',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'IpamScopeType': 'public'|'private',
        'IsDefault': True|False,
        'Description': 'string',
        'PoolCount': 123,
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • IpamScope (dict) --

      Information about the results of the deletion.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the scope.

      • IpamScopeId (string) --

        The ID of the scope.

      • IpamScopeArn (string) --

        The ARN of the scope.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM scope.

      • IpamScopeType (string) --

        The type of the scope.

      • IsDefault (boolean) --

        Defines if the scope is the default scope or not.

      • Description (string) --

        The description of the scope.

      • PoolCount (integer) --

        The number of pools in the scope.

      • State (string) --

        The state of the IPAM scope.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_key_pair(**kwargs)

Deletes the specified key pair, by removing the public key from Amazon EC2.

See also: AWS API Documentation

Request Syntax

response = client.delete_key_pair(
    KeyName='string',
    KeyPairId='string',
    DryRun=True|False
)
Parameters
  • KeyName (string) -- The name of the key pair.
  • KeyPairId (string) -- The ID of the key pair.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes the specified key pair.

response = client.delete_key_pair(
    KeyName='my-key-pair',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_launch_template(**kwargs)

Deletes a launch template. Deleting a launch template deletes all of its versions.

See also: AWS API Documentation

Request Syntax

response = client.delete_launch_template(
    DryRun=True|False,
    LaunchTemplateId='string',
    LaunchTemplateName='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LaunchTemplateId (string) --

    The ID of the launch template.

    You must specify either the LaunchTemplateId or the LaunchTemplateName , but not both.

  • LaunchTemplateName (string) --

    The name of the launch template.

    You must specify either the LaunchTemplateName or the LaunchTemplateId , but not both.

Return type

dict

Returns

Response Syntax

{
    'LaunchTemplate': {
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'CreateTime': datetime(2015, 1, 1),
        'CreatedBy': 'string',
        'DefaultVersionNumber': 123,
        'LatestVersionNumber': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LaunchTemplate (dict) --

      Information about the launch template.

      • LaunchTemplateId (string) --

        The ID of the launch template.

      • LaunchTemplateName (string) --

        The name of the launch template.

      • CreateTime (datetime) --

        The time launch template was created.

      • CreatedBy (string) --

        The principal that created the launch template.

      • DefaultVersionNumber (integer) --

        The version number of the default version of the launch template.

      • LatestVersionNumber (integer) --

        The version number of the latest version of the launch template.

      • Tags (list) --

        The tags for the launch template.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

Examples

This example deletes the specified launch template.

response = client.delete_launch_template(
    LaunchTemplateId='lt-0abcd290751193123',
)

print(response)

Expected Output:

{
    'LaunchTemplate': {
        'CreateTime': datetime(2017, 11, 23, 16, 46, 25, 3, 327, 0),
        'CreatedBy': 'arn:aws:iam::123456789012:root',
        'DefaultVersionNumber': 2,
        'LatestVersionNumber': 2,
        'LaunchTemplateId': 'lt-0abcd290751193123',
        'LaunchTemplateName': 'my-template',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_launch_template_versions(**kwargs)

Deletes one or more versions of a launch template. You cannot delete the default version of a launch template; you must first assign a different version as the default. If the default version is the only version for the launch template, you must delete the entire launch template using DeleteLaunchTemplate .

See also: AWS API Documentation

Request Syntax

response = client.delete_launch_template_versions(
    DryRun=True|False,
    LaunchTemplateId='string',
    LaunchTemplateName='string',
    Versions=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LaunchTemplateId (string) --

    The ID of the launch template.

    You must specify either the LaunchTemplateId or the LaunchTemplateName , but not both.

  • LaunchTemplateName (string) --

    The name of the launch template.

    You must specify either the LaunchTemplateName or the LaunchTemplateId , but not both.

  • Versions (list) --

    [REQUIRED]

    The version numbers of one or more launch template versions to delete.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'SuccessfullyDeletedLaunchTemplateVersions': [
        {
            'LaunchTemplateId': 'string',
            'LaunchTemplateName': 'string',
            'VersionNumber': 123
        },
    ],
    'UnsuccessfullyDeletedLaunchTemplateVersions': [
        {
            'LaunchTemplateId': 'string',
            'LaunchTemplateName': 'string',
            'VersionNumber': 123,
            'ResponseError': {
                'Code': 'launchTemplateIdDoesNotExist'|'launchTemplateIdMalformed'|'launchTemplateNameDoesNotExist'|'launchTemplateNameMalformed'|'launchTemplateVersionDoesNotExist'|'unexpectedError',
                'Message': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfullyDeletedLaunchTemplateVersions (list) --

      Information about the launch template versions that were successfully deleted.

      • (dict) --

        Describes a launch template version that was successfully deleted.

        • LaunchTemplateId (string) --

          The ID of the launch template.

        • LaunchTemplateName (string) --

          The name of the launch template.

        • VersionNumber (integer) --

          The version number of the launch template.

    • UnsuccessfullyDeletedLaunchTemplateVersions (list) --

      Information about the launch template versions that could not be deleted.

      • (dict) --

        Describes a launch template version that could not be deleted.

        • LaunchTemplateId (string) --

          The ID of the launch template.

        • LaunchTemplateName (string) --

          The name of the launch template.

        • VersionNumber (integer) --

          The version number of the launch template.

        • ResponseError (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message, if applicable.

Examples

This example deletes the specified launch template version.

response = client.delete_launch_template_versions(
    LaunchTemplateId='lt-0abcd290751193123',
    Versions=[
        '1',
    ],
)

print(response)

Expected Output:

{
    'SuccessfullyDeletedLaunchTemplateVersions': [
        {
            'LaunchTemplateId': 'lt-0abcd290751193123',
            'LaunchTemplateName': 'my-template',
            'VersionNumber': 1,
        },
    ],
    'UnsuccessfullyDeletedLaunchTemplateVersions': [
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_local_gateway_route(**kwargs)

Deletes the specified route from the specified local gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_local_gateway_route(
    DestinationCidrBlock='string',
    LocalGatewayRouteTableId='string',
    DryRun=True|False
)
Parameters
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR range for the route. This must match the CIDR for the route exactly.

  • LocalGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the local gateway route table.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Route': {
        'DestinationCidrBlock': 'string',
        'LocalGatewayVirtualInterfaceGroupId': 'string',
        'Type': 'static'|'propagated',
        'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted',
        'LocalGatewayRouteTableId': 'string',
        'LocalGatewayRouteTableArn': 'string',
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • Route (dict) --

      Information about the route.

      • DestinationCidrBlock (string) --

        The CIDR block used for destination matches.

      • LocalGatewayVirtualInterfaceGroupId (string) --

        The ID of the virtual interface group.

      • Type (string) --

        The route type.

      • State (string) --

        The state of the route.

      • LocalGatewayRouteTableId (string) --

        The ID of the local gateway route table.

      • LocalGatewayRouteTableArn (string) --

        The Amazon Resource Name (ARN) of the local gateway route table.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the local gateway route.

delete_local_gateway_route_table_vpc_association(**kwargs)

Deletes the specified association between a VPC and local gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_local_gateway_route_table_vpc_association(
    LocalGatewayRouteTableVpcAssociationId='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayRouteTableVpcAssociationId (string) --

    [REQUIRED]

    The ID of the association.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTableVpcAssociation': {
        'LocalGatewayRouteTableVpcAssociationId': 'string',
        'LocalGatewayRouteTableId': 'string',
        'LocalGatewayRouteTableArn': 'string',
        'LocalGatewayId': 'string',
        'VpcId': 'string',
        'OwnerId': 'string',
        'State': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LocalGatewayRouteTableVpcAssociation (dict) --

      Information about the association.

      • LocalGatewayRouteTableVpcAssociationId (string) --

        The ID of the association.

      • LocalGatewayRouteTableId (string) --

        The ID of the local gateway route table.

      • LocalGatewayRouteTableArn (string) --

        The Amazon Resource Name (ARN) of the local gateway route table for the association.

      • LocalGatewayId (string) --

        The ID of the local gateway.

      • VpcId (string) --

        The ID of the VPC.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the local gateway route table for the association.

      • State (string) --

        The state of the association.

      • Tags (list) --

        The tags assigned to the association.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_managed_prefix_list(**kwargs)

Deletes the specified managed prefix list. You must first remove all references to the prefix list in your resources.

See also: AWS API Documentation

Request Syntax

response = client.delete_managed_prefix_list(
    DryRun=True|False,
    PrefixListId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

Return type

dict

Returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The current state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OwnerId (string) --

        The ID of the owner of the prefix list.

delete_nat_gateway(**kwargs)

Deletes the specified NAT gateway. Deleting a public NAT gateway disassociates its Elastic IP address, but does not release the address from your account. Deleting a NAT gateway does not delete any NAT gateway routes in your route tables.

See also: AWS API Documentation

Request Syntax

response = client.delete_nat_gateway(
    DryRun=True|False,
    NatGatewayId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NatGatewayId (string) --

    [REQUIRED]

    The ID of the NAT gateway.

Return type

dict

Returns

Response Syntax

{
    'NatGatewayId': 'string'
}

Response Structure

  • (dict) --

    • NatGatewayId (string) --

      The ID of the NAT gateway.

Examples

This example deletes the specified NAT gateway.

response = client.delete_nat_gateway(
    NatGatewayId='nat-04ae55e711cec5680',
)

print(response)

Expected Output:

{
    'NatGatewayId': 'nat-04ae55e711cec5680',
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_network_acl(**kwargs)

Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_acl(
    DryRun=True|False,
    NetworkAclId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkAclId (string) --

    [REQUIRED]

    The ID of the network ACL.

Returns

None

Examples

This example deletes the specified network ACL.

response = client.delete_network_acl(
    NetworkAclId='acl-5fb85d36',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_network_acl_entry(**kwargs)

Deletes the specified ingress or egress entry (rule) from the specified network ACL.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_acl_entry(
    DryRun=True|False,
    Egress=True|False,
    NetworkAclId='string',
    RuleNumber=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Egress (boolean) --

    [REQUIRED]

    Indicates whether the rule is an egress rule.

  • NetworkAclId (string) --

    [REQUIRED]

    The ID of the network ACL.

  • RuleNumber (integer) --

    [REQUIRED]

    The rule number of the entry to delete.

Returns

None

Examples

This example deletes ingress rule number 100 from the specified network ACL.

response = client.delete_network_acl_entry(
    Egress=True,
    NetworkAclId='acl-5fb85d36',
    RuleNumber=100,
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_network_insights_access_scope(**kwargs)

Deletes the specified Network Access Scope.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_insights_access_scope(
    DryRun=True|False,
    NetworkInsightsAccessScopeId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInsightsAccessScopeId (string) --

    [REQUIRED]

    The ID of the Network Access Scope.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopeId': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopeId (string) --

      The ID of the Network Access Scope.

delete_network_insights_access_scope_analysis(**kwargs)

Deletes the specified Network Access Scope analysis.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_insights_access_scope_analysis(
    NetworkInsightsAccessScopeAnalysisId='string',
    DryRun=True|False
)
Parameters
  • NetworkInsightsAccessScopeAnalysisId (string) --

    [REQUIRED]

    The ID of the Network Access Scope analysis.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopeAnalysisId': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopeAnalysisId (string) --

      The ID of the Network Access Scope analysis.

delete_network_insights_analysis(**kwargs)

Deletes the specified network insights analysis.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_insights_analysis(
    DryRun=True|False,
    NetworkInsightsAnalysisId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInsightsAnalysisId (string) --

    [REQUIRED]

    The ID of the network insights analysis.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAnalysisId': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsAnalysisId (string) --

      The ID of the network insights analysis.

delete_network_insights_path(**kwargs)

Deletes the specified path.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_insights_path(
    DryRun=True|False,
    NetworkInsightsPathId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInsightsPathId (string) --

    [REQUIRED]

    The ID of the path.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsPathId': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsPathId (string) --

      The ID of the path.

delete_network_interface(**kwargs)

Deletes the specified network interface. You must detach the network interface before you can delete it.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_interface(
    DryRun=True|False,
    NetworkInterfaceId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

Returns

None

Examples

This example deletes the specified network interface.

response = client.delete_network_interface(
    NetworkInterfaceId='eni-e5aa89a3',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_network_interface_permission(**kwargs)

Deletes a permission for a network interface. By default, you cannot delete the permission if the account for which you're removing the permission has attached the network interface to an instance. However, you can force delete the permission, regardless of any attachment.

See also: AWS API Documentation

Request Syntax

response = client.delete_network_interface_permission(
    NetworkInterfacePermissionId='string',
    Force=True|False,
    DryRun=True|False
)
Parameters
  • NetworkInterfacePermissionId (string) --

    [REQUIRED]

    The ID of the network interface permission.

  • Force (boolean) -- Specify true to remove the permission even if the network interface is attached to an instance.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    Contains the output for DeleteNetworkInterfacePermission.

    • Return (boolean) --

      Returns true if the request succeeds, otherwise returns an error.

delete_placement_group(**kwargs)

Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information, see Placement groups in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_placement_group(
    DryRun=True|False,
    GroupName='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupName (string) --

    [REQUIRED]

    The name of the placement group.

Returns

None

Examples

This example deletes the specified placement group.

response = client.delete_placement_group(
    GroupName='my-cluster',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_public_ipv4_pool(**kwargs)

Delete a public IPv4 pool. A public IPv4 pool is an EC2 IP address pool required for the public IPv4 CIDRs that you own and bring to Amazon Web Services to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, however, use IPAM pools only.

See also: AWS API Documentation

Request Syntax

response = client.delete_public_ipv4_pool(
    DryRun=True|False,
    PoolId='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • PoolId (string) --

    [REQUIRED]

    The ID of the public IPv4 pool you want to delete.

Return type

dict

Returns

Response Syntax

{
    'ReturnValue': True|False
}

Response Structure

  • (dict) --

    • ReturnValue (boolean) --

      Information about the result of deleting the public IPv4 pool.

delete_queued_reserved_instances(**kwargs)

Deletes the queued purchases for the specified Reserved Instances.

See also: AWS API Documentation

Request Syntax

response = client.delete_queued_reserved_instances(
    DryRun=True|False,
    ReservedInstancesIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ReservedInstancesIds (list) --

    [REQUIRED]

    The IDs of the Reserved Instances.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'SuccessfulQueuedPurchaseDeletions': [
        {
            'ReservedInstancesId': 'string'
        },
    ],
    'FailedQueuedPurchaseDeletions': [
        {
            'Error': {
                'Code': 'reserved-instances-id-invalid'|'reserved-instances-not-in-queued-state'|'unexpected-error',
                'Message': 'string'
            },
            'ReservedInstancesId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfulQueuedPurchaseDeletions (list) --

      Information about the queued purchases that were successfully deleted.

      • (dict) --

        Describes a Reserved Instance whose queued purchase was successfully deleted.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

    • FailedQueuedPurchaseDeletions (list) --

      Information about the queued purchases that could not be deleted.

      • (dict) --

        Describes a Reserved Instance whose queued purchase was not deleted.

        • Error (dict) --

          The error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

delete_route(**kwargs)

Deletes the specified route from the specified route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_route(
    DestinationCidrBlock='string',
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    RouteTableId='string'
)
Parameters
  • DestinationCidrBlock (string) -- The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.
  • DestinationIpv6CidrBlock (string) -- The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.
  • DestinationPrefixListId (string) -- The ID of the prefix list for the route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

Returns

None

Examples

This example deletes the specified route from the specified route table.

response = client.delete_route(
    DestinationCidrBlock='0.0.0.0/0',
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_route_table(**kwargs)

Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_route_table(
    DryRun=True|False,
    RouteTableId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

Returns

None

Examples

This example deletes the specified route table.

response = client.delete_route_table(
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_security_group(**kwargs)

Deletes a security group.

If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_security_group(
    GroupId='string',
    GroupName='string',
    DryRun=True|False
)
Parameters
  • GroupId (string) -- The ID of the security group. Required for a nondefault VPC.
  • GroupName (string) -- [EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes the specified security group.

response = client.delete_security_group(
    GroupId='sg-903004f8',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_snapshot(**kwargs)

Deletes the specified snapshot.

When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

For more information, see Delete an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_snapshot(
    SnapshotId='string',
    DryRun=True|False
)
Parameters
  • SnapshotId (string) --

    [REQUIRED]

    The ID of the EBS snapshot.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes a snapshot with the snapshot ID of snap-1234567890abcdef0. If the command succeeds, no output is returned.

response = client.delete_snapshot(
    SnapshotId='snap-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_spot_datafeed_subscription(**kwargs)

Deletes the data feed for Spot Instances.

See also: AWS API Documentation

Request Syntax

response = client.delete_spot_datafeed_subscription(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None

Examples

This example deletes a Spot data feed subscription for the account.

response = client.delete_spot_datafeed_subscription(
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_subnet(**kwargs)

Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.

See also: AWS API Documentation

Request Syntax

response = client.delete_subnet(
    SubnetId='string',
    DryRun=True|False
)
Parameters
  • SubnetId (string) --

    [REQUIRED]

    The ID of the subnet.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes the specified subnet.

response = client.delete_subnet(
    SubnetId='subnet-9d4a7b6c',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_subnet_cidr_reservation(**kwargs)

Deletes a subnet CIDR reservation.

See also: AWS API Documentation

Request Syntax

response = client.delete_subnet_cidr_reservation(
    SubnetCidrReservationId='string',
    DryRun=True|False
)
Parameters
  • SubnetCidrReservationId (string) --

    [REQUIRED]

    The ID of the subnet CIDR reservation.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'DeletedSubnetCidrReservation': {
        'SubnetCidrReservationId': 'string',
        'SubnetId': 'string',
        'Cidr': 'string',
        'ReservationType': 'prefix'|'explicit',
        'OwnerId': 'string',
        'Description': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • DeletedSubnetCidrReservation (dict) --

      Information about the deleted subnet CIDR reservation.

      • SubnetCidrReservationId (string) --

        The ID of the subnet CIDR reservation.

      • SubnetId (string) --

        The ID of the subnet.

      • Cidr (string) --

        The CIDR that has been reserved.

      • ReservationType (string) --

        The type of reservation.

      • OwnerId (string) --

        The ID of the account that owns the subnet CIDR reservation.

      • Description (string) --

        The description assigned to the subnet CIDR reservation.

      • Tags (list) --

        The tags assigned to the subnet CIDR reservation.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_tags(**kwargs)

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags . For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_tags(
    DryRun=True|False,
    Resources=[
        'string',
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Resources (list) --

    [REQUIRED]

    The IDs of the resources, separated by spaces.

    Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

    • (string) --
  • Tags (list) --

    The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.

    If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the aws: prefix).

    Constraints: Up to 1000 tags.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

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

      • Value (string) --

        The value of the tag.

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

Returns

None

Examples

This example deletes the tag Stack=test from the specified image.

response = client.delete_tags(
    Resources=[
        'ami-78a54011',
    ],
    Tags=[
        {
            'Key': 'Stack',
            'Value': 'test',
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_traffic_mirror_filter(**kwargs)

Deletes the specified Traffic Mirror filter.

You cannot delete a Traffic Mirror filter that is in use by a Traffic Mirror session.

See also: AWS API Documentation

Request Syntax

response = client.delete_traffic_mirror_filter(
    TrafficMirrorFilterId='string',
    DryRun=True|False
)
Parameters
  • TrafficMirrorFilterId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror filter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilterId': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorFilterId (string) --

      The ID of the Traffic Mirror filter.

delete_traffic_mirror_filter_rule(**kwargs)

Deletes the specified Traffic Mirror rule.

See also: AWS API Documentation

Request Syntax

response = client.delete_traffic_mirror_filter_rule(
    TrafficMirrorFilterRuleId='string',
    DryRun=True|False
)
Parameters
  • TrafficMirrorFilterRuleId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror rule.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilterRuleId': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorFilterRuleId (string) --

      The ID of the deleted Traffic Mirror rule.

delete_traffic_mirror_session(**kwargs)

Deletes the specified Traffic Mirror session.

See also: AWS API Documentation

Request Syntax

response = client.delete_traffic_mirror_session(
    TrafficMirrorSessionId='string',
    DryRun=True|False
)
Parameters
  • TrafficMirrorSessionId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror session.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorSessionId': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorSessionId (string) --

      The ID of the deleted Traffic Mirror session.

delete_traffic_mirror_target(**kwargs)

Deletes the specified Traffic Mirror target.

You cannot delete a Traffic Mirror target that is in use by a Traffic Mirror session.

See also: AWS API Documentation

Request Syntax

response = client.delete_traffic_mirror_target(
    TrafficMirrorTargetId='string',
    DryRun=True|False
)
Parameters
  • TrafficMirrorTargetId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror target.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorTargetId': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorTargetId (string) --

      The ID of the deleted Traffic Mirror target.

delete_transit_gateway(**kwargs)

Deletes the specified transit gateway.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway(
    TransitGatewayId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayId (string) --

    [REQUIRED]

    The ID of the transit gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGateway': {
        'TransitGatewayId': 'string',
        'TransitGatewayArn': 'string',
        'State': 'pending'|'available'|'modifying'|'deleting'|'deleted',
        'OwnerId': 'string',
        'Description': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'AmazonSideAsn': 123,
            'TransitGatewayCidrBlocks': [
                'string',
            ],
            'AutoAcceptSharedAttachments': 'enable'|'disable',
            'DefaultRouteTableAssociation': 'enable'|'disable',
            'AssociationDefaultRouteTableId': 'string',
            'DefaultRouteTablePropagation': 'enable'|'disable',
            'PropagationDefaultRouteTableId': 'string',
            'VpnEcmpSupport': 'enable'|'disable',
            'DnsSupport': 'enable'|'disable',
            'MulticastSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGateway (dict) --

      Information about the deleted transit gateway.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • TransitGatewayArn (string) --

        The Amazon Resource Name (ARN) of the transit gateway.

      • State (string) --

        The state of the transit gateway.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the transit gateway.

      • Description (string) --

        The description of the transit gateway.

      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The transit gateway options.

        • AmazonSideAsn (integer) --

          A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

        • TransitGatewayCidrBlocks (list) --

          The transit gateway CIDR blocks.

          • (string) --
        • AutoAcceptSharedAttachments (string) --

          Indicates whether attachment requests are automatically accepted.

        • DefaultRouteTableAssociation (string) --

          Indicates whether resource attachments are automatically associated with the default association route table.

        • AssociationDefaultRouteTableId (string) --

          The ID of the default association route table.

        • DefaultRouteTablePropagation (string) --

          Indicates whether resource attachments automatically propagate routes to the default propagation route table.

        • PropagationDefaultRouteTableId (string) --

          The ID of the default propagation route table.

        • VpnEcmpSupport (string) --

          Indicates whether Equal Cost Multipath Protocol support is enabled.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • MulticastSupport (string) --

          Indicates whether multicast is enabled on the transit gateway

      • Tags (list) --

        The tags for the transit gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_connect(**kwargs)

Deletes the specified Connect attachment. You must first delete any Connect peers for the attachment.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_connect(
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the Connect attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnect': {
        'TransitGatewayAttachmentId': 'string',
        'TransportTransitGatewayAttachmentId': 'string',
        'TransitGatewayId': 'string',
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'Protocol': 'gre'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayConnect (dict) --

      Information about the deleted Connect attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the Connect attachment.

      • TransportTransitGatewayAttachmentId (string) --

        The ID of the attachment from which the Connect attachment was created.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • State (string) --

        The state of the attachment.

      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The Connect attachment options.

        • Protocol (string) --

          The tunnel protocol.

      • Tags (list) --

        The tags for the attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_connect_peer(**kwargs)

Deletes the specified Connect peer.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_connect_peer(
    TransitGatewayConnectPeerId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayConnectPeerId (string) --

    [REQUIRED]

    The ID of the Connect peer.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnectPeer': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayConnectPeerId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'ConnectPeerConfiguration': {
            'TransitGatewayAddress': 'string',
            'PeerAddress': 'string',
            'InsideCidrBlocks': [
                'string',
            ],
            'Protocol': 'gre',
            'BgpConfigurations': [
                {
                    'TransitGatewayAsn': 123,
                    'PeerAsn': 123,
                    'TransitGatewayAddress': 'string',
                    'PeerAddress': 'string',
                    'BgpStatus': 'up'|'down'
                },
            ]
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayConnectPeer (dict) --

      Information about the deleted Connect peer.

      • TransitGatewayAttachmentId (string) --

        The ID of the Connect attachment.

      • TransitGatewayConnectPeerId (string) --

        The ID of the Connect peer.

      • State (string) --

        The state of the Connect peer.

      • CreationTime (datetime) --

        The creation time.

      • ConnectPeerConfiguration (dict) --

        The Connect peer details.

        • TransitGatewayAddress (string) --

          The Connect peer IP address on the transit gateway side of the tunnel.

        • PeerAddress (string) --

          The Connect peer IP address on the appliance side of the tunnel.

        • InsideCidrBlocks (list) --

          The range of interior BGP peer IP addresses.

          • (string) --
        • Protocol (string) --

          The tunnel protocol.

        • BgpConfigurations (list) --

          The BGP configuration details.

          • (dict) --

            The BGP configuration information.

            • TransitGatewayAsn (integer) --

              The transit gateway Autonomous System Number (ASN).

            • PeerAsn (integer) --

              The peer Autonomous System Number (ASN).

            • TransitGatewayAddress (string) --

              The interior BGP peer IP address for the transit gateway.

            • PeerAddress (string) --

              The interior BGP peer IP address for the appliance.

            • BgpStatus (string) --

              The BGP status.

      • Tags (list) --

        The tags for the Connect peer.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_multicast_domain(**kwargs)

Deletes the specified transit gateway multicast domain.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_multicast_domain(
    TransitGatewayMulticastDomainId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) --

    [REQUIRED]

    The ID of the transit gateway multicast domain.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayMulticastDomain': {
        'TransitGatewayMulticastDomainId': 'string',
        'TransitGatewayId': 'string',
        'TransitGatewayMulticastDomainArn': 'string',
        'OwnerId': 'string',
        'Options': {
            'Igmpv2Support': 'enable'|'disable',
            'StaticSourcesSupport': 'enable'|'disable',
            'AutoAcceptSharedAssociations': 'enable'|'disable'
        },
        'State': 'pending'|'available'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayMulticastDomain (dict) --

      Information about the deleted transit gateway multicast domain.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • TransitGatewayMulticastDomainArn (string) --

        The Amazon Resource Name (ARN) of the transit gateway multicast domain.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the transit gateway multicast domain.

      • Options (dict) --

        The options for the transit gateway multicast domain.

        • Igmpv2Support (string) --

          Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.

        • StaticSourcesSupport (string) --

          Indicates whether support for statically configuring transit gateway multicast group sources is turned on.

        • AutoAcceptSharedAssociations (string) --

          Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.

      • State (string) --

        The state of the transit gateway multicast domain.

      • CreationTime (datetime) --

        The time the transit gateway multicast domain was created.

      • Tags (list) --

        The tags for the transit gateway multicast domain.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_peering_attachment(**kwargs)

Deletes a transit gateway peering attachment.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_peering_attachment(
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the transit gateway peering attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPeeringAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'AccepterTransitGatewayAttachmentId': 'string',
        'RequesterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'AccepterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'Options': {
            'DynamicRouting': 'enable'|'disable'
        },
        'Status': {
            'Code': 'string',
            'Message': 'string'
        },
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPeeringAttachment (dict) --

      The transit gateway peering attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway peering attachment.

      • AccepterTransitGatewayAttachmentId (string) --

        The ID of the accepter transit gateway attachment.

      • RequesterTgwInfo (dict) --

        Information about the requester transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • AccepterTgwInfo (dict) --

        Information about the accepter transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • Options (dict) --

        Details about the transit gateway peering attachment.

        • DynamicRouting (string) --

          Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.

      • Status (dict) --

        The status of the transit gateway peering attachment.

        • Code (string) --

          The status code.

        • Message (string) --

          The status message, if applicable.

      • State (string) --

        The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

      • CreationTime (datetime) --

        The time the transit gateway peering attachment was created.

      • Tags (list) --

        The tags for the transit gateway peering attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_policy_table(**kwargs)

Deletes the specified transit gateway policy table.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_policy_table(
    TransitGatewayPolicyTableId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayPolicyTableId (string) --

    [REQUIRED]

    The transit gateway policy table to delete.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPolicyTable': {
        'TransitGatewayPolicyTableId': 'string',
        'TransitGatewayId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPolicyTable (dict) --

      Provides details about the deleted transit gateway policy table.

      • TransitGatewayPolicyTableId (string) --

        The ID of the transit gateway policy table.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • State (string) --

        The state of the transit gateway policy table

      • CreationTime (datetime) --

        The timestamp when the transit gateway policy table was created.

      • Tags (list) --

        he key-value pairs associated with the transit gateway policy table.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_prefix_list_reference(**kwargs)

Deletes a reference (route) to a prefix list in a specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_prefix_list_reference(
    TransitGatewayRouteTableId='string',
    PrefixListId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPrefixListReference': {
        'TransitGatewayRouteTableId': 'string',
        'PrefixListId': 'string',
        'PrefixListOwnerId': 'string',
        'State': 'pending'|'available'|'modifying'|'deleting',
        'Blackhole': True|False,
        'TransitGatewayAttachment': {
            'TransitGatewayAttachmentId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceId': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPrefixListReference (dict) --

      Information about the deleted prefix list reference.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • PrefixListId (string) --

        The ID of the prefix list.

      • PrefixListOwnerId (string) --

        The ID of the prefix list owner.

      • State (string) --

        The state of the prefix list reference.

      • Blackhole (boolean) --

        Indicates whether traffic that matches this route is dropped.

      • TransitGatewayAttachment (dict) --

        Information about the transit gateway attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • ResourceType (string) --

          The resource type. Note that the tgw-peering resource type has been deprecated.

        • ResourceId (string) --

          The ID of the resource.

delete_transit_gateway_route(**kwargs)

Deletes the specified route from the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_route(
    TransitGatewayRouteTableId='string',
    DestinationCidrBlock='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR range for the route. This must match the CIDR for the route exactly.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Route': {
        'DestinationCidrBlock': 'string',
        'PrefixListId': 'string',
        'TransitGatewayRouteTableAnnouncementId': 'string',
        'TransitGatewayAttachments': [
            {
                'ResourceId': 'string',
                'TransitGatewayAttachmentId': 'string',
                'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'
            },
        ],
        'Type': 'static'|'propagated',
        'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted'
    }
}

Response Structure

  • (dict) --

    • Route (dict) --

      Information about the route.

      • DestinationCidrBlock (string) --

        The CIDR block used for destination matches.

      • PrefixListId (string) --

        The ID of the prefix list used for destination matches.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

      • TransitGatewayAttachments (list) --

        The attachments.

        • (dict) --

          Describes a route attachment.

          • ResourceId (string) --

            The ID of the resource.

          • TransitGatewayAttachmentId (string) --

            The ID of the attachment.

          • ResourceType (string) --

            The resource type. Note that the tgw-peering resource type has been deprecated.

      • Type (string) --

        The route type.

      • State (string) --

        The state of the route.

delete_transit_gateway_route_table(**kwargs)

Deletes the specified transit gateway route table. You must disassociate the route table from any transit gateway route tables before you can delete it.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_route_table(
    TransitGatewayRouteTableId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTable': {
        'TransitGatewayRouteTableId': 'string',
        'TransitGatewayId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'DefaultAssociationRouteTable': True|False,
        'DefaultPropagationRouteTable': True|False,
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayRouteTable (dict) --

      Information about the deleted transit gateway route table.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • State (string) --

        The state of the transit gateway route table.

      • DefaultAssociationRouteTable (boolean) --

        Indicates whether this is the default association route table for the transit gateway.

      • DefaultPropagationRouteTable (boolean) --

        Indicates whether this is the default propagation route table for the transit gateway.

      • CreationTime (datetime) --

        The creation time.

      • Tags (list) --

        Any tags assigned to the route table.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_route_table_announcement(**kwargs)

Advertises to the transit gateway that a transit gateway route table is deleted.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_route_table_announcement(
    TransitGatewayRouteTableAnnouncementId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableAnnouncementId (string) --

    [REQUIRED]

    The transit gateway route table ID that's being deleted.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTableAnnouncement': {
        'TransitGatewayRouteTableAnnouncementId': 'string',
        'TransitGatewayId': 'string',
        'CoreNetworkId': 'string',
        'PeerTransitGatewayId': 'string',
        'PeerCoreNetworkId': 'string',
        'PeeringAttachmentId': 'string',
        'AnnouncementDirection': 'outgoing'|'incoming',
        'TransitGatewayRouteTableId': 'string',
        'State': 'available'|'pending'|'failing'|'failed'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayRouteTableAnnouncement (dict) --

      Provides details about a deleted transit gateway route table.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • CoreNetworkId (string) --

        The ID of the core network for the transit gateway route table announcement.

      • PeerTransitGatewayId (string) --

        The ID of the peer transit gateway.

      • PeerCoreNetworkId (string) --

        The ID of the core network ID for the peer.

      • PeeringAttachmentId (string) --

        The ID of the peering attachment.

      • AnnouncementDirection (string) --

        The direction for the route table announcement.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • State (string) --

        The state of the transit gateway announcement.

      • CreationTime (datetime) --

        The timestamp when the transit gateway route table announcement was created.

      • Tags (list) --

        The key-value pairs associated with the route table announcement.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_transit_gateway_vpc_attachment(**kwargs)

Deletes the specified VPC attachment.

See also: AWS API Documentation

Request Syntax

response = client.delete_transit_gateway_vpc_attachment(
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayVpcAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayId': 'string',
        'VpcId': 'string',
        'VpcOwnerId': 'string',
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'SubnetIds': [
            'string',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'DnsSupport': 'enable'|'disable',
            'Ipv6Support': 'enable'|'disable',
            'ApplianceModeSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayVpcAttachment (dict) --

      Information about the deleted VPC attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • VpcId (string) --

        The ID of the VPC.

      • VpcOwnerId (string) --

        The ID of the Amazon Web Services account that owns the VPC.

      • State (string) --

        The state of the VPC attachment. Note that the initiating state has been deprecated.

      • SubnetIds (list) --

        The IDs of the subnets.

        • (string) --
      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The VPC attachment options.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • Ipv6Support (string) --

          Indicates whether IPv6 support is disabled.

        • ApplianceModeSupport (string) --

          Indicates whether appliance mode support is enabled.

      • Tags (list) --

        The tags for the VPC attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

delete_volume(**kwargs)

Deletes the specified EBS volume. The volume must be in the available state (not attached to an instance).

The volume can remain in the deleting state for several minutes.

For more information, see Delete an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.delete_volume(
    VolumeId='string',
    DryRun=True|False
)
Parameters
  • VolumeId (string) --

    [REQUIRED]

    The ID of the volume.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes an available volume with the volume ID of vol-049df61146c4d7901. If the command succeeds, no output is returned.

response = client.delete_volume(
    VolumeId='vol-049df61146c4d7901',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_vpc(**kwargs)

Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpc(
    VpcId='string',
    DryRun=True|False
)
Parameters
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example deletes the specified VPC.

response = client.delete_vpc(
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
delete_vpc_endpoint_connection_notifications(**kwargs)

Deletes one or more VPC endpoint connection notifications.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpc_endpoint_connection_notifications(
    DryRun=True|False,
    ConnectionNotificationIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ConnectionNotificationIds (list) --

    [REQUIRED]

    One or more notification IDs.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Unsuccessful (list) --

      Information about the notifications that could not be deleted successfully.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

delete_vpc_endpoint_service_configurations(**kwargs)

Deletes one or more VPC endpoint service configurations in your account. Before you delete the endpoint service configuration, you must reject any Available or PendingAcceptance interface endpoint connections that are attached to the service.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpc_endpoint_service_configurations(
    DryRun=True|False,
    ServiceIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceIds (list) --

    [REQUIRED]

    The IDs of one or more services.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Unsuccessful (list) --

      Information about the service configurations that were not deleted, if applicable.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

delete_vpc_endpoints(**kwargs)

Deletes one or more specified VPC endpoints. You can delete any of the following types of VPC endpoints.

  • Gateway endpoint,
  • Gateway Load Balancer endpoint,
  • Interface endpoint

The following rules apply when you delete a VPC endpoint:

  • When you delete a gateway endpoint, we delete the endpoint routes in the route tables that are associated with the endpoint.
  • When you delete a Gateway Load Balancer endpoint, we delete the endpoint network interfaces. You can only delete Gateway Load Balancer endpoints when the routes that are associated with the endpoint are deleted.
  • When you delete an interface endpoint, we delete the endpoint network interfaces.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpc_endpoints(
    DryRun=True|False,
    VpcEndpointIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointIds (list) --

    [REQUIRED]

    One or more VPC endpoint IDs.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DeleteVpcEndpoints.

    • Unsuccessful (list) --

      Information about the VPC endpoints that were not successfully deleted.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

delete_vpc_peering_connection(**kwargs)

Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the accepter VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance state. You cannot delete a VPC peering connection that's in the failed state.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpc_peering_connection(
    DryRun=True|False,
    VpcPeeringConnectionId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionId (string) --

    [REQUIRED]

    The ID of the VPC peering connection.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

delete_vpn_connection(**kwargs)

Deletes the specified VPN connection.

If you're deleting the VPC and its associated components, we recommend that you detach the virtual private gateway from the VPC and delete the VPC before deleting the VPN connection. If you believe that the tunnel credentials for your VPN connection have been compromised, you can delete the VPN connection and create a new one that has new keys, without needing to delete the VPC or virtual private gateway. If you create a new VPN connection, you must reconfigure the customer gateway device using the new configuration information returned with the new VPN connection ID.

For certificate-based authentication, delete all Certificate Manager (ACM) private certificates used for the Amazon Web Services-side tunnel endpoints for the VPN connection before deleting the VPN connection.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpn_connection(
    VpnConnectionId='string',
    DryRun=True|False
)
Parameters
  • VpnConnectionId (string) --

    [REQUIRED]

    The ID of the VPN connection.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

delete_vpn_connection_route(**kwargs)

Deletes the specified static route associated with a VPN connection between an existing virtual private gateway and a VPN customer gateway. The static route allows traffic to be routed from the virtual private gateway to the VPN customer gateway.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpn_connection_route(
    DestinationCidrBlock='string',
    VpnConnectionId='string'
)
Parameters
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR block associated with the local subnet of the customer network.

  • VpnConnectionId (string) --

    [REQUIRED]

    The ID of the VPN connection.

Returns

None

delete_vpn_gateway(**kwargs)

Deletes the specified virtual private gateway. You must first detach the virtual private gateway from the VPC. Note that you don't need to delete the virtual private gateway if you plan to delete and recreate the VPN connection between your VPC and your network.

See also: AWS API Documentation

Request Syntax

response = client.delete_vpn_gateway(
    VpnGatewayId='string',
    DryRun=True|False
)
Parameters
  • VpnGatewayId (string) --

    [REQUIRED]

    The ID of the virtual private gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

deprovision_byoip_cidr(**kwargs)

Releases the specified address range that you provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and deletes the corresponding address pool.

Before you can release an address range, you must stop advertising it using WithdrawByoipCidr and you must not have any IP addresses allocated from its address range.

See also: AWS API Documentation

Request Syntax

response = client.deprovision_byoip_cidr(
    Cidr='string',
    DryRun=True|False
)
Parameters
  • Cidr (string) --

    [REQUIRED]

    The address range, in CIDR notation. The prefix must be the same prefix that you specified when you provisioned the address range.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ByoipCidr': {
        'Cidr': 'string',
        'Description': 'string',
        'StatusMessage': 'string',
        'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable'
    }
}

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address range.

      • Cidr (string) --

        The address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

        Upon success, contains the ID of the address pool. Otherwise, contains an error message.

      • State (string) --

        The state of the address pool.

deprovision_ipam_pool_cidr(**kwargs)

Deprovision a CIDR provisioned from an IPAM pool. If you deprovision a CIDR from a pool that has a source pool, the CIDR is recycled back into the source pool. For more information, see Deprovision pool CIDRs in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.deprovision_ipam_pool_cidr(
    DryRun=True|False,
    IpamPoolId='string',
    Cidr='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the pool that has the CIDR you want to deprovision.

  • Cidr (string) -- The CIDR which you want to deprovision from the pool.
Return type

dict

Returns

Response Syntax

{
    'IpamPoolCidr': {
        'Cidr': 'string',
        'State': 'pending-provision'|'provisioned'|'failed-provision'|'pending-deprovision'|'deprovisioned'|'failed-deprovision'|'pending-import'|'failed-import',
        'FailureReason': {
            'Code': 'cidr-not-available',
            'Message': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • IpamPoolCidr (dict) --

      The deprovisioned pool CIDR.

      • Cidr (string) --

        The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .

      • State (string) --

        The state of the CIDR.

      • FailureReason (dict) --

        Details related to why an IPAM pool CIDR failed to be provisioned.

        • Code (string) --

          An error code related to why an IPAM pool CIDR failed to be provisioned.

        • Message (string) --

          A message related to why an IPAM pool CIDR failed to be provisioned.

deprovision_public_ipv4_pool_cidr(**kwargs)

Deprovision a CIDR from a public IPv4 pool.

See also: AWS API Documentation

Request Syntax

response = client.deprovision_public_ipv4_pool_cidr(
    DryRun=True|False,
    PoolId='string',
    Cidr='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • PoolId (string) --

    [REQUIRED]

    The ID of the pool that you want to deprovision the CIDR from.

  • Cidr (string) --

    [REQUIRED]

    The CIDR you want to deprovision from the pool.

Return type

dict

Returns

Response Syntax

{
    'PoolId': 'string',
    'DeprovisionedAddresses': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • PoolId (string) --

      The ID of the pool that you deprovisioned the CIDR from.

    • DeprovisionedAddresses (list) --

      The deprovisioned CIDRs.

      • (string) --

deregister_image(**kwargs)

Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances.

If you deregister an AMI that matches a Recycle Bin retention rule, the AMI is retained in the Recycle Bin for the specified retention period. For more information, see Recycle Bin in the Amazon Elastic Compute Cloud User Guide.

When you deregister an AMI, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.

When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.

See also: AWS API Documentation

Request Syntax

response = client.deregister_image(
    ImageId='string',
    DryRun=True|False
)
Parameters
  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

deregister_instance_event_notification_attributes(**kwargs)

Deregisters tag keys to prevent tags that have the specified tag keys from being included in scheduled event notifications for resources in the Region.

See also: AWS API Documentation

Request Syntax

response = client.deregister_instance_event_notification_attributes(
    DryRun=True|False,
    InstanceTagAttribute={
        'IncludeAllTagsOfInstance': True|False,
        'InstanceTagKeys': [
            'string',
        ]
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTagAttribute (dict) --

    Information about the tag keys to deregister.

    • IncludeAllTagsOfInstance (boolean) --

      Indicates whether to deregister all tag keys in the current Region. Specify false to deregister all tag keys.

    • InstanceTagKeys (list) --

      Information about the tag keys to deregister.

      • (string) --
Return type

dict

Returns

Response Syntax

{
    'InstanceTagAttribute': {
        'InstanceTagKeys': [
            'string',
        ],
        'IncludeAllTagsOfInstance': True|False
    }
}

Response Structure

  • (dict) --

    • InstanceTagAttribute (dict) --

      The resulting set of tag keys.

      • InstanceTagKeys (list) --

        The registered tag keys.

        • (string) --
      • IncludeAllTagsOfInstance (boolean) --

        Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. true indicates that all tag keys in the current Region are registered.

deregister_transit_gateway_multicast_group_members(**kwargs)

Deregisters the specified members (network interfaces) from the transit gateway multicast group.

See also: AWS API Documentation

Request Syntax

response = client.deregister_transit_gateway_multicast_group_members(
    TransitGatewayMulticastDomainId='string',
    GroupIpAddress='string',
    NetworkInterfaceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • GroupIpAddress (string) -- The IP address assigned to the transit gateway multicast group.
  • NetworkInterfaceIds (list) --

    The IDs of the group members' network interfaces.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'DeregisteredMulticastGroupMembers': {
        'TransitGatewayMulticastDomainId': 'string',
        'DeregisteredNetworkInterfaceIds': [
            'string',
        ],
        'GroupIpAddress': 'string'
    }
}

Response Structure

  • (dict) --

    • DeregisteredMulticastGroupMembers (dict) --

      Information about the deregistered members.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • DeregisteredNetworkInterfaceIds (list) --

        The network interface IDs of the deregistered members.

        • (string) --
      • GroupIpAddress (string) --

        The IP address assigned to the transit gateway multicast group.

deregister_transit_gateway_multicast_group_sources(**kwargs)

Deregisters the specified sources (network interfaces) from the transit gateway multicast group.

See also: AWS API Documentation

Request Syntax

response = client.deregister_transit_gateway_multicast_group_sources(
    TransitGatewayMulticastDomainId='string',
    GroupIpAddress='string',
    NetworkInterfaceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • GroupIpAddress (string) -- The IP address assigned to the transit gateway multicast group.
  • NetworkInterfaceIds (list) --

    The IDs of the group sources' network interfaces.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'DeregisteredMulticastGroupSources': {
        'TransitGatewayMulticastDomainId': 'string',
        'DeregisteredNetworkInterfaceIds': [
            'string',
        ],
        'GroupIpAddress': 'string'
    }
}

Response Structure

  • (dict) --

    • DeregisteredMulticastGroupSources (dict) --

      Information about the deregistered group sources.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • DeregisteredNetworkInterfaceIds (list) --

        The network interface IDs of the non-registered members.

        • (string) --
      • GroupIpAddress (string) --

        The IP address assigned to the transit gateway multicast group.

describe_account_attributes(**kwargs)

Describes attributes of your Amazon Web Services account. The following are the supported account attributes:

  • supported-platforms : Indicates whether your account can launch instances into EC2-Classic and EC2-VPC, or only into EC2-VPC.
  • default-vpc : The ID of the default VPC for your account, or none .
  • max-instances : This attribute is no longer supported. The returned value does not reflect your actual vCPU limit for running On-Demand Instances. For more information, see On-Demand Instance Limits in the Amazon Elastic Compute Cloud User Guide .
  • vpc-max-security-groups-per-interface : The maximum number of security groups that you can assign to a network interface.
  • max-elastic-ips : The maximum number of Elastic IP addresses that you can allocate for use with EC2-Classic.
  • vpc-max-elastic-ips : The maximum number of Elastic IP addresses that you can allocate for use with EC2-VPC.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_account_attributes(
    AttributeNames=[
        'supported-platforms'|'default-vpc',
    ],
    DryRun=True|False
)
Parameters
  • AttributeNames (list) --

    The account attribute names.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AccountAttributes': [
        {
            'AttributeName': 'string',
            'AttributeValues': [
                {
                    'AttributeValue': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • AccountAttributes (list) --

      Information about the account attributes.

      • (dict) --

        Describes an account attribute.

        • AttributeName (string) --

          The name of the account attribute.

        • AttributeValues (list) --

          The values for the account attribute.

          • (dict) --

            Describes a value of an account attribute.

            • AttributeValue (string) --

              The value of the attribute.

Examples

This example describes the supported-platforms attribute for your AWS account.

response = client.describe_account_attributes(
    AttributeNames=[
        'supported-platforms',
    ],
)

print(response)

Expected Output:

{
    'AccountAttributes': [
        {
            'AttributeName': 'supported-platforms',
            'AttributeValues': [
                {
                    'AttributeValue': 'EC2',
                },
                {
                    'AttributeValue': 'VPC',
                },
            ],
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the attributes for your AWS account.

response = client.describe_account_attributes(
)

print(response)

Expected Output:

{
    'AccountAttributes': [
        {
            'AttributeName': 'supported-platforms',
            'AttributeValues': [
                {
                    'AttributeValue': 'EC2',
                },
                {
                    'AttributeValue': 'VPC',
                },
            ],
        },
        {
            'AttributeName': 'vpc-max-security-groups-per-interface',
            'AttributeValues': [
                {
                    'AttributeValue': '5',
                },
            ],
        },
        {
            'AttributeName': 'max-elastic-ips',
            'AttributeValues': [
                {
                    'AttributeValue': '5',
                },
            ],
        },
        {
            'AttributeName': 'max-instances',
            'AttributeValues': [
                {
                    'AttributeValue': '20',
                },
            ],
        },
        {
            'AttributeName': 'vpc-max-elastic-ips',
            'AttributeValues': [
                {
                    'AttributeValue': '5',
                },
            ],
        },
        {
            'AttributeName': 'default-vpc',
            'AttributeValues': [
                {
                    'AttributeValue': 'none',
                },
            ],
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_addresses(**kwargs)

Describes the specified Elastic IP addresses or all of your Elastic IP addresses.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_addresses(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PublicIps=[
        'string',
    ],
    AllocationIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • allocation-id - [EC2-VPC] The allocation ID for the address.
    • association-id - [EC2-VPC] The association ID for the address.
    • domain - Indicates whether the address is for use in EC2-Classic (standard ) or in a VPC (vpc ).
    • instance-id - The ID of the instance the address is associated with, if any.
    • network-border-group - A unique set of Availability Zones, Local Zones, or Wavelength Zones from where Amazon Web Services advertises IP addresses.
    • network-interface-id - [EC2-VPC] The ID of the network interface that the address is associated with, if any.
    • network-interface-owner-id - The Amazon Web Services account ID of the owner.
    • private-ip-address - [EC2-VPC] The private IP address associated with the Elastic IP address.
    • public-ip - The Elastic IP address, or the carrier IP address.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PublicIps (list) --

    One or more Elastic IP addresses.

    Default: Describes all your Elastic IP addresses.

    • (string) --
  • AllocationIds (list) --

    [EC2-VPC] Information about the allocation IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Addresses': [
        {
            'InstanceId': 'string',
            'PublicIp': 'string',
            'AllocationId': 'string',
            'AssociationId': 'string',
            'Domain': 'vpc'|'standard',
            'NetworkInterfaceId': 'string',
            'NetworkInterfaceOwnerId': 'string',
            'PrivateIpAddress': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'PublicIpv4Pool': 'string',
            'NetworkBorderGroup': 'string',
            'CustomerOwnedIp': 'string',
            'CustomerOwnedIpv4Pool': 'string',
            'CarrierIp': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Addresses (list) --

      Information about the Elastic IP addresses.

      • (dict) --

        Describes an Elastic IP address, or a carrier IP address.

        • InstanceId (string) --

          The ID of the instance that the address is associated with (if any).

        • PublicIp (string) --

          The Elastic IP address.

        • AllocationId (string) --

          The ID representing the allocation of the address for use with EC2-VPC.

        • AssociationId (string) --

          The ID representing the association of the address with an instance in a VPC.

        • Domain (string) --

          Indicates whether this Elastic IP address is for use with instances in EC2-Classic (standard ) or instances in a VPC (vpc ).

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • NetworkInterfaceOwnerId (string) --

          The ID of the Amazon Web Services account that owns the network interface.

        • PrivateIpAddress (string) --

          The private IP address associated with the Elastic IP address.

        • Tags (list) --

          Any tags assigned to the Elastic IP address.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • PublicIpv4Pool (string) --

          The ID of an address pool.

        • NetworkBorderGroup (string) --

          The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

        • CustomerOwnedIp (string) --

          The customer-owned IP address.

        • CustomerOwnedIpv4Pool (string) --

          The ID of the customer-owned address pool.

        • CarrierIp (string) --

          The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance).

Examples

This example describes your Elastic IP addresses.

response = client.describe_addresses(
)

print(response)

Expected Output:

{
    'Addresses': [
        {
            'Domain': 'standard',
            'InstanceId': 'i-1234567890abcdef0',
            'PublicIp': '198.51.100.0',
        },
        {
            'AllocationId': 'eipalloc-12345678',
            'AssociationId': 'eipassoc-12345678',
            'Domain': 'vpc',
            'InstanceId': 'i-1234567890abcdef0',
            'NetworkInterfaceId': 'eni-12345678',
            'NetworkInterfaceOwnerId': '123456789012',
            'PrivateIpAddress': '10.0.1.241',
            'PublicIp': '203.0.113.0',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes your Elastic IP addresses for use with instances in a VPC.

response = client.describe_addresses(
    Filters=[
        {
            'Name': 'domain',
            'Values': [
                'vpc',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'Addresses': [
        {
            'AllocationId': 'eipalloc-12345678',
            'AssociationId': 'eipassoc-12345678',
            'Domain': 'vpc',
            'InstanceId': 'i-1234567890abcdef0',
            'NetworkInterfaceId': 'eni-12345678',
            'NetworkInterfaceOwnerId': '123456789012',
            'PrivateIpAddress': '10.0.1.241',
            'PublicIp': '203.0.113.0',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes your Elastic IP addresses for use with instances in EC2-Classic.

response = client.describe_addresses(
    Filters=[
        {
            'Name': 'domain',
            'Values': [
                'standard',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'Addresses': [
        {
            'Domain': 'standard',
            'InstanceId': 'i-1234567890abcdef0',
            'PublicIp': '198.51.100.0',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_addresses_attribute(**kwargs)

Describes the attributes of the specified Elastic IP addresses. For requirements, see Using reverse DNS for email applications .

See also: AWS API Documentation

Request Syntax

response = client.describe_addresses_attribute(
    AllocationIds=[
        'string',
    ],
    Attribute='domain-name',
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters
  • AllocationIds (list) --

    [EC2-VPC] The allocation IDs.

    • (string) --
  • Attribute (string) -- The attribute of the IP address.
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Addresses': [
        {
            'PublicIp': 'string',
            'AllocationId': 'string',
            'PtrRecord': 'string',
            'PtrRecordUpdate': {
                'Value': 'string',
                'Status': 'string',
                'Reason': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Addresses (list) --

      Information about the IP addresses.

      • (dict) --

        The attributes associated with an Elastic IP address.

        • PublicIp (string) --

          The public IP address.

        • AllocationId (string) --

          [EC2-VPC] The allocation ID.

        • PtrRecord (string) --

          The pointer (PTR) record for the IP address.

        • PtrRecordUpdate (dict) --

          The updated PTR record for the IP address.

          • Value (string) --

            The value for the PTR record update.

          • Status (string) --

            The status of the PTR record update.

          • Reason (string) --

            The reason for the PTR record update.

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

describe_aggregate_id_format(**kwargs)

Describes the longer ID format settings for all resource types in a specific Region. This request is useful for performing a quick audit to determine whether a specific Region is fully opted in for longer IDs (17-character IDs).

This request only returns information about resource types that support longer IDs.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

See also: AWS API Documentation

Request Syntax

response = client.describe_aggregate_id_format(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'UseLongIdsAggregated': True|False,
    'Statuses': [
        {
            'Deadline': datetime(2015, 1, 1),
            'Resource': 'string',
            'UseLongIds': True|False
        },
    ]
}

Response Structure

  • (dict) --
    • UseLongIdsAggregated (boolean) --

      Indicates whether all resource types in the Region are configured to use longer IDs. This value is only true if all users are configured to use longer IDs for all resources types in the Region.

    • Statuses (list) --

      Information about each resource's ID format.

      • (dict) --

        Describes the ID format for a resource.

        • Deadline (datetime) --

          The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

        • Resource (string) --

          The type of resource.

        • UseLongIds (boolean) --

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

describe_availability_zones(**kwargs)

Describes the Availability Zones, Local Zones, and Wavelength Zones that are available to you. If there is an event impacting a zone, you can use this request to view the state and any provided messages for that zone.

For more information about Availability Zones, Local Zones, and Wavelength Zones, see Regions and zones in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_availability_zones(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ZoneNames=[
        'string',
    ],
    ZoneIds=[
        'string',
    ],
    AllAvailabilityZones=True|False,
    DryRun=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • group-name - For Availability Zones, use the Region name. For Local Zones, use the name of the group associated with the Local Zone (for example, us-west-2-lax-1 ) For Wavelength Zones, use the name of the group associated with the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1 ).
    • message - The Zone message.
    • opt-in-status - The opt-in status (opted-in , and not-opted-in | opt-in-not-required ).
    • parent-zoneID - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.
    • parent-zoneName - The ID of the zone that handles some of the Local Zone and Wavelength Zone control plane operations, such as API calls.
    • region-name - The name of the Region for the Zone (for example, us-east-1 ).
    • state - The state of the Availability Zone, the Local Zone, or the Wavelength Zone (available ).
    • zone-id - The ID of the Availability Zone (for example, use1-az1 ), the Local Zone (for example, usw2-lax1-az1 ), or the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1 ).
    • zone-type - The type of zone, for example, local-zone .
    • zone-name - The name of the Availability Zone (for example, us-east-1a ), the Local Zone (for example, us-west-2-lax-1a ), or the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1 ).
    • zone-type - The type of zone, for example, local-zone .
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ZoneNames (list) --

    The names of the Availability Zones, Local Zones, and Wavelength Zones.

    • (string) --
  • ZoneIds (list) --

    The IDs of the Availability Zones, Local Zones, and Wavelength Zones.

    • (string) --
  • AllAvailabilityZones (boolean) --

    Include all Availability Zones, Local Zones, and Wavelength Zones regardless of your opt-in status.

    If you do not use this parameter, the results include only the zones for the Regions where you have chosen the option to opt in.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AvailabilityZones': [
        {
            'State': 'available'|'information'|'impaired'|'unavailable',
            'OptInStatus': 'opt-in-not-required'|'opted-in'|'not-opted-in',
            'Messages': [
                {
                    'Message': 'string'
                },
            ],
            'RegionName': 'string',
            'ZoneName': 'string',
            'ZoneId': 'string',
            'GroupName': 'string',
            'NetworkBorderGroup': 'string',
            'ZoneType': 'string',
            'ParentZoneName': 'string',
            'ParentZoneId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • AvailabilityZones (list) --

      Information about the Availability Zones, Local Zones, and Wavelength Zones.

      • (dict) --

        Describes Availability Zones, Local Zones, and Wavelength Zones.

        • State (string) --

          The state of the Availability Zone, Local Zone, or Wavelength Zone. This value is always available .

        • OptInStatus (string) --

          For Availability Zones, this parameter always has the value of opt-in-not-required .

          For Local Zones and Wavelength Zones, this parameter is the opt-in status. The possible values are opted-in , and not-opted-in .

        • Messages (list) --

          Any messages about the Availability Zone, Local Zone, or Wavelength Zone.

          • (dict) --

            Describes a message about an Availability Zone, Local Zone, or Wavelength Zone.

            • Message (string) --

              The message about the Availability Zone, Local Zone, or Wavelength Zone.

        • RegionName (string) --

          The name of the Region.

        • ZoneName (string) --

          The name of the Availability Zone, Local Zone, or Wavelength Zone.

        • ZoneId (string) --

          The ID of the Availability Zone, Local Zone, or Wavelength Zone.

        • GroupName (string) --

          For Availability Zones, this parameter has the same value as the Region name.

          For Local Zones, the name of the associated group, for example us-west-2-lax-1 .

          For Wavelength Zones, the name of the associated group, for example us-east-1-wl1-bos-wlz-1 .

        • NetworkBorderGroup (string) --

          The name of the network border group.

        • ZoneType (string) --

          The type of zone. The valid values are availability-zone , local-zone , and wavelength-zone .

        • ParentZoneName (string) --

          The name of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

        • ParentZoneId (string) --

          The ID of the zone that handles some of the Local Zone or Wavelength Zone control plane operations, such as API calls.

Examples

This example describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region.

response = client.describe_availability_zones(
)

print(response)

Expected Output:

{
    'AvailabilityZones': [
        {
            'Messages': [
            ],
            'RegionName': 'us-east-1',
            'State': 'available',
            'ZoneName': 'us-east-1b',
        },
        {
            'Messages': [
            ],
            'RegionName': 'us-east-1',
            'State': 'available',
            'ZoneName': 'us-east-1c',
        },
        {
            'Messages': [
            ],
            'RegionName': 'us-east-1',
            'State': 'available',
            'ZoneName': 'us-east-1d',
        },
        {
            'Messages': [
            ],
            'RegionName': 'us-east-1',
            'State': 'available',
            'ZoneName': 'us-east-1e',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_bundle_tasks(**kwargs)

Describes the specified bundle tasks or all of your bundle tasks.

Note

Completed bundle tasks are listed for only a limited time. If your bundle task is no longer in the list, you can still register an AMI from it. Just use RegisterImage with the Amazon S3 bucket name and image manifest name you provided to the bundle task.

See also: AWS API Documentation

Request Syntax

response = client.describe_bundle_tasks(
    BundleIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • BundleIds (list) --

    The bundle task IDs.

    Default: Describes all your bundle tasks.

    • (string) --
  • Filters (list) --

    The filters.

    • bundle-id - The ID of the bundle task.
    • error-code - If the task failed, the error code returned.
    • error-message - If the task failed, the error message returned.
    • instance-id - The ID of the instance.
    • progress - The level of task completion, as a percentage (for example, 20%).
    • s3-bucket - The Amazon S3 bucket to store the AMI.
    • s3-prefix - The beginning of the AMI name.
    • start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z).
    • state - The state of the task (pending | waiting-for-shutdown | bundling | storing | cancelling | complete | failed ).
    • update-time - The time of the most recent update for the task.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'BundleTasks': [
        {
            'BundleId': 'string',
            'BundleTaskError': {
                'Code': 'string',
                'Message': 'string'
            },
            'InstanceId': 'string',
            'Progress': 'string',
            'StartTime': datetime(2015, 1, 1),
            'State': 'pending'|'waiting-for-shutdown'|'bundling'|'storing'|'cancelling'|'complete'|'failed',
            'Storage': {
                'S3': {
                    'AWSAccessKeyId': 'string',
                    'Bucket': 'string',
                    'Prefix': 'string',
                    'UploadPolicy': b'bytes',
                    'UploadPolicySignature': 'string'
                }
            },
            'UpdateTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • BundleTasks (list) --

      Information about the bundle tasks.

      • (dict) --

        Describes a bundle task.

        • BundleId (string) --

          The ID of the bundle task.

        • BundleTaskError (dict) --

          If the task fails, a description of the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message.

        • InstanceId (string) --

          The ID of the instance associated with this bundle task.

        • Progress (string) --

          The level of task completion, as a percent (for example, 20%).

        • StartTime (datetime) --

          The time this task started.

        • State (string) --

          The state of the task.

        • Storage (dict) --

          The Amazon S3 storage locations.

          • S3 (dict) --

            An Amazon S3 storage location.

            • AWSAccessKeyId (string) --

              The access key ID of the owner of the bucket. Before you specify a value for your access key ID, review and follow the guidance in Best Practices for Managing Amazon Web Services Access Keys .

            • Bucket (string) --

              The bucket in which to store the AMI. You can specify a bucket that you already own or a new bucket that Amazon EC2 creates on your behalf. If you specify a bucket that belongs to someone else, Amazon EC2 returns an error.

            • Prefix (string) --

              The beginning of the file name of the AMI.

            • UploadPolicy (bytes) --

              An Amazon S3 upload policy that gives Amazon EC2 permission to upload items into Amazon S3 on your behalf.

            • UploadPolicySignature (string) --

              The signature of the JSON document.

        • UpdateTime (datetime) --

          The time of the most recent update for the task.

describe_byoip_cidrs(**kwargs)

Describes the IP address ranges that were specified in calls to ProvisionByoipCidr .

To describe the address pools that were created when you provisioned the address ranges, use DescribePublicIpv4Pools or DescribeIpv6Pools .

See also: AWS API Documentation

Request Syntax

response = client.describe_byoip_cidrs(
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) --

    [REQUIRED]

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'ByoipCidrs': [
        {
            'Cidr': 'string',
            'Description': 'string',
            'StatusMessage': 'string',
            'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ByoipCidrs (list) --

      Information about your address ranges.

      • (dict) --

        Information about an address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP).

        • Cidr (string) --

          The address range, in CIDR notation.

        • Description (string) --

          The description of the address range.

        • StatusMessage (string) --

          Upon success, contains the ID of the address pool. Otherwise, contains an error message.

        • State (string) --

          The state of the address pool.

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

describe_capacity_reservation_fleets(**kwargs)

Describes one or more Capacity Reservation Fleets.

See also: AWS API Documentation

Request Syntax

response = client.describe_capacity_reservation_fleets(
    CapacityReservationFleetIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • CapacityReservationFleetIds (list) --

    The IDs of the Capacity Reservation Fleets to describe.

    • (string) --
  • NextToken (string) -- The token to use to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.
  • Filters (list) --

    One or more filters.

    • state - The state of the Fleet (submitted | modifying | active | partially_fulfilled | expiring | expired | cancelling | cancelled | failed ).
    • instance-match-criteria - The instance matching criteria for the Fleet. Only open is supported.
    • tenancy - The tenancy of the Fleet (default | dedicated ).
    • allocation-strategy - The allocation strategy used by the Fleet. Only prioritized is supported.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CapacityReservationFleets': [
        {
            'CapacityReservationFleetId': 'string',
            'CapacityReservationFleetArn': 'string',
            'State': 'submitted'|'modifying'|'active'|'partially_fulfilled'|'expiring'|'expired'|'cancelling'|'cancelled'|'failed',
            'TotalTargetCapacity': 123,
            'TotalFulfilledCapacity': 123.0,
            'Tenancy': 'default',
            'EndDate': datetime(2015, 1, 1),
            'CreateTime': datetime(2015, 1, 1),
            'InstanceMatchCriteria': 'open',
            'AllocationStrategy': 'string',
            'InstanceTypeSpecifications': [
                {
                    'CapacityReservationId': 'string',
                    'AvailabilityZoneId': 'string',
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'InstancePlatform': 'Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
                    'AvailabilityZone': 'string',
                    'TotalInstanceCount': 123,
                    'FulfilledCapacity': 123.0,
                    'EbsOptimized': True|False,
                    'CreateDate': datetime(2015, 1, 1),
                    'Weight': 123.0,
                    'Priority': 123
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • CapacityReservationFleets (list) --

      Information about the Capacity Reservation Fleets.

      • (dict) --

        Information about a Capacity Reservation Fleet.

        • CapacityReservationFleetId (string) --

          The ID of the Capacity Reservation Fleet.

        • CapacityReservationFleetArn (string) --

          The ARN of the Capacity Reservation Fleet.

        • State (string) --

          The state of the Capacity Reservation Fleet. Possible states include:

          • submitted - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.
          • modifying - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.
          • active - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.
          • partially_fulfilled - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.
          • expiring - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.
          • expired - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.
          • cancelling - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.
          • cancelled - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.
          • failed - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.
        • TotalTargetCapacity (integer) --

          The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see Total target capacity in the Amazon EC2 User Guide.

        • TotalFulfilledCapacity (float) --

          The capacity units that have been fulfilled.

        • Tenancy (string) --

          The tenancy of the Capacity Reservation Fleet. Tenancies include:

          • default - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.
          • dedicated - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
        • EndDate (datetime) --

          The date and time at which the Capacity Reservation Fleet expires.

        • CreateTime (datetime) --

          The date and time at which the Capacity Reservation Fleet was created.

        • InstanceMatchCriteria (string) --

          Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.

          Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.

        • AllocationStrategy (string) --

          The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see Allocation strategy in the Amazon EC2 User Guide.

        • InstanceTypeSpecifications (list) --

          Information about the instance types for which to reserve the capacity.

          • (dict) --

            Information about a Capacity Reservation in a Capacity Reservation Fleet.

            • CapacityReservationId (string) --

              The ID of the Capacity Reservation.

            • AvailabilityZoneId (string) --

              The ID of the Availability Zone in which the Capacity Reservation reserves capacity.

            • InstanceType (string) --

              The instance type for which the Capacity Reservation reserves capacity.

            • InstancePlatform (string) --

              The type of operating system for which the Capacity Reservation reserves capacity.

            • AvailabilityZone (string) --

              The Availability Zone in which the Capacity Reservation reserves capacity.

            • TotalInstanceCount (integer) --

              The total number of instances for which the Capacity Reservation reserves capacity.

            • FulfilledCapacity (float) --

              The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.

            • EbsOptimized (boolean) --

              Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.

            • CreateDate (datetime) --

              The date and time at which the Capacity Reservation was created.

            • Weight (float) --

              The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.

            • Priority (integer) --

              The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.

        • Tags (list) --

          The tags assigned to the Capacity Reservation Fleet.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_capacity_reservations(**kwargs)

Describes one or more of your Capacity Reservations. The results describe only the Capacity Reservations in the Amazon Web Services Region that you're currently using.

See also: AWS API Documentation

Request Syntax

response = client.describe_capacity_reservations(
    CapacityReservationIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • CapacityReservationIds (list) --

    The ID of the Capacity Reservation.

    • (string) --
  • NextToken (string) -- The token to use to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.
  • Filters (list) --

    One or more filters.

    • instance-type - The type of instance for which the Capacity Reservation reserves capacity.
    • owner-id - The ID of the Amazon Web Services account that owns the Capacity Reservation.
    • instance-platform - The type of operating system for which the Capacity Reservation reserves capacity.
    • availability-zone - The Availability Zone of the Capacity Reservation.
    • tenancy - Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
      • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.
      • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.
    • state - The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
      • active - The Capacity Reservation is active and the capacity is available for your use.
      • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
      • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
      • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
      • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
    • start-date - The date and time at which the Capacity Reservation was started.
    • end-date - The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.
    • end-date-type - Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
      • unlimited - The Capacity Reservation remains active until you explicitly cancel it.
      • limited - The Capacity Reservation expires automatically at a specified date and time.
    • instance-match-criteria - Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
      • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.
      • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
    • placement-group-arn - The ARN of the cluster placement group in which the Capacity Reservation was created.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'CapacityReservations': [
        {
            'CapacityReservationId': 'string',
            'OwnerId': 'string',
            'CapacityReservationArn': 'string',
            'AvailabilityZoneId': 'string',
            'InstanceType': 'string',
            'InstancePlatform': 'Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
            'AvailabilityZone': 'string',
            'Tenancy': 'default'|'dedicated',
            'TotalInstanceCount': 123,
            'AvailableInstanceCount': 123,
            'EbsOptimized': True|False,
            'EphemeralStorage': True|False,
            'State': 'active'|'expired'|'cancelled'|'pending'|'failed',
            'StartDate': datetime(2015, 1, 1),
            'EndDate': datetime(2015, 1, 1),
            'EndDateType': 'unlimited'|'limited',
            'InstanceMatchCriteria': 'open'|'targeted',
            'CreateDate': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'OutpostArn': 'string',
            'CapacityReservationFleetId': 'string',
            'PlacementGroupArn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

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

    • CapacityReservations (list) --

      Information about the Capacity Reservations.

      • (dict) --

        Describes a Capacity Reservation.

        • CapacityReservationId (string) --

          The ID of the Capacity Reservation.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the Capacity Reservation.

        • CapacityReservationArn (string) --

          The Amazon Resource Name (ARN) of the Capacity Reservation.

        • AvailabilityZoneId (string) --

          The Availability Zone ID of the Capacity Reservation.

        • InstanceType (string) --

          The type of instance for which the Capacity Reservation reserves capacity.

        • InstancePlatform (string) --

          The type of operating system for which the Capacity Reservation reserves capacity.

        • AvailabilityZone (string) --

          The Availability Zone in which the capacity is reserved.

        • Tenancy (string) --

          Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

          • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.
          • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
        • TotalInstanceCount (integer) --

          The total number of instances for which the Capacity Reservation reserves capacity.

        • AvailableInstanceCount (integer) --

          The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

        • EbsOptimized (boolean) --

          Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

        • EphemeralStorage (boolean) --

          Deprecated.

        • State (string) --

          The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

          • active - The Capacity Reservation is active and the capacity is available for your use.
          • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
          • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
          • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
          • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
        • StartDate (datetime) --

          The date and time at which the Capacity Reservation was started.

        • EndDate (datetime) --

          The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

        • EndDateType (string) --

          Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

          • unlimited - The Capacity Reservation remains active until you explicitly cancel it.
          • limited - The Capacity Reservation expires automatically at a specified date and time.
        • InstanceMatchCriteria (string) --

          Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

          • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.
          • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
        • CreateDate (datetime) --

          The date and time at which the Capacity Reservation was created.

        • Tags (list) --

          Any tags assigned to the Capacity Reservation.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

        • CapacityReservationFleetId (string) --

          The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.

        • PlacementGroupArn (string) --

          The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .

describe_carrier_gateways(**kwargs)

Describes one or more of your carrier gateways.

See also: AWS API Documentation

Request Syntax

response = client.describe_carrier_gateways(
    CarrierGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • CarrierGatewayIds (list) --

    One or more carrier gateway IDs.

    • (string) --
  • Filters (list) --

    One or more filters.

    • carrier-gateway-id - The ID of the carrier gateway.
    • state - The state of the carrier gateway (pending | failed | available | deleting | deleted ).
    • owner-id - The Amazon Web Services account ID of the owner of the carrier gateway.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC associated with the carrier gateway.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CarrierGateways': [
        {
            'CarrierGatewayId': 'string',
            'VpcId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • CarrierGateways (list) --

      Information about the carrier gateway.

      • (dict) --

        Describes a carrier gateway.

        • CarrierGatewayId (string) --

          The ID of the carrier gateway.

        • VpcId (string) --

          The ID of the VPC associated with the carrier gateway.

        • State (string) --

          The state of the carrier gateway.

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the carrier gateway.

        • Tags (list) --

          The tags assigned to the carrier gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

Describes one or more of your linked EC2-Classic instances. This request only returns information about EC2-Classic instances linked to a VPC through ClassicLink. You cannot use this request to return information about other instances.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_classic_link_instances(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    InstanceIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    One or more filters.

    • group-id - The ID of a VPC security group that's associated with the instance.
    • instance-id - The ID of the instance.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC to which the instance is linked. vpc-id - The ID of the VPC that the instance is linked to.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceIds (list) --

    One or more instance IDs. Must be instances linked to a VPC through ClassicLink.

    • (string) --
  • MaxResults (integer) --

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    Constraint: If the value is greater than 1000, we return only 1000 items.

  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'Instances': [
        {
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'InstanceId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Instances (list) --

      Information about one or more linked EC2-Classic instances.

      • (dict) --

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        Describes a linked EC2-Classic instance.

        • Groups (list) --

          A list of security groups.

          • (dict) --

            Describes a security group.

            • GroupName (string) --

              The name of the security group.

            • GroupId (string) --

              The ID of the security group.

        • InstanceId (string) --

          The ID of the instance.

        • Tags (list) --

          Any tags assigned to the instance.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VpcId (string) --

          The ID of the VPC.

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

describe_client_vpn_authorization_rules(**kwargs)

Describes the authorization rules for a specified Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.describe_client_vpn_authorization_rules(
    ClientVpnEndpointId='string',
    DryRun=True|False,
    NextToken='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token to retrieve the next page of results.
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • description - The description of the authorization rule.
    • destination-cidr - The CIDR of the network to which the authorization rule applies.
    • group-id - The ID of the Active Directory group to which the authorization rule grants access.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.
Return type

dict

Returns

Response Syntax

{
    'AuthorizationRules': [
        {
            'ClientVpnEndpointId': 'string',
            'Description': 'string',
            'GroupId': 'string',
            'AccessAll': True|False,
            'DestinationCidr': 'string',
            'Status': {
                'Code': 'authorizing'|'active'|'failed'|'revoking',
                'Message': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AuthorizationRules (list) --

      Information about the authorization rules.

      • (dict) --

        Information about an authorization rule.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint with which the authorization rule is associated.

        • Description (string) --

          A brief description of the authorization rule.

        • GroupId (string) --

          The ID of the Active Directory group to which the authorization rule grants access.

        • AccessAll (boolean) --

          Indicates whether the authorization rule grants access to all clients.

        • DestinationCidr (string) --

          The IPv4 address range, in CIDR notation, of the network to which the authorization rule applies.

        • Status (dict) --

          The current state of the authorization rule.

          • Code (string) --

            The state of the authorization rule.

          • Message (string) --

            A message about the status of the authorization rule, if applicable.

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

describe_client_vpn_connections(**kwargs)

Describes active client connections and connections that have been terminated within the last 60 minutes for the specified Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.describe_client_vpn_connections(
    ClientVpnEndpointId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • connection-id - The ID of the connection.
    • username - For Active Directory client authentication, the user name of the client who established the client connection.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Connections': [
        {
            'ClientVpnEndpointId': 'string',
            'Timestamp': 'string',
            'ConnectionId': 'string',
            'Username': 'string',
            'ConnectionEstablishedTime': 'string',
            'IngressBytes': 'string',
            'EgressBytes': 'string',
            'IngressPackets': 'string',
            'EgressPackets': 'string',
            'ClientIp': 'string',
            'CommonName': 'string',
            'Status': {
                'Code': 'active'|'failed-to-terminate'|'terminating'|'terminated',
                'Message': 'string'
            },
            'ConnectionEndTime': 'string',
            'PostureComplianceStatuses': [
                'string',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Connections (list) --

      Information about the active and terminated client connections.

      • (dict) --

        Describes a client connection.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint to which the client is connected.

        • Timestamp (string) --

          The current date and time.

        • ConnectionId (string) --

          The ID of the client connection.

        • Username (string) --

          The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.

        • ConnectionEstablishedTime (string) --

          The date and time the client connection was established.

        • IngressBytes (string) --

          The number of bytes sent by the client.

        • EgressBytes (string) --

          The number of bytes received by the client.

        • IngressPackets (string) --

          The number of packets sent by the client.

        • EgressPackets (string) --

          The number of packets received by the client.

        • ClientIp (string) --

          The IP address of the client.

        • CommonName (string) --

          The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.

        • Status (dict) --

          The current state of the client connection.

          • Code (string) --

            The state of the client connection.

          • Message (string) --

            A message about the status of the client connection, if applicable.

        • ConnectionEndTime (string) --

          The date and time the client connection was terminated.

        • PostureComplianceStatuses (list) --

          The statuses returned by the client connect handler for posture compliance, if applicable.

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

describe_client_vpn_endpoints(**kwargs)

Describes one or more Client VPN endpoints in the account.

See also: AWS API Documentation

Request Syntax

response = client.describe_client_vpn_endpoints(
    ClientVpnEndpointIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointIds (list) --

    The ID of the Client VPN endpoint.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.
  • NextToken (string) -- The token to retrieve the next page of results.
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • endpoint-id - The ID of the Client VPN endpoint.
    • transport-protocol - The transport protocol (tcp | udp ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ClientVpnEndpoints': [
        {
            'ClientVpnEndpointId': 'string',
            'Description': 'string',
            'Status': {
                'Code': 'pending-associate'|'available'|'deleting'|'deleted',
                'Message': 'string'
            },
            'CreationTime': 'string',
            'DeletionTime': 'string',
            'DnsName': 'string',
            'ClientCidrBlock': 'string',
            'DnsServers': [
                'string',
            ],
            'SplitTunnel': True|False,
            'VpnProtocol': 'openvpn',
            'TransportProtocol': 'tcp'|'udp',
            'VpnPort': 123,
            'AssociatedTargetNetworks': [
                {
                    'NetworkId': 'string',
                    'NetworkType': 'vpc'
                },
            ],
            'ServerCertificateArn': 'string',
            'AuthenticationOptions': [
                {
                    'Type': 'certificate-authentication'|'directory-service-authentication'|'federated-authentication',
                    'ActiveDirectory': {
                        'DirectoryId': 'string'
                    },
                    'MutualAuthentication': {
                        'ClientRootCertificateChain': 'string'
                    },
                    'FederatedAuthentication': {
                        'SamlProviderArn': 'string',
                        'SelfServiceSamlProviderArn': 'string'
                    }
                },
            ],
            'ConnectionLogOptions': {
                'Enabled': True|False,
                'CloudwatchLogGroup': 'string',
                'CloudwatchLogStream': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'SecurityGroupIds': [
                'string',
            ],
            'VpcId': 'string',
            'SelfServicePortalUrl': 'string',
            'ClientConnectOptions': {
                'Enabled': True|False,
                'LambdaFunctionArn': 'string',
                'Status': {
                    'Code': 'applying'|'applied',
                    'Message': 'string'
                }
            },
            'SessionTimeoutHours': 123,
            'ClientLoginBannerOptions': {
                'Enabled': True|False,
                'BannerText': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ClientVpnEndpoints (list) --

      Information about the Client VPN endpoints.

      • (dict) --

        Describes a Client VPN endpoint.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint.

        • Description (string) --

          A brief description of the endpoint.

        • Status (dict) --

          The current state of the Client VPN endpoint.

          • Code (string) --

            The state of the Client VPN endpoint. Possible states include:

            • pending-associate - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.
            • available - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.
            • deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.
            • deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.
          • Message (string) --

            A message about the status of the Client VPN endpoint.

        • CreationTime (string) --

          The date and time the Client VPN endpoint was created.

        • DeletionTime (string) --

          The date and time the Client VPN endpoint was deleted, if applicable.

        • DnsName (string) --

          The DNS name to be used by clients when connecting to the Client VPN endpoint.

        • ClientCidrBlock (string) --

          The IPv4 address range, in CIDR notation, from which client IP addresses are assigned.

        • DnsServers (list) --

          Information about the DNS servers to be used for DNS resolution.

          • (string) --
        • SplitTunnel (boolean) --

          Indicates whether split-tunnel is enabled in the Client VPN endpoint.

          For information about split-tunnel VPN endpoints, see Split-Tunnel Client VPN endpoint in the Client VPN Administrator Guide .

        • VpnProtocol (string) --

          The protocol used by the VPN session.

        • TransportProtocol (string) --

          The transport protocol used by the Client VPN endpoint.

        • VpnPort (integer) --

          The port number for the Client VPN endpoint.

        • AssociatedTargetNetworks (list) --

          Information about the associated target networks. A target network is a subnet in a VPC.

          • (dict) --

            Describes a target network that is associated with a Client VPN endpoint. A target network is a subnet in a VPC.

            • NetworkId (string) --

              The ID of the subnet.

            • NetworkType (string) --

              The target network type.

        • ServerCertificateArn (string) --

          The ARN of the server certificate.

        • AuthenticationOptions (list) --

          Information about the authentication method used by the Client VPN endpoint.

          • (dict) --

            Describes the authentication methods used by a Client VPN endpoint. For more information, see Authentication in the Client VPN Administrator Guide .

            • Type (string) --

              The authentication type used.

            • ActiveDirectory (dict) --

              Information about the Active Directory, if applicable.

              • DirectoryId (string) --

                The ID of the Active Directory used for authentication.

            • MutualAuthentication (dict) --

              Information about the authentication certificates, if applicable.

              • ClientRootCertificateChain (string) --

                The ARN of the client certificate.

            • FederatedAuthentication (dict) --

              Information about the IAM SAML identity provider, if applicable.

              • SamlProviderArn (string) --

                The Amazon Resource Name (ARN) of the IAM SAML identity provider.

              • SelfServiceSamlProviderArn (string) --

                The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.

        • ConnectionLogOptions (dict) --

          Information about the client connection logging options for the Client VPN endpoint.

          • Enabled (boolean) --

            Indicates whether client connection logging is enabled for the Client VPN endpoint.

          • CloudwatchLogGroup (string) --

            The name of the Amazon CloudWatch Logs log group to which connection logging data is published.

          • CloudwatchLogStream (string) --

            The name of the Amazon CloudWatch Logs log stream to which connection logging data is published.

        • Tags (list) --

          Any tags assigned to the Client VPN endpoint.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • SecurityGroupIds (list) --

          The IDs of the security groups for the target network.

          • (string) --
        • VpcId (string) --

          The ID of the VPC.

        • SelfServicePortalUrl (string) --

          The URL of the self-service portal.

        • ClientConnectOptions (dict) --

          The options for managing connection authorization for new client connections.

          • Enabled (boolean) --

            Indicates whether client connect options are enabled.

          • LambdaFunctionArn (string) --

            The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.

          • Status (dict) --

            The status of any updates to the client connect options.

            • Code (string) --

              The status code.

            • Message (string) --

              The status message.

        • SessionTimeoutHours (integer) --

          The maximum VPN session duration time in hours.

          Valid values: 8 | 10 | 12 | 24

          Default value: 24

        • ClientLoginBannerOptions (dict) --

          Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

          • Enabled (boolean) --

            Current state of text banner feature.

            Valid values: true | false

          • BannerText (string) --

            Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.

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

describe_client_vpn_routes(**kwargs)

Describes the routes for the specified Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.describe_client_vpn_routes(
    ClientVpnEndpointId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • destination-cidr - The CIDR of the route destination.
    • origin - How the route was associated with the Client VPN endpoint (associate | add-route ).
    • target-subnet - The ID of the subnet through which traffic is routed.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.
  • NextToken (string) -- The token to retrieve the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Routes': [
        {
            'ClientVpnEndpointId': 'string',
            'DestinationCidr': 'string',
            'TargetSubnet': 'string',
            'Type': 'string',
            'Origin': 'string',
            'Status': {
                'Code': 'creating'|'active'|'failed'|'deleting',
                'Message': 'string'
            },
            'Description': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Routes (list) --

      Information about the Client VPN endpoint routes.

      • (dict) --

        Information about a Client VPN endpoint route.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint with which the route is associated.

        • DestinationCidr (string) --

          The IPv4 address range, in CIDR notation, of the route destination.

        • TargetSubnet (string) --

          The ID of the subnet through which traffic is routed.

        • Type (string) --

          The route type.

        • Origin (string) --

          Indicates how the route was associated with the Client VPN endpoint. associate indicates that the route was automatically added when the target network was associated with the Client VPN endpoint. add-route indicates that the route was manually added using the CreateClientVpnRoute action.

        • Status (dict) --

          The current state of the route.

          • Code (string) --

            The state of the Client VPN endpoint route.

          • Message (string) --

            A message about the status of the Client VPN endpoint route, if applicable.

        • Description (string) --

          A brief description of the route.

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

describe_client_vpn_target_networks(**kwargs)

Describes the target networks associated with the specified Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.describe_client_vpn_target_networks(
    ClientVpnEndpointId='string',
    AssociationIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • AssociationIds (list) --

    The IDs of the target network associations.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the nextToken value.
  • NextToken (string) -- The token to retrieve the next page of results.
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • association-id - The ID of the association.
    • target-network-id - The ID of the subnet specified as the target network.
    • vpc-id - The ID of the VPC in which the target network is located.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ClientVpnTargetNetworks': [
        {
            'AssociationId': 'string',
            'VpcId': 'string',
            'TargetNetworkId': 'string',
            'ClientVpnEndpointId': 'string',
            'Status': {
                'Code': 'associating'|'associated'|'association-failed'|'disassociating'|'disassociated',
                'Message': 'string'
            },
            'SecurityGroups': [
                'string',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ClientVpnTargetNetworks (list) --

      Information about the associated target networks.

      • (dict) --

        Describes a target network associated with a Client VPN endpoint.

        • AssociationId (string) --

          The ID of the association.

        • VpcId (string) --

          The ID of the VPC in which the target network (subnet) is located.

        • TargetNetworkId (string) --

          The ID of the subnet specified as the target network.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint with which the target network is associated.

        • Status (dict) --

          The current state of the target network association.

          • Code (string) --

            The state of the target network association.

          • Message (string) --

            A message about the status of the target network association, if applicable.

        • SecurityGroups (list) --

          The IDs of the security groups applied to the target network association.

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

describe_coip_pools(**kwargs)

Describes the specified customer-owned address pools or all of your customer-owned address pools.

See also: AWS API Documentation

Request Syntax

response = client.describe_coip_pools(
    PoolIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • PoolIds (list) --

    The IDs of the address pools.

    • (string) --
  • Filters (list) --

    One or more filters.

    • coip-pool.local-gateway-route-table-id - The ID of the local gateway route table.
    • coip-pool.pool-id - The ID of the address pool.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CoipPools': [
        {
            'PoolId': 'string',
            'PoolCidrs': [
                'string',
            ],
            'LocalGatewayRouteTableId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'PoolArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • CoipPools (list) --

      Information about the address pools.

      • (dict) --

        Describes a customer-owned address pool.

        • PoolId (string) --

          The ID of the address pool.

        • PoolCidrs (list) --

          The address ranges of the address pool.

          • (string) --
        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • PoolArn (string) --

          The ARN of the address pool.

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

describe_conversion_tasks(**kwargs)

Describes the specified conversion tasks or all your conversion tasks. For more information, see the VM Import/Export User Guide .

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

See also: AWS API Documentation

Request Syntax

response = client.describe_conversion_tasks(
    ConversionTaskIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • ConversionTaskIds (list) --

    The conversion task IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ConversionTasks': [
        {
            'ConversionTaskId': 'string',
            'ExpirationTime': 'string',
            'ImportInstance': {
                'Description': 'string',
                'InstanceId': 'string',
                'Platform': 'Windows',
                'Volumes': [
                    {
                        'AvailabilityZone': 'string',
                        'BytesConverted': 123,
                        'Description': 'string',
                        'Image': {
                            'Checksum': 'string',
                            'Format': 'VMDK'|'RAW'|'VHD',
                            'ImportManifestUrl': 'string',
                            'Size': 123
                        },
                        'Status': 'string',
                        'StatusMessage': 'string',
                        'Volume': {
                            'Id': 'string',
                            'Size': 123
                        }
                    },
                ]
            },
            'ImportVolume': {
                'AvailabilityZone': 'string',
                'BytesConverted': 123,
                'Description': 'string',
                'Image': {
                    'Checksum': 'string',
                    'Format': 'VMDK'|'RAW'|'VHD',
                    'ImportManifestUrl': 'string',
                    'Size': 123
                },
                'Volume': {
                    'Id': 'string',
                    'Size': 123
                }
            },
            'State': 'active'|'cancelling'|'cancelled'|'completed',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • ConversionTasks (list) --

      Information about the conversion tasks.

      • (dict) --

        Describes a conversion task.

        • ConversionTaskId (string) --

          The ID of the conversion task.

        • ExpirationTime (string) --

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

        • ImportInstance (dict) --

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

          • Description (string) --

            A description of the task.

          • InstanceId (string) --

            The ID of the instance.

          • Platform (string) --

            The instance operating system.

          • Volumes (list) --

            The volumes.

            • (dict) --

              Describes an import volume task.

              • AvailabilityZone (string) --

                The Availability Zone where the resulting instance will reside.

              • BytesConverted (integer) --

                The number of bytes converted so far.

              • Description (string) --

                A description of the task.

              • Image (dict) --

                The image.

                • Checksum (string) --

                  The checksum computed for the disk image.

                • Format (string) --

                  The disk image format.

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

                • Size (integer) --

                  The size of the disk image, in GiB.

              • Status (string) --

                The status of the import of this particular disk image.

              • StatusMessage (string) --

                The status information or errors related to the disk image.

              • Volume (dict) --

                The volume.

                • Id (string) --

                  The volume identifier.

                • Size (integer) --

                  The size of the volume, in GiB.

        • ImportVolume (dict) --

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

          • AvailabilityZone (string) --

            The Availability Zone where the resulting volume will reside.

          • BytesConverted (integer) --

            The number of bytes converted so far.

          • Description (string) --

            The description you provided when starting the import volume task.

          • Image (dict) --

            The image.

            • Checksum (string) --

              The checksum computed for the disk image.

            • Format (string) --

              The disk image format.

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

            • Size (integer) --

              The size of the disk image, in GiB.

          • Volume (dict) --

            The volume.

            • Id (string) --

              The volume identifier.

            • Size (integer) --

              The size of the volume, in GiB.

        • 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 256 Unicode characters.

describe_customer_gateways(**kwargs)

Describes one or more of your VPN customer gateways.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_customer_gateways(
    CustomerGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • CustomerGatewayIds (list) --

    One or more customer gateway IDs.

    Default: Describes all your customer gateways.

    • (string) --
  • Filters (list) --

    One or more filters.

    • bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
    • customer-gateway-id - The ID of the customer gateway.
    • ip-address - The IP address of the customer gateway device's external interface.
    • state - The state of the customer gateway (pending | available | deleting | deleted ).
    • type - The type of customer gateway. Currently, the only supported type is ipsec.1 .
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CustomerGateways': [
        {
            'BgpAsn': 'string',
            'CustomerGatewayId': 'string',
            'IpAddress': 'string',
            'CertificateArn': 'string',
            'State': 'string',
            'Type': 'string',
            'DeviceName': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeCustomerGateways.

    • CustomerGateways (list) --

      Information about one or more customer gateways.

      • (dict) --

        Describes a customer gateway.

        • BgpAsn (string) --

          The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).

        • CustomerGatewayId (string) --

          The ID of the customer gateway.

        • IpAddress (string) --

          The IP address of the customer gateway device's outside interface.

        • CertificateArn (string) --

          The Amazon Resource Name (ARN) for the customer gateway certificate.

        • State (string) --

          The current state of the customer gateway (pending | available | deleting | deleted ).

        • Type (string) --

          The type of VPN connection the customer gateway supports (ipsec.1 ).

        • DeviceName (string) --

          The name of customer gateway device.

        • Tags (list) --

          Any tags assigned to the customer gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

Examples

This example describes the specified customer gateway.

response = client.describe_customer_gateways(
    CustomerGatewayIds=[
        'cgw-0e11f167',
    ],
)

print(response)

Expected Output:

{
    'CustomerGateways': [
        {
            'BgpAsn': '65534',
            'CustomerGatewayId': 'cgw-0e11f167',
            'IpAddress': '12.1.2.3',
            'State': 'available',
            'Type': 'ipsec.1',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_dhcp_options(**kwargs)

Describes one or more of your DHCP options sets.

For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_dhcp_options(
    DhcpOptionsIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • DhcpOptionsIds (list) --

    The IDs of one or more DHCP options sets.

    Default: Describes all your DHCP options sets.

    • (string) --
  • Filters (list) --

    One or more filters.

    • dhcp-options-id - The ID of a DHCP options set.
    • key - The key for one of the options (for example, domain-name ).
    • value - The value for one of the options.
    • owner-id - The ID of the Amazon Web Services account that owns the DHCP options set.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'DhcpOptions': [
        {
            'DhcpConfigurations': [
                {
                    'Key': 'string',
                    'Values': [
                        {
                            'Value': 'string'
                        },
                    ]
                },
            ],
            'DhcpOptionsId': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DhcpOptions (list) --

      Information about one or more DHCP options sets.

      • (dict) --

        Describes a set of DHCP options.

        • DhcpConfigurations (list) --

          One or more DHCP options in the set.

          • (dict) --

            Describes a DHCP configuration option.

            • Key (string) --

              The name of a DHCP option.

            • Values (list) --

              One or more values for the DHCP option.

              • (dict) --

                Describes a value for a resource attribute that is a String.

                • Value (string) --

                  The attribute value. The value is case-sensitive.

        • DhcpOptionsId (string) --

          The ID of the set of DHCP options.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the DHCP options set.

        • Tags (list) --

          Any tags assigned to the DHCP options set.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

Examples

This example describes the specified DHCP options set.

response = client.describe_dhcp_options(
    DhcpOptionsIds=[
        'dopt-d9070ebb',
    ],
)

print(response)

Expected Output:

{
    'DhcpOptions': [
        {
            'DhcpConfigurations': [
                {
                    'Key': 'domain-name-servers',
                    'Values': [
                        {
                            'Value': '10.2.5.2',
                        },
                        {
                            'Value': '10.2.5.1',
                        },
                    ],
                },
            ],
            'DhcpOptionsId': 'dopt-d9070ebb',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_egress_only_internet_gateways(**kwargs)

Describes one or more of your egress-only internet gateways.

See also: AWS API Documentation

Request Syntax

response = client.describe_egress_only_internet_gateways(
    DryRun=True|False,
    EgressOnlyInternetGatewayIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EgressOnlyInternetGatewayIds (list) --

    One or more egress-only internet gateway IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • Filters (list) --

    One or more filters.

    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'EgressOnlyInternetGateways': [
        {
            'Attachments': [
                {
                    'State': 'attaching'|'attached'|'detaching'|'detached',
                    'VpcId': 'string'
                },
            ],
            'EgressOnlyInternetGatewayId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • EgressOnlyInternetGateways (list) --

      Information about the egress-only internet gateways.

      • (dict) --

        Describes an egress-only internet gateway.

        • Attachments (list) --

          Information about the attachment of the egress-only internet gateway.

          • (dict) --

            Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

            • State (string) --

              The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            • VpcId (string) --

              The ID of the VPC.

        • EgressOnlyInternetGatewayId (string) --

          The ID of the egress-only internet gateway.

        • Tags (list) --

          The tags assigned to the egress-only internet gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_elastic_gpus(**kwargs)

Describes the Elastic Graphics accelerator associated with your instances. For more information about Elastic Graphics, see Amazon Elastic Graphics .

See also: AWS API Documentation

Request Syntax

response = client.describe_elastic_gpus(
    ElasticGpuIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • ElasticGpuIds (list) --

    The Elastic Graphics accelerator IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone in which the Elastic Graphics accelerator resides.
    • elastic-gpu-health - The status of the Elastic Graphics accelerator (OK | IMPAIRED ).
    • elastic-gpu-state - The state of the Elastic Graphics accelerator (ATTACHED ).
    • elastic-gpu-type - The type of Elastic Graphics accelerator; for example, eg1.medium .
    • instance-id - The ID of the instance to which the Elastic Graphics accelerator is associated.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000.
  • NextToken (string) -- The token to request the next page of results.
Return type

dict

Returns

Response Syntax

{
    'ElasticGpuSet': [
        {
            'ElasticGpuId': 'string',
            'AvailabilityZone': 'string',
            'ElasticGpuType': 'string',
            'ElasticGpuHealth': {
                'Status': 'OK'|'IMPAIRED'
            },
            'ElasticGpuState': 'ATTACHED',
            'InstanceId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'MaxResults': 123,
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ElasticGpuSet (list) --

      Information about the Elastic Graphics accelerators.

      • (dict) --

        Describes an Elastic Graphics accelerator.

        • ElasticGpuId (string) --

          The ID of the Elastic Graphics accelerator.

        • AvailabilityZone (string) --

          The Availability Zone in the which the Elastic Graphics accelerator resides.

        • ElasticGpuType (string) --

          The type of Elastic Graphics accelerator.

        • ElasticGpuHealth (dict) --

          The status of the Elastic Graphics accelerator.

          • Status (string) --

            The health status.

        • ElasticGpuState (string) --

          The state of the Elastic Graphics accelerator.

        • InstanceId (string) --

          The ID of the instance to which the Elastic Graphics accelerator is attached.

        • Tags (list) --

          The tags assigned to the Elastic Graphics accelerator.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

    • MaxResults (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a Next-Token will be provided in the output that you can use to resume pagination.

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

describe_export_image_tasks(**kwargs)

Describes the specified export image tasks or all of your export image tasks.

See also: AWS API Documentation

Request Syntax

response = client.describe_export_image_tasks(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ExportImageTaskIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    Filter tasks using the task-state filter and one of the following values: active , completed , deleting , or deleted .

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ExportImageTaskIds (list) --

    The IDs of the export image tasks.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call.
  • NextToken (string) -- A token that indicates the next page of results.
Return type

dict

Returns

Response Syntax

{
    'ExportImageTasks': [
        {
            'Description': 'string',
            'ExportImageTaskId': 'string',
            'ImageId': 'string',
            'Progress': 'string',
            'S3ExportLocation': {
                'S3Bucket': 'string',
                'S3Prefix': 'string'
            },
            'Status': 'string',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ExportImageTasks (list) --

      Information about the export image tasks.

      • (dict) --

        Describes an export image task.

        • Description (string) --

          A description of the image being exported.

        • ExportImageTaskId (string) --

          The ID of the export image task.

        • ImageId (string) --

          The ID of the image.

        • Progress (string) --

          The percent complete of the export image task.

        • S3ExportLocation (dict) --

          Information about the destination Amazon S3 bucket.

          • S3Bucket (string) --

            The destination Amazon S3 bucket.

          • S3Prefix (string) --

            The prefix (logical hierarchy) in the bucket.

        • Status (string) --

          The status of the export image task. The possible values are active , completed , deleting , and deleted .

        • StatusMessage (string) --

          The status message for the export image task.

        • Tags (list) --

          Any tags assigned to the export image 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 256 Unicode characters.

    • NextToken (string) --

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

describe_export_tasks(**kwargs)

Describes the specified export instance tasks or all of your export instance tasks.

See also: AWS API Documentation

Request Syntax

response = client.describe_export_tasks(
    ExportTaskIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters
  • ExportTaskIds (list) --

    The export task IDs.

    • (string) --
  • Filters (list) --

    the filters for the export tasks.

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'ExportTasks': [
        {
            'Description': 'string',
            'ExportTaskId': 'string',
            'ExportToS3Task': {
                'ContainerFormat': 'ova',
                'DiskImageFormat': 'VMDK'|'RAW'|'VHD',
                'S3Bucket': 'string',
                'S3Key': 'string'
            },
            'InstanceExportDetails': {
                'InstanceId': 'string',
                'TargetEnvironment': 'citrix'|'vmware'|'microsoft'
            },
            'State': 'active'|'cancelling'|'cancelled'|'completed',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • ExportTasks (list) --

      Information about the export tasks.

      • (dict) --

        Describes an export instance task.

        • Description (string) --

          A description of the resource being exported.

        • ExportTaskId (string) --

          The ID of the export task.

        • ExportToS3Task (dict) --

          Information about the export task.

          • ContainerFormat (string) --

            The container format used to combine disk images with metadata (such as OVF). If absent, only the disk image is exported.

          • DiskImageFormat (string) --

            The format for the exported image.

          • S3Bucket (string) --

            The Amazon S3 bucket for the destination image. The destination bucket must exist and have an access control list (ACL) attached that specifies the Region-specific canonical account ID for the Grantee . For more information about the ACL to your S3 bucket, see Prerequisites in the VM Import/Export User Guide.

          • S3Key (string) --

            The encryption key for your S3 bucket.

        • InstanceExportDetails (dict) --

          Information about the instance to export.

          • InstanceId (string) --

            The ID of the resource being exported.

          • TargetEnvironment (string) --

            The target virtualization environment.

        • State (string) --

          The state of the export task.

        • StatusMessage (string) --

          The status message related to the export task.

        • Tags (list) --

          The tags for the export 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 256 Unicode characters.

describe_fast_launch_images(**kwargs)

Describe details for Windows AMIs that are configured for faster launching.

See also: AWS API Documentation

Request Syntax

response = client.describe_fast_launch_images(
    ImageIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • ImageIds (list) --

    Details for one or more Windows AMI image IDs.

    • (string) --
  • Filters (list) --

    Use the following filters to streamline results.

    • resource-type - The resource type for pre-provisioning.
    • launch-template - The launch template that is associated with the pre-provisioned Windows AMI.
    • owner-id - The owner ID for the pre-provisioning resource.
    • state - The current state of fast launching for the Windows AMI.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value. If this parameter is not specified, then all results are returned.
  • NextToken (string) -- The token for the next set of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'FastLaunchImages': [
        {
            'ImageId': 'string',
            'ResourceType': 'snapshot',
            'SnapshotConfiguration': {
                'TargetResourceCount': 123
            },
            'LaunchTemplate': {
                'LaunchTemplateId': 'string',
                'LaunchTemplateName': 'string',
                'Version': 'string'
            },
            'MaxParallelLaunches': 123,
            'OwnerId': 'string',
            'State': 'enabling'|'enabling-failed'|'enabled'|'enabled-failed'|'disabling'|'disabling-failed',
            'StateTransitionReason': 'string',
            'StateTransitionTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FastLaunchImages (list) --

      A collection of details about the fast-launch enabled Windows images that meet the requested criteria.

      • (dict) --

        Describe details about a fast-launch enabled Windows image that meets the requested criteria. Criteria are defined by the DescribeFastLaunchImages action filters.

        • ImageId (string) --

          The image ID that identifies the fast-launch enabled Windows image.

        • ResourceType (string) --

          The resource type that is used for pre-provisioning the Windows AMI. Supported values include: snapshot .

        • SnapshotConfiguration (dict) --

          A group of parameters that are used for pre-provisioning the associated Windows AMI using snapshots.

          • TargetResourceCount (integer) --

            The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.

        • LaunchTemplate (dict) --

          The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances from pre-provisioned snapshots.

          • LaunchTemplateId (string) --

            The ID of the launch template for faster launching of the associated Windows AMI.

          • LaunchTemplateName (string) --

            The name of the launch template for faster launching of the associated Windows AMI.

          • Version (string) --

            The version of the launch template for faster launching of the associated Windows AMI.

        • MaxParallelLaunches (integer) --

          The maximum number of parallel instances that are launched for creating resources.

        • OwnerId (string) --

          The owner ID for the fast-launch enabled Windows AMI.

        • State (string) --

          The current state of faster launching for the specified Windows AMI.

        • StateTransitionReason (string) --

          The reason that faster launching for the Windows AMI changed to the current state.

        • StateTransitionTime (datetime) --

          The time that faster launching for the Windows AMI changed to the current state.

    • NextToken (string) --

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

describe_fast_snapshot_restores(**kwargs)

Describes the state of fast snapshot restores for your snapshots.

See also: AWS API Documentation

Request Syntax

response = client.describe_fast_snapshot_restores(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • Filters (list) --

    The filters. The possible values are:

    • availability-zone : The Availability Zone of the snapshot.
    • owner-id : The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.
    • snapshot-id : The ID of the snapshot.
    • state : The state of fast snapshot restores for the snapshot (enabling | optimizing | enabled | disabling | disabled ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'FastSnapshotRestores': [
        {
            'SnapshotId': 'string',
            'AvailabilityZone': 'string',
            'State': 'enabling'|'optimizing'|'enabled'|'disabling'|'disabled',
            'StateTransitionReason': 'string',
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'EnablingTime': datetime(2015, 1, 1),
            'OptimizingTime': datetime(2015, 1, 1),
            'EnabledTime': datetime(2015, 1, 1),
            'DisablingTime': datetime(2015, 1, 1),
            'DisabledTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FastSnapshotRestores (list) --

      Information about the state of fast snapshot restores.

      • (dict) --

        Describes fast snapshot restores for a snapshot.

        • SnapshotId (string) --

          The ID of the snapshot.

        • AvailabilityZone (string) --

          The Availability Zone.

        • State (string) --

          The state of fast snapshot restores.

        • StateTransitionReason (string) --

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling .
          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing , enabled , or disabled .
        • OwnerId (string) --

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime (datetime) --

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime (datetime) --

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime (datetime) --

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime (datetime) --

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime (datetime) --

          The time at which fast snapshot restores entered the disabled state.

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

describe_fleet_history(**kwargs)

Describes the events for the specified EC2 Fleet during the specified time.

EC2 Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. EC2 Fleet events are available for 48 hours.

For more information, see Monitor fleet events using Amazon EventBridge in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_history(
    DryRun=True|False,
    EventType='instance-change'|'fleet-change'|'service-error',
    MaxResults=123,
    NextToken='string',
    FleetId='string',
    StartTime=datetime(2015, 1, 1)
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EventType (string) -- The type of events to describe. By default, all events are described.
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
  • FleetId (string) --

    [REQUIRED]

    The ID of the EC2 Fleet.

  • StartTime (datetime) --

    [REQUIRED]

    The start date and time for the events, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

Return type

dict

Returns

Response Syntax

{
    'HistoryRecords': [
        {
            'EventInformation': {
                'EventDescription': 'string',
                'EventSubType': 'string',
                'InstanceId': 'string'
            },
            'EventType': 'instance-change'|'fleet-change'|'service-error',
            'Timestamp': datetime(2015, 1, 1)
        },
    ],
    'LastEvaluatedTime': datetime(2015, 1, 1),
    'NextToken': 'string',
    'FleetId': 'string',
    'StartTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • HistoryRecords (list) --

      Information about the events in the history of the EC2 Fleet.

      • (dict) --

        Describes an event in the history of an EC2 Fleet.

        • EventInformation (dict) --

          Information about the event.

          • EventDescription (string) --

            The description of the event.

          • EventSubType (string) --

            The event.

            error events:

            • iamFleetRoleInvalid - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.
            • allLaunchSpecsTemporarilyBlacklisted - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.
            • spotInstanceCountLimitExceeded - You've reached the limit on the number of Spot Instances that you can launch.
            • spotFleetRequestConfigurationInvalid - The configuration is not valid. For more information, see the description of the event.

            fleetRequestChange events:

            • active - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.
            • deleted (EC2 Fleet) / cancelled (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.
            • deleted_running (EC2 Fleet) / cancelled_running (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.
            • deleted_terminating (EC2 Fleet) / cancelled_terminating (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.
            • expired - The EC2 Fleet or Spot Fleet request has expired. If the request was created with TerminateInstancesWithExpiration set, a subsequent terminated event indicates that the instances are terminated.
            • modify_in_progress - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.
            • modify_succeeded - The EC2 Fleet or Spot Fleet request was modified.
            • submitted - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.
            • progress - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.

            instanceChange events:

            • launched - A new instance was launched.
            • terminated - An instance was terminated by the user.
            • termination_notified - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.

            Information events:

            • fleetProgressHalted - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced launchSpecUnusable events). A launch specification might become valid if the Spot price changes.
            • launchSpecTemporarilyBlacklisted - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.
            • launchSpecUnusable - The price in a launch specification is not valid because it is below the Spot price.
            • registerWithLoadBalancersFailed - An attempt to register instances with load balancers failed. For more information, see the description of the event.
          • InstanceId (string) --

            The ID of the instance. This information is available only for instanceChange events.

        • EventType (string) --

          The event type.

        • Timestamp (datetime) --

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

    • LastEvaluatedTime (datetime) --

      The last date and time for the events, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). All records up to this time were retrieved.

      If nextToken indicates that there are more results, this value is not present.

    • NextToken (string) --

      The token for the next set of results.

    • FleetId (string) --

      The ID of the EC Fleet.

    • StartTime (datetime) --

      The start date and time for the events, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

describe_fleet_instances(**kwargs)

Describes the running instances for the specified EC2 Fleet.

For more information, see Monitor your EC2 Fleet in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_fleet_instances(
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    FleetId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
  • FleetId (string) --

    [REQUIRED]

    The ID of the EC2 Fleet.

  • Filters (list) --

    The filters.

    • instance-type - The instance type.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'ActiveInstances': [
        {
            'InstanceId': 'string',
            'InstanceType': 'string',
            'SpotInstanceRequestId': 'string',
            'InstanceHealth': 'healthy'|'unhealthy'
        },
    ],
    'NextToken': 'string',
    'FleetId': 'string'
}

Response Structure

  • (dict) --

    • ActiveInstances (list) --

      The running instances. This list is refreshed periodically and might be out of date.

      • (dict) --

        Describes a running instance in a Spot Fleet.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceType (string) --

          The instance type.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • InstanceHealth (string) --

          The health status of the instance. If the status of either the instance status check or the system status check is impaired , the health status of the instance is unhealthy . Otherwise, the health status is healthy .

    • NextToken (string) --

      The token for the next set of results.

    • FleetId (string) --

      The ID of the EC2 Fleet.

describe_fleets(**kwargs)

Describes the specified EC2 Fleets or all of your EC2 Fleets.

For more information, see Monitor your EC2 Fleet in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_fleets(
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    FleetIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
  • FleetIds (list) --

    The IDs of the EC2 Fleets.

    Note

    If a fleet is of type instant , you must specify the fleet ID, otherwise it does not appear in the response.

    • (string) --
  • Filters (list) --

    The filters.

    • activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment | pending-termination | fulfilled ).
    • excess-capacity-termination-policy - Indicates whether to terminate running instances if the target capacity is decreased below the current EC2 Fleet size (true | false ).
    • fleet-state - The state of the EC2 Fleet (submitted | active | deleted | failed | deleted-running | deleted-terminating | modifying ).
    • replace-unhealthy-instances - Indicates whether EC2 Fleet should replace unhealthy instances (true | false ).
    • type - The type of request (instant | request | maintain ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'Fleets': [
        {
            'ActivityStatus': 'error'|'pending_fulfillment'|'pending_termination'|'fulfilled',
            'CreateTime': datetime(2015, 1, 1),
            'FleetId': 'string',
            'FleetState': 'submitted'|'active'|'deleted'|'failed'|'deleted_running'|'deleted_terminating'|'modifying',
            'ClientToken': 'string',
            'ExcessCapacityTerminationPolicy': 'no-termination'|'termination',
            'FulfilledCapacity': 123.0,
            'FulfilledOnDemandCapacity': 123.0,
            'LaunchTemplateConfigs': [
                {
                    'LaunchTemplateSpecification': {
                        'LaunchTemplateId': 'string',
                        'LaunchTemplateName': 'string',
                        'Version': 'string'
                    },
                    'Overrides': [
                        {
                            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                            'MaxPrice': 'string',
                            'SubnetId': 'string',
                            'AvailabilityZone': 'string',
                            'WeightedCapacity': 123.0,
                            'Priority': 123.0,
                            'Placement': {
                                'GroupName': 'string'
                            },
                            'InstanceRequirements': {
                                'VCpuCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'MemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'CpuManufacturers': [
                                    'intel'|'amd'|'amazon-web-services',
                                ],
                                'MemoryGiBPerVCpu': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'ExcludedInstanceTypes': [
                                    'string',
                                ],
                                'InstanceGenerations': [
                                    'current'|'previous',
                                ],
                                'SpotMaxPricePercentageOverLowestPrice': 123,
                                'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                'BareMetal': 'included'|'required'|'excluded',
                                'BurstablePerformance': 'included'|'required'|'excluded',
                                'RequireHibernateSupport': True|False,
                                'NetworkInterfaceCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'LocalStorage': 'included'|'required'|'excluded',
                                'LocalStorageTypes': [
                                    'hdd'|'ssd',
                                ],
                                'TotalLocalStorageGB': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'BaselineEbsBandwidthMbps': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorTypes': [
                                    'gpu'|'fpga'|'inference',
                                ],
                                'AcceleratorCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorManufacturers': [
                                    'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                ],
                                'AcceleratorNames': [
                                    'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                ],
                                'AcceleratorTotalMemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                }
                            }
                        },
                    ]
                },
            ],
            'TargetCapacitySpecification': {
                'TotalTargetCapacity': 123,
                'OnDemandTargetCapacity': 123,
                'SpotTargetCapacity': 123,
                'DefaultTargetCapacityType': 'spot'|'on-demand',
                'TargetCapacityUnitType': 'vcpu'|'memory-mib'|'units'
            },
            'TerminateInstancesWithExpiration': True|False,
            'Type': 'request'|'maintain'|'instant',
            'ValidFrom': datetime(2015, 1, 1),
            'ValidUntil': datetime(2015, 1, 1),
            'ReplaceUnhealthyInstances': True|False,
            'SpotOptions': {
                'AllocationStrategy': 'lowest-price'|'diversified'|'capacity-optimized'|'capacity-optimized-prioritized',
                'MaintenanceStrategies': {
                    'CapacityRebalance': {
                        'ReplacementStrategy': 'launch'|'launch-before-terminate',
                        'TerminationDelay': 123
                    }
                },
                'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate',
                'InstancePoolsToUseCount': 123,
                'SingleInstanceType': True|False,
                'SingleAvailabilityZone': True|False,
                'MinTargetCapacity': 123,
                'MaxTotalPrice': 'string'
            },
            'OnDemandOptions': {
                'AllocationStrategy': 'lowest-price'|'prioritized',
                'CapacityReservationOptions': {
                    'UsageStrategy': 'use-capacity-reservations-first'
                },
                'SingleInstanceType': True|False,
                'SingleAvailabilityZone': True|False,
                'MinTargetCapacity': 123,
                'MaxTotalPrice': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Errors': [
                {
                    'LaunchTemplateAndOverrides': {
                        'LaunchTemplateSpecification': {
                            'LaunchTemplateId': 'string',
                            'LaunchTemplateName': 'string',
                            'Version': 'string'
                        },
                        'Overrides': {
                            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                            'MaxPrice': 'string',
                            'SubnetId': 'string',
                            'AvailabilityZone': 'string',
                            'WeightedCapacity': 123.0,
                            'Priority': 123.0,
                            'Placement': {
                                'GroupName': 'string'
                            },
                            'InstanceRequirements': {
                                'VCpuCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'MemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'CpuManufacturers': [
                                    'intel'|'amd'|'amazon-web-services',
                                ],
                                'MemoryGiBPerVCpu': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'ExcludedInstanceTypes': [
                                    'string',
                                ],
                                'InstanceGenerations': [
                                    'current'|'previous',
                                ],
                                'SpotMaxPricePercentageOverLowestPrice': 123,
                                'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                'BareMetal': 'included'|'required'|'excluded',
                                'BurstablePerformance': 'included'|'required'|'excluded',
                                'RequireHibernateSupport': True|False,
                                'NetworkInterfaceCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'LocalStorage': 'included'|'required'|'excluded',
                                'LocalStorageTypes': [
                                    'hdd'|'ssd',
                                ],
                                'TotalLocalStorageGB': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'BaselineEbsBandwidthMbps': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorTypes': [
                                    'gpu'|'fpga'|'inference',
                                ],
                                'AcceleratorCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorManufacturers': [
                                    'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                ],
                                'AcceleratorNames': [
                                    'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                ],
                                'AcceleratorTotalMemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                }
                            }
                        }
                    },
                    'Lifecycle': 'spot'|'on-demand',
                    'ErrorCode': 'string',
                    'ErrorMessage': 'string'
                },
            ],
            'Instances': [
                {
                    'LaunchTemplateAndOverrides': {
                        'LaunchTemplateSpecification': {
                            'LaunchTemplateId': 'string',
                            'LaunchTemplateName': 'string',
                            'Version': 'string'
                        },
                        'Overrides': {
                            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                            'MaxPrice': 'string',
                            'SubnetId': 'string',
                            'AvailabilityZone': 'string',
                            'WeightedCapacity': 123.0,
                            'Priority': 123.0,
                            'Placement': {
                                'GroupName': 'string'
                            },
                            'InstanceRequirements': {
                                'VCpuCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'MemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'CpuManufacturers': [
                                    'intel'|'amd'|'amazon-web-services',
                                ],
                                'MemoryGiBPerVCpu': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'ExcludedInstanceTypes': [
                                    'string',
                                ],
                                'InstanceGenerations': [
                                    'current'|'previous',
                                ],
                                'SpotMaxPricePercentageOverLowestPrice': 123,
                                'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                'BareMetal': 'included'|'required'|'excluded',
                                'BurstablePerformance': 'included'|'required'|'excluded',
                                'RequireHibernateSupport': True|False,
                                'NetworkInterfaceCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'LocalStorage': 'included'|'required'|'excluded',
                                'LocalStorageTypes': [
                                    'hdd'|'ssd',
                                ],
                                'TotalLocalStorageGB': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'BaselineEbsBandwidthMbps': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorTypes': [
                                    'gpu'|'fpga'|'inference',
                                ],
                                'AcceleratorCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorManufacturers': [
                                    'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                ],
                                'AcceleratorNames': [
                                    'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                ],
                                'AcceleratorTotalMemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                }
                            }
                        }
                    },
                    'Lifecycle': 'spot'|'on-demand',
                    'InstanceIds': [
                        'string',
                    ],
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'Platform': 'Windows'
                },
            ],
            'Context': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The token for the next set of results.

    • Fleets (list) --

      Information about the EC2 Fleets.

      • (dict) --

        Describes an EC2 Fleet.

        • ActivityStatus (string) --

          The progress of the EC2 Fleet. If there is an error, the status is error . After all requests are placed, the status is pending_fulfillment . If the size of the EC2 Fleet is equal to or greater than its target capacity, the status is fulfilled . If the size of the EC2 Fleet is decreased, the status is pending_termination while instances are terminating.

        • CreateTime (datetime) --

          The creation date and time of the EC2 Fleet.

        • FleetId (string) --

          The ID of the EC2 Fleet.

        • FleetState (string) --

          The state of the EC2 Fleet.

        • ClientToken (string) --

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

          Constraints: Maximum 64 ASCII characters

        • ExcessCapacityTerminationPolicy (string) --

          Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

        • FulfilledCapacity (float) --

          The number of units fulfilled by this request compared to the set target capacity.

        • FulfilledOnDemandCapacity (float) --

          The number of units fulfilled by this request compared to the set target On-Demand capacity.

        • LaunchTemplateConfigs (list) --

          The launch template and overrides.

          • (dict) --

            Describes a launch template and overrides.

            • LaunchTemplateSpecification (dict) --

              The launch template.

              • LaunchTemplateId (string) --

                The ID of the launch template.

                You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

              • LaunchTemplateName (string) --

                The name of the launch template.

                You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

              • Version (string) --

                The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                If the value is $Default , Amazon EC2 uses the default version of the launch template.

            • Overrides (list) --

              Any parameters that you specify override the same parameters in the launch template.

              • (dict) --

                Describes overrides for a launch template.

                • InstanceType (string) --

                  The instance type.

                  Note

                  If you specify InstanceTypes , you can't specify InstanceRequirements .

                • MaxPrice (string) --

                  The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                  Warning

                  If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                • SubnetId (string) --

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

                • AvailabilityZone (string) --

                  The Availability Zone in which to launch the instances.

                • WeightedCapacity (float) --

                  The number of units provided by the specified instance type.

                • Priority (float) --

                  The priority for the launch template override. The highest priority is launched first.

                  If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                  If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                  Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

                • Placement (dict) --

                  The location where the instance launched, if applicable.

                  • GroupName (string) --

                    The name of the placement group that the instance is in.

                • InstanceRequirements (dict) --

                  The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                  Note

                  If you specify InstanceRequirements , you can't specify InstanceTypes .

                  • VCpuCount (dict) --

                    The minimum and maximum number of vCPUs.

                    • Min (integer) --

                      The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                    • Max (integer) --

                      The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                  • MemoryMiB (dict) --

                    The minimum and maximum amount of memory, in MiB.

                    • Min (integer) --

                      The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                  • CpuManufacturers (list) --

                    The CPU manufacturers to include.

                    • For instance types with Intel CPUs, specify intel .
                    • For instance types with AMD CPUs, specify amd .
                    • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                    Note

                    Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                    Default: Any manufacturer

                    • (string) --
                  • MemoryGiBPerVCpu (dict) --

                    The minimum and maximum amount of memory per vCPU, in GiB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                  • ExcludedInstanceTypes (list) --

                    The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                    For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                    Default: No excluded instance types

                    • (string) --
                  • InstanceGenerations (list) --

                    Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                    For current generation instance types, specify current .

                    For previous generation instance types, specify previous .

                    Default: Current and previous generation instance types

                    • (string) --
                  • SpotMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 100

                  • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 20

                  • BareMetal (string) --

                    Indicates whether bare metal instance types must be included, excluded, or required.

                    • To include bare metal instance types, specify included .
                    • To require only bare metal instance types, specify required .
                    • To exclude bare metal instance types, specify excluded .

                    Default: excluded

                  • BurstablePerformance (string) --

                    Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                    • To include burstable performance instance types, specify included .
                    • To require only burstable performance instance types, specify required .
                    • To exclude burstable performance instance types, specify excluded .

                    Default: excluded

                  • RequireHibernateSupport (boolean) --

                    Indicates whether instance types must support hibernation for On-Demand Instances.

                    This parameter is not supported for GetSpotPlacementScores .

                    Default: false

                  • NetworkInterfaceCount (dict) --

                    The minimum and maximum number of network interfaces.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                  • LocalStorage (string) --

                    Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                    • To include instance types with instance store volumes, specify included .
                    • To require only instance types with instance store volumes, specify required .
                    • To exclude instance types with instance store volumes, specify excluded .

                    Default: included

                  • LocalStorageTypes (list) --

                    The type of local storage that is required.

                    • For instance types with hard disk drive (HDD) storage, specify hdd .
                    • For instance types with solid state drive (SSD) storage, specify ssd .

                    Default: hdd and ssd

                    • (string) --
                  • TotalLocalStorageGB (dict) --

                    The minimum and maximum amount of total local storage, in GB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                  • BaselineEbsBandwidthMbps (dict) --

                    The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorTypes (list) --

                    The accelerator types that must be on the instance type.

                    • For instance types with GPU accelerators, specify gpu .
                    • For instance types with FPGA accelerators, specify fpga .
                    • For instance types with inference accelerators, specify inference .

                    Default: Any accelerator type

                    • (string) --
                  • AcceleratorCount (dict) --

                    The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                    To exclude accelerator-enabled instance types, set Max to 0 .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorManufacturers (list) --

                    Indicates whether instance types must have accelerators by specific manufacturers.

                    • For instance types with NVIDIA devices, specify nvidia .
                    • For instance types with AMD devices, specify amd .
                    • For instance types with Amazon Web Services devices, specify amazon-web-services .
                    • For instance types with Xilinx devices, specify xilinx .

                    Default: Any manufacturer

                    • (string) --
                  • AcceleratorNames (list) --

                    The accelerators that must be on the instance type.

                    • For instance types with NVIDIA A100 GPUs, specify a100 .
                    • For instance types with NVIDIA V100 GPUs, specify v100 .
                    • For instance types with NVIDIA K80 GPUs, specify k80 .
                    • For instance types with NVIDIA T4 GPUs, specify t4 .
                    • For instance types with NVIDIA M60 GPUs, specify m60 .
                    • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                    • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                    Default: Any accelerator

                    • (string) --
                  • AcceleratorTotalMemoryMiB (dict) --

                    The minimum and maximum amount of total accelerator memory, in MiB.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • TargetCapacitySpecification (dict) --

          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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

          • TotalTargetCapacity (integer) --

            The number of units to request, filled using DefaultTargetCapacityType .

          • OnDemandTargetCapacity (integer) --

            The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.

          • SpotTargetCapacity (integer) --

            The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.

          • DefaultTargetCapacityType (string) --

            The default TotalTargetCapacity , which is either Spot or On-Demand .

          • TargetCapacityUnitType (string) --

            The unit for the target capacity.

            Default: units (translates to number of instances)

        • TerminateInstancesWithExpiration (boolean) --

          Indicates whether running instances should be terminated when the EC2 Fleet expires.

        • Type (string) --

          The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: maintain .

        • 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 instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date.

        • ReplaceUnhealthyInstances (boolean) --

          Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain . For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide .

        • SpotOptions (dict) --

          The configuration of Spot Instances in an EC2 Fleet.

          • AllocationStrategy (string) --

            The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.

            lowest-price - EC2 Fleet launches instances from the Spot Instance pools with the lowest price.

            diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.

            capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized . Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides . You can assign the same priority to different LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note that if the On-Demand AllocationStrategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity.

            Default: lowest-price

          • MaintenanceStrategies (dict) --

            The strategies for managing your workloads on your Spot Instances that will be interrupted. Currently only the capacity rebalance strategy is available.

            • CapacityRebalance (dict) --

              The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.

              • ReplacementStrategy (string) --

                The replacement strategy to use. Only available for fleets of type maintain .

                launch - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

                launch-before-terminate - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay ), terminates the instances that received a rebalance notification.

              • TerminationDelay (integer) --

                The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

                Required when ReplacementStrategy is set to launch-before-terminate .

                Not valid when ReplacementStrategy is set to launch .

                Valid values: Minimum value of 120 seconds. Maximum value of 7200 seconds.

          • InstanceInterruptionBehavior (string) --

            The behavior when a Spot Instance is interrupted.

            Default: terminate

          • InstancePoolsToUseCount (integer) --

            The number of Spot pools across which to allocate your target Spot capacity. Supported only when AllocationStrategy is set to lowest-price . EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

            Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

          • SingleInstanceType (boolean) --

            Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

            Supported only for fleets of type instant .

          • SingleAvailabilityZone (boolean) --

            Indicates that the fleet launches all Spot Instances into a single Availability Zone.

            Supported only for fleets of type instant .

          • MinTargetCapacity (integer) --

            The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

            Supported only for fleets of type instant .

            At least one of the following must be specified: SingleAvailabilityZone | SingleInstanceType

          • MaxTotalPrice (string) --

            The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

        • OnDemandOptions (dict) --

          The allocation strategy of On-Demand Instances in an EC2 Fleet.

          • AllocationStrategy (string) --

            The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.

            lowest-price - EC2 Fleet uses price to determine the order, launching the lowest price first.

            prioritized - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.

            Default: lowest-price

          • CapacityReservationOptions (dict) --

            The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.

            Supported only for fleets of type instant .

            • UsageStrategy (string) --

              Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

              If you specify use-capacity-reservations-first , the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price or prioritized ) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price or prioritized ).

              If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.

          • SingleInstanceType (boolean) --

            Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.

            Supported only for fleets of type instant .

          • SingleAvailabilityZone (boolean) --

            Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.

            Supported only for fleets of type instant .

          • MinTargetCapacity (integer) --

            The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

            Supported only for fleets of type instant .

            At least one of the following must be specified: SingleAvailabilityZone | SingleInstanceType

          • MaxTotalPrice (string) --

            The maximum amount per hour for On-Demand Instances that you're willing to pay.

        • Tags (list) --

          The tags for an EC2 Fleet 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 256 Unicode characters.

        • Errors (list) --

          Information about the instances that could not be launched by the fleet. Valid only when Type is set to instant .

          • (dict) --

            Describes the instances that could not be launched by the fleet.

            • LaunchTemplateAndOverrides (dict) --

              The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

              • LaunchTemplateSpecification (dict) --

                The launch template.

                • LaunchTemplateId (string) --

                  The ID of the launch template.

                  You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

                • LaunchTemplateName (string) --

                  The name of the launch template.

                  You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

                • Version (string) --

                  The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                  If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                  If the value is $Default , Amazon EC2 uses the default version of the launch template.

              • Overrides (dict) --

                Any parameters that you specify override the same parameters in the launch template.

                • InstanceType (string) --

                  The instance type.

                  Note

                  If you specify InstanceTypes , you can't specify InstanceRequirements .

                • MaxPrice (string) --

                  The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                  Warning

                  If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                • SubnetId (string) --

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

                • AvailabilityZone (string) --

                  The Availability Zone in which to launch the instances.

                • WeightedCapacity (float) --

                  The number of units provided by the specified instance type.

                • Priority (float) --

                  The priority for the launch template override. The highest priority is launched first.

                  If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                  If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                  Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

                • Placement (dict) --

                  The location where the instance launched, if applicable.

                  • GroupName (string) --

                    The name of the placement group that the instance is in.

                • InstanceRequirements (dict) --

                  The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                  Note

                  If you specify InstanceRequirements , you can't specify InstanceTypes .

                  • VCpuCount (dict) --

                    The minimum and maximum number of vCPUs.

                    • Min (integer) --

                      The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                    • Max (integer) --

                      The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                  • MemoryMiB (dict) --

                    The minimum and maximum amount of memory, in MiB.

                    • Min (integer) --

                      The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                  • CpuManufacturers (list) --

                    The CPU manufacturers to include.

                    • For instance types with Intel CPUs, specify intel .
                    • For instance types with AMD CPUs, specify amd .
                    • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                    Note

                    Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                    Default: Any manufacturer

                    • (string) --
                  • MemoryGiBPerVCpu (dict) --

                    The minimum and maximum amount of memory per vCPU, in GiB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                  • ExcludedInstanceTypes (list) --

                    The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                    For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                    Default: No excluded instance types

                    • (string) --
                  • InstanceGenerations (list) --

                    Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                    For current generation instance types, specify current .

                    For previous generation instance types, specify previous .

                    Default: Current and previous generation instance types

                    • (string) --
                  • SpotMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 100

                  • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 20

                  • BareMetal (string) --

                    Indicates whether bare metal instance types must be included, excluded, or required.

                    • To include bare metal instance types, specify included .
                    • To require only bare metal instance types, specify required .
                    • To exclude bare metal instance types, specify excluded .

                    Default: excluded

                  • BurstablePerformance (string) --

                    Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                    • To include burstable performance instance types, specify included .
                    • To require only burstable performance instance types, specify required .
                    • To exclude burstable performance instance types, specify excluded .

                    Default: excluded

                  • RequireHibernateSupport (boolean) --

                    Indicates whether instance types must support hibernation for On-Demand Instances.

                    This parameter is not supported for GetSpotPlacementScores .

                    Default: false

                  • NetworkInterfaceCount (dict) --

                    The minimum and maximum number of network interfaces.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                  • LocalStorage (string) --

                    Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                    • To include instance types with instance store volumes, specify included .
                    • To require only instance types with instance store volumes, specify required .
                    • To exclude instance types with instance store volumes, specify excluded .

                    Default: included

                  • LocalStorageTypes (list) --

                    The type of local storage that is required.

                    • For instance types with hard disk drive (HDD) storage, specify hdd .
                    • For instance types with solid state drive (SSD) storage, specify ssd .

                    Default: hdd and ssd

                    • (string) --
                  • TotalLocalStorageGB (dict) --

                    The minimum and maximum amount of total local storage, in GB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                  • BaselineEbsBandwidthMbps (dict) --

                    The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorTypes (list) --

                    The accelerator types that must be on the instance type.

                    • For instance types with GPU accelerators, specify gpu .
                    • For instance types with FPGA accelerators, specify fpga .
                    • For instance types with inference accelerators, specify inference .

                    Default: Any accelerator type

                    • (string) --
                  • AcceleratorCount (dict) --

                    The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                    To exclude accelerator-enabled instance types, set Max to 0 .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorManufacturers (list) --

                    Indicates whether instance types must have accelerators by specific manufacturers.

                    • For instance types with NVIDIA devices, specify nvidia .
                    • For instance types with AMD devices, specify amd .
                    • For instance types with Amazon Web Services devices, specify amazon-web-services .
                    • For instance types with Xilinx devices, specify xilinx .

                    Default: Any manufacturer

                    • (string) --
                  • AcceleratorNames (list) --

                    The accelerators that must be on the instance type.

                    • For instance types with NVIDIA A100 GPUs, specify a100 .
                    • For instance types with NVIDIA V100 GPUs, specify v100 .
                    • For instance types with NVIDIA K80 GPUs, specify k80 .
                    • For instance types with NVIDIA T4 GPUs, specify t4 .
                    • For instance types with NVIDIA M60 GPUs, specify m60 .
                    • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                    • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                    Default: Any accelerator

                    • (string) --
                  • AcceleratorTotalMemoryMiB (dict) --

                    The minimum and maximum amount of total accelerator memory, in MiB.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • Lifecycle (string) --

              Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.

            • ErrorCode (string) --

              The error code that indicates why the instance could not be launched. For more information about error codes, see Error codes .

            • ErrorMessage (string) --

              The error message that describes why the instance could not be launched. For more information about error messages, see Error codes .

        • Instances (list) --

          Information about the instances that were launched by the fleet. Valid only when Type is set to instant .

          • (dict) --

            Describes the instances that were launched by the fleet.

            • LaunchTemplateAndOverrides (dict) --

              The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

              • LaunchTemplateSpecification (dict) --

                The launch template.

                • LaunchTemplateId (string) --

                  The ID of the launch template.

                  You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

                • LaunchTemplateName (string) --

                  The name of the launch template.

                  You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

                • Version (string) --

                  The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                  If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                  If the value is $Default , Amazon EC2 uses the default version of the launch template.

              • Overrides (dict) --

                Any parameters that you specify override the same parameters in the launch template.

                • InstanceType (string) --

                  The instance type.

                  Note

                  If you specify InstanceTypes , you can't specify InstanceRequirements .

                • MaxPrice (string) --

                  The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                  Warning

                  If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                • SubnetId (string) --

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

                • AvailabilityZone (string) --

                  The Availability Zone in which to launch the instances.

                • WeightedCapacity (float) --

                  The number of units provided by the specified instance type.

                • Priority (float) --

                  The priority for the launch template override. The highest priority is launched first.

                  If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                  If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                  Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

                • Placement (dict) --

                  The location where the instance launched, if applicable.

                  • GroupName (string) --

                    The name of the placement group that the instance is in.

                • InstanceRequirements (dict) --

                  The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                  Note

                  If you specify InstanceRequirements , you can't specify InstanceTypes .

                  • VCpuCount (dict) --

                    The minimum and maximum number of vCPUs.

                    • Min (integer) --

                      The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                    • Max (integer) --

                      The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                  • MemoryMiB (dict) --

                    The minimum and maximum amount of memory, in MiB.

                    • Min (integer) --

                      The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                  • CpuManufacturers (list) --

                    The CPU manufacturers to include.

                    • For instance types with Intel CPUs, specify intel .
                    • For instance types with AMD CPUs, specify amd .
                    • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                    Note

                    Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                    Default: Any manufacturer

                    • (string) --
                  • MemoryGiBPerVCpu (dict) --

                    The minimum and maximum amount of memory per vCPU, in GiB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                  • ExcludedInstanceTypes (list) --

                    The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                    For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                    Default: No excluded instance types

                    • (string) --
                  • InstanceGenerations (list) --

                    Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                    For current generation instance types, specify current .

                    For previous generation instance types, specify previous .

                    Default: Current and previous generation instance types

                    • (string) --
                  • SpotMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 100

                  • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 20

                  • BareMetal (string) --

                    Indicates whether bare metal instance types must be included, excluded, or required.

                    • To include bare metal instance types, specify included .
                    • To require only bare metal instance types, specify required .
                    • To exclude bare metal instance types, specify excluded .

                    Default: excluded

                  • BurstablePerformance (string) --

                    Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                    • To include burstable performance instance types, specify included .
                    • To require only burstable performance instance types, specify required .
                    • To exclude burstable performance instance types, specify excluded .

                    Default: excluded

                  • RequireHibernateSupport (boolean) --

                    Indicates whether instance types must support hibernation for On-Demand Instances.

                    This parameter is not supported for GetSpotPlacementScores .

                    Default: false

                  • NetworkInterfaceCount (dict) --

                    The minimum and maximum number of network interfaces.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                  • LocalStorage (string) --

                    Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                    • To include instance types with instance store volumes, specify included .
                    • To require only instance types with instance store volumes, specify required .
                    • To exclude instance types with instance store volumes, specify excluded .

                    Default: included

                  • LocalStorageTypes (list) --

                    The type of local storage that is required.

                    • For instance types with hard disk drive (HDD) storage, specify hdd .
                    • For instance types with solid state drive (SSD) storage, specify ssd .

                    Default: hdd and ssd

                    • (string) --
                  • TotalLocalStorageGB (dict) --

                    The minimum and maximum amount of total local storage, in GB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                  • BaselineEbsBandwidthMbps (dict) --

                    The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorTypes (list) --

                    The accelerator types that must be on the instance type.

                    • For instance types with GPU accelerators, specify gpu .
                    • For instance types with FPGA accelerators, specify fpga .
                    • For instance types with inference accelerators, specify inference .

                    Default: Any accelerator type

                    • (string) --
                  • AcceleratorCount (dict) --

                    The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                    To exclude accelerator-enabled instance types, set Max to 0 .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorManufacturers (list) --

                    Indicates whether instance types must have accelerators by specific manufacturers.

                    • For instance types with NVIDIA devices, specify nvidia .
                    • For instance types with AMD devices, specify amd .
                    • For instance types with Amazon Web Services devices, specify amazon-web-services .
                    • For instance types with Xilinx devices, specify xilinx .

                    Default: Any manufacturer

                    • (string) --
                  • AcceleratorNames (list) --

                    The accelerators that must be on the instance type.

                    • For instance types with NVIDIA A100 GPUs, specify a100 .
                    • For instance types with NVIDIA V100 GPUs, specify v100 .
                    • For instance types with NVIDIA K80 GPUs, specify k80 .
                    • For instance types with NVIDIA T4 GPUs, specify t4 .
                    • For instance types with NVIDIA M60 GPUs, specify m60 .
                    • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                    • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                    Default: Any accelerator

                    • (string) --
                  • AcceleratorTotalMemoryMiB (dict) --

                    The minimum and maximum amount of total accelerator memory, in MiB.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • Lifecycle (string) --

              Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.

            • InstanceIds (list) --

              The IDs of the instances.

              • (string) --
            • InstanceType (string) --

              The instance type.

            • Platform (string) --

              The value is Windows for Windows instances. Otherwise, the value is blank.

        • Context (string) --

          Reserved.

describe_flow_logs(**kwargs)

Describes one or more flow logs. To view the information in your flow logs (the log streams for the network interfaces), you must use the CloudWatch Logs console or the CloudWatch Logs API.

See also: AWS API Documentation

Request Syntax

response = client.describe_flow_logs(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    FlowLogIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • deliver-log-status - The status of the logs delivery (SUCCESS | FAILED ).
    • log-destination-type - The type of destination to which the flow log publishes data. Possible destination types include cloud-watch-logs and s3 .
    • flow-log-id - The ID of the flow log.
    • log-group-name - The name of the log group.
    • resource-id - The ID of the VPC, subnet, or network interface.
    • traffic-type - The type of traffic (ACCEPT | REJECT | ALL ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • FlowLogIds (list) --

    One or more flow log IDs.

    Constraint: Maximum of 1000 flow log IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'FlowLogs': [
        {
            'CreationTime': datetime(2015, 1, 1),
            'DeliverLogsErrorMessage': 'string',
            'DeliverLogsPermissionArn': 'string',
            'DeliverLogsStatus': 'string',
            'FlowLogId': 'string',
            'FlowLogStatus': 'string',
            'LogGroupName': 'string',
            'ResourceId': 'string',
            'TrafficType': 'ACCEPT'|'REJECT'|'ALL',
            'LogDestinationType': 'cloud-watch-logs'|'s3',
            'LogDestination': 'string',
            'LogFormat': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'MaxAggregationInterval': 123,
            'DestinationOptions': {
                'FileFormat': 'plain-text'|'parquet',
                'HiveCompatiblePartitions': True|False,
                'PerHourPartition': True|False
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FlowLogs (list) --

      Information about the flow logs.

      • (dict) --

        Describes a flow log.

        • CreationTime (datetime) --

          The date and time the flow log was created.

        • DeliverLogsErrorMessage (string) --

          Information about the error that occurred. Rate limited indicates that CloudWatch Logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of log groups that you can create. Access error indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. Unknown error indicates an internal error.

        • DeliverLogsPermissionArn (string) --

          The ARN of the IAM role that posts logs to CloudWatch Logs.

        • DeliverLogsStatus (string) --

          The status of the logs delivery (SUCCESS | FAILED ).

        • FlowLogId (string) --

          The flow log ID.

        • FlowLogStatus (string) --

          The status of the flow log (ACTIVE ).

        • LogGroupName (string) --

          The name of the flow log group.

        • ResourceId (string) --

          The ID of the resource on which the flow log was created.

        • TrafficType (string) --

          The type of traffic captured for the flow log.

        • LogDestinationType (string) --

          The type of destination to which the flow log data is published. Flow log data can be published to CloudWatch Logs or Amazon S3.

        • LogDestination (string) --

          The destination to which the flow log data is published. Flow log data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. If the flow log publishes to CloudWatch Logs, this element indicates the Amazon Resource Name (ARN) of the CloudWatch Logs log group to which the data is published. If the flow log publishes to Amazon S3, this element indicates the ARN of the Amazon S3 bucket to which the data is published.

        • LogFormat (string) --

          The format of the flow log record.

        • Tags (list) --

          The tags for the flow log.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • MaxAggregationInterval (integer) --

          The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.

          When a network interface is attached to a Nitro-based instance , the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.

          Valid Values: 60 | 600

        • DestinationOptions (dict) --

          The destination options.

          • FileFormat (string) --

            The format for the flow log.

          • HiveCompatiblePartitions (boolean) --

            Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.

          • PerHourPartition (boolean) --

            Indicates whether to partition the flow log per hour.

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

describe_fpga_image_attribute(**kwargs)

Describes the specified attribute of the specified Amazon FPGA Image (AFI).

See also: AWS API Documentation

Request Syntax

response = client.describe_fpga_image_attribute(
    DryRun=True|False,
    FpgaImageId='string',
    Attribute='description'|'name'|'loadPermission'|'productCodes'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FpgaImageId (string) --

    [REQUIRED]

    The ID of the AFI.

  • Attribute (string) --

    [REQUIRED]

    The AFI attribute.

Return type

dict

Returns

Response Syntax

{
    'FpgaImageAttribute': {
        'FpgaImageId': 'string',
        'Name': 'string',
        'Description': 'string',
        'LoadPermissions': [
            {
                'UserId': 'string',
                'Group': 'all'
            },
        ],
        'ProductCodes': [
            {
                'ProductCodeId': 'string',
                'ProductCodeType': 'devpay'|'marketplace'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • FpgaImageAttribute (dict) --

      Information about the attribute.

      • FpgaImageId (string) --

        The ID of the AFI.

      • Name (string) --

        The name of the AFI.

      • Description (string) --

        The description of the AFI.

      • LoadPermissions (list) --

        The load permissions.

        • (dict) --

          Describes a load permission.

          • UserId (string) --

            The Amazon Web Services account ID.

          • Group (string) --

            The name of the group.

      • ProductCodes (list) --

        The product codes.

        • (dict) --

          Describes a product code.

          • ProductCodeId (string) --

            The product code.

          • ProductCodeType (string) --

            The type of product code.

describe_fpga_images(**kwargs)

Describes the Amazon FPGA Images (AFIs) available to you. These include public AFIs, private AFIs that you own, and AFIs owned by other Amazon Web Services accounts for which you have load permissions.

See also: AWS API Documentation

Request Syntax

response = client.describe_fpga_images(
    DryRun=True|False,
    FpgaImageIds=[
        'string',
    ],
    Owners=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FpgaImageIds (list) --

    The AFI IDs.

    • (string) --
  • Owners (list) --

    Filters the AFI by owner. Specify an Amazon Web Services account ID, self (owner is the sender of the request), or an Amazon Web Services owner alias (valid values are amazon | aws-marketplace ).

    • (string) --
  • Filters (list) --

    The filters.

    • create-time - The creation time of the AFI.
    • fpga-image-id - The FPGA image identifier (AFI ID).
    • fpga-image-global-id - The global FPGA image identifier (AGFI ID).
    • name - The name of the AFI.
    • owner-id - The Amazon Web Services account ID of the AFI owner.
    • product-code - The product code.
    • shell-version - The version of the Amazon Web Services Shell that was used to create the bitstream.
    • state - The state of the AFI (pending | failed | available | unavailable ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • update-time - The time of the most recent update.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call.
Return type

dict

Returns

Response Syntax

{
    'FpgaImages': [
        {
            'FpgaImageId': 'string',
            'FpgaImageGlobalId': 'string',
            'Name': 'string',
            'Description': 'string',
            'ShellVersion': 'string',
            'PciId': {
                'DeviceId': 'string',
                'VendorId': 'string',
                'SubsystemId': 'string',
                'SubsystemVendorId': 'string'
            },
            'State': {
                'Code': 'pending'|'failed'|'available'|'unavailable',
                'Message': 'string'
            },
            'CreateTime': datetime(2015, 1, 1),
            'UpdateTime': datetime(2015, 1, 1),
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Public': True|False,
            'DataRetentionSupport': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FpgaImages (list) --

      Information about the FPGA images.

      • (dict) --

        Describes an Amazon FPGA image (AFI).

        • FpgaImageId (string) --

          The FPGA image identifier (AFI ID).

        • FpgaImageGlobalId (string) --

          The global FPGA image identifier (AGFI ID).

        • Name (string) --

          The name of the AFI.

        • Description (string) --

          The description of the AFI.

        • ShellVersion (string) --

          The version of the Amazon Web Services Shell that was used to create the bitstream.

        • PciId (dict) --

          Information about the PCI bus.

          • DeviceId (string) --

            The ID of the device.

          • VendorId (string) --

            The ID of the vendor.

          • SubsystemId (string) --

            The ID of the subsystem.

          • SubsystemVendorId (string) --

            The ID of the vendor for the subsystem.

        • State (dict) --

          Information about the state of the AFI.

          • Code (string) --

            The state. The following are the possible values:

            • pending - AFI bitstream generation is in progress.
            • available - The AFI is available for use.
            • failed - AFI bitstream generation failed.
            • unavailable - The AFI is no longer available for use.
          • Message (string) --

            If the state is failed , this is the error message.

        • CreateTime (datetime) --

          The date and time the AFI was created.

        • UpdateTime (datetime) --

          The time of the most recent update to the AFI.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the AFI.

        • OwnerAlias (string) --

          The alias of the AFI owner. Possible values include self , amazon , and aws-marketplace .

        • ProductCodes (list) --

          The product codes for the AFI.

          • (dict) --

            Describes a product code.

            • ProductCodeId (string) --

              The product code.

            • ProductCodeType (string) --

              The type of product code.

        • Tags (list) --

          Any tags assigned to the AFI.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • Public (boolean) --

          Indicates whether the AFI is public.

        • DataRetentionSupport (boolean) --

          Indicates whether data retention support is enabled for the AFI.

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

describe_host_reservation_offerings(**kwargs)

Describes the Dedicated Host reservations that are available to purchase.

The results describe all of the Dedicated Host reservation offerings, including offerings that might not match the instance family and Region of your Dedicated Hosts. When purchasing an offering, ensure that the instance family and Region of the offering matches that of the Dedicated Hosts with which it is to be associated. For more information about supported instance types, see Dedicated Hosts in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_host_reservation_offerings(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxDuration=123,
    MaxResults=123,
    MinDuration=123,
    NextToken='string',
    OfferingId='string'
)
Parameters
  • Filters (list) --

    The filters.

    • instance-family - The instance family of the offering (for example, m4 ).
    • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxDuration (integer) -- This is the maximum duration of the reservation to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.
  • MinDuration (integer) -- This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.
  • NextToken (string) -- The token to use to retrieve the next page of results.
  • OfferingId (string) -- The ID of the reservation offering.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'OfferingSet': [
        {
            'CurrencyCode': 'USD',
            'Duration': 123,
            'HourlyPrice': 'string',
            'InstanceFamily': 'string',
            'OfferingId': 'string',
            'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
            'UpfrontPrice': 'string'
        },
    ]
}

Response Structure

  • (dict) --

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

    • OfferingSet (list) --

      Information about the offerings.

      • (dict) --

        Details about the Dedicated Host Reservation offering.

        • CurrencyCode (string) --

          The currency of the offering.

        • Duration (integer) --

          The duration of the offering (in seconds).

        • HourlyPrice (string) --

          The hourly price of the offering.

        • InstanceFamily (string) --

          The instance family of the offering.

        • OfferingId (string) --

          The ID of the offering.

        • PaymentOption (string) --

          The available payment option.

        • UpfrontPrice (string) --

          The upfront price of the offering. Does not apply to No Upfront offerings.

describe_host_reservations(**kwargs)

Describes reservations that are associated with Dedicated Hosts in your account.

See also: AWS API Documentation

Request Syntax

response = client.describe_host_reservations(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    HostReservationIdSet=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • instance-family - The instance family (for example, m4 ).
    • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront ).
    • state - The state of the reservation (payment-pending | payment-failed | active | retired ).
    • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • HostReservationIdSet (list) --

    The host reservation IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.
  • NextToken (string) -- The token to use to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'HostReservationSet': [
        {
            'Count': 123,
            'CurrencyCode': 'USD',
            'Duration': 123,
            'End': datetime(2015, 1, 1),
            'HostIdSet': [
                'string',
            ],
            'HostReservationId': 'string',
            'HourlyPrice': 'string',
            'InstanceFamily': 'string',
            'OfferingId': 'string',
            'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
            'Start': datetime(2015, 1, 1),
            'State': 'payment-pending'|'payment-failed'|'active'|'retired',
            'UpfrontPrice': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • HostReservationSet (list) --

      Details about the reservation's configuration.

      • (dict) --

        Details about the Dedicated Host Reservation and associated Dedicated Hosts.

        • Count (integer) --

          The number of Dedicated Hosts the reservation is associated with.

        • CurrencyCode (string) --

          The currency in which the upfrontPrice and hourlyPrice amounts are specified. At this time, the only supported currency is USD .

        • Duration (integer) --

          The length of the reservation's term, specified in seconds. Can be 31536000 (1 year) | 94608000 (3 years) .

        • End (datetime) --

          The date and time that the reservation ends.

        • HostIdSet (list) --

          The IDs of the Dedicated Hosts associated with the reservation.

          • (string) --
        • HostReservationId (string) --

          The ID of the reservation that specifies the associated Dedicated Hosts.

        • HourlyPrice (string) --

          The hourly price of the reservation.

        • InstanceFamily (string) --

          The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.

        • OfferingId (string) --

          The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.

        • PaymentOption (string) --

          The payment option selected for this reservation.

        • Start (datetime) --

          The date and time that the reservation started.

        • State (string) --

          The state of the reservation.

        • UpfrontPrice (string) --

          The upfront price of the reservation.

        • Tags (list) --

          Any tags assigned to the Dedicated Host Reservation.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_hosts(**kwargs)

Describes the specified Dedicated Hosts or all your Dedicated Hosts.

The results describe only the Dedicated Hosts in the Region you're currently using. All listed instances consume capacity on your Dedicated Host. Dedicated Hosts that have recently been released are listed with the state released .

See also: AWS API Documentation

Request Syntax

response = client.describe_hosts(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    HostIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • auto-placement - Whether auto-placement is enabled or disabled (on | off ).
    • availability-zone - The Availability Zone of the host.
    • client-token - The idempotency token that you provided when you allocated the host.
    • host-reservation-id - The ID of the reservation assigned to this host.
    • instance-type - The instance type size that the Dedicated Host is configured to support.
    • state - The allocation state of the Dedicated Host (available | under-assessment | permanent-failure | released | released-permanent-failure ).
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • HostIds (list) --

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

    • (string) --
  • MaxResults (integer) --

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

    You cannot specify this parameter and the host IDs parameter in the same request.

  • NextToken (string) -- The token to use to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'Hosts': [
        {
            'AutoPlacement': 'on'|'off',
            'AvailabilityZone': 'string',
            'AvailableCapacity': {
                'AvailableInstanceCapacity': [
                    {
                        'AvailableCapacity': 123,
                        'InstanceType': 'string',
                        'TotalCapacity': 123
                    },
                ],
                'AvailableVCpus': 123
            },
            'ClientToken': 'string',
            'HostId': 'string',
            'HostProperties': {
                'Cores': 123,
                'InstanceType': 'string',
                'InstanceFamily': 'string',
                'Sockets': 123,
                'TotalVCpus': 123
            },
            'HostReservationId': 'string',
            'Instances': [
                {
                    'InstanceId': 'string',
                    'InstanceType': 'string',
                    'OwnerId': 'string'
                },
            ],
            'State': 'available'|'under-assessment'|'permanent-failure'|'released'|'released-permanent-failure'|'pending',
            'AllocationTime': datetime(2015, 1, 1),
            'ReleaseTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'HostRecovery': 'on'|'off',
            'AllowsMultipleInstanceTypes': 'on'|'off',
            'OwnerId': 'string',
            'AvailabilityZoneId': 'string',
            'MemberOfServiceLinkedResourceGroup': True|False,
            'OutpostArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Hosts (list) --

      Information about the Dedicated Hosts.

      • (dict) --

        Describes the properties of the Dedicated Host.

        • AutoPlacement (string) --

          Whether auto-placement is on or off.

        • AvailabilityZone (string) --

          The Availability Zone of the Dedicated Host.

        • AvailableCapacity (dict) --

          Information about the instances running on the Dedicated Host.

          • AvailableInstanceCapacity (list) --

            The number of instances that can be launched onto the Dedicated Host depending on the host's available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.

            • (dict) --

              Information about the number of instances that can be launched onto the Dedicated Host.

              • AvailableCapacity (integer) --

                The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.

              • InstanceType (string) --

                The instance type supported by the Dedicated Host.

              • TotalCapacity (integer) --

                The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.

          • AvailableVCpus (integer) --

            The number of vCPUs available for launching instances onto the Dedicated Host.

        • ClientToken (string) --

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

        • HostId (string) --

          The ID of the Dedicated Host.

        • HostProperties (dict) --

          The hardware specifications of the Dedicated Host.

          • Cores (integer) --

            The number of cores on the Dedicated Host.

          • InstanceType (string) --

            The instance type supported by the Dedicated Host. For example, m5.large . If the host supports multiple instance types, no instanceType is returned.

          • InstanceFamily (string) --

            The instance family supported by the Dedicated Host. For example, m5 .

          • Sockets (integer) --

            The number of sockets on the Dedicated Host.

          • TotalVCpus (integer) --

            The total number of vCPUs on the Dedicated Host.

        • HostReservationId (string) --

          The reservation ID of the Dedicated Host. This returns a null response if the Dedicated Host doesn't have an associated reservation.

        • Instances (list) --

          The IDs and instance type that are currently running on the Dedicated Host.

          • (dict) --

            Describes an instance running on a Dedicated Host.

            • InstanceId (string) --

              The ID of instance that is running on the Dedicated Host.

            • InstanceType (string) --

              The instance type (for example, m3.medium ) of the running instance.

            • OwnerId (string) --

              The ID of the Amazon Web Services account that owns the instance.

        • State (string) --

          The Dedicated Host's state.

        • AllocationTime (datetime) --

          The time that the Dedicated Host was allocated.

        • ReleaseTime (datetime) --

          The time that the Dedicated Host was released.

        • Tags (list) --

          Any tags assigned to the Dedicated Host.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • HostRecovery (string) --

          Indicates whether host recovery is enabled or disabled for the Dedicated Host.

        • AllowsMultipleInstanceTypes (string) --

          Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is on , the Dedicated Host supports multiple instance types in the instance family. If the value is off , the Dedicated Host supports a single instance type only.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the Dedicated Host.

        • AvailabilityZoneId (string) --

          The ID of the Availability Zone in which the Dedicated Host is allocated.

        • MemberOfServiceLinkedResourceGroup (boolean) --

          Indicates whether the Dedicated Host is in a host resource group. If memberOfServiceLinkedResourceGroup is true , the host is in a host resource group; otherwise, it is not.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.

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

describe_iam_instance_profile_associations(**kwargs)

Describes your IAM instance profile associations.

See also: AWS API Documentation

Request Syntax

response = client.describe_iam_instance_profile_associations(
    AssociationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • AssociationIds (list) --

    The IAM instance profile associations.

    • (string) --
  • Filters (list) --

    The filters.

    • instance-id - The ID of the instance.
    • state - The state of the association (associating | associated | disassociating ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
  • NextToken (string) -- The token to request the next page of results.
Return type

dict

Returns

Response Syntax

{
    'IamInstanceProfileAssociations': [
        {
            'AssociationId': 'string',
            'InstanceId': 'string',
            'IamInstanceProfile': {
                'Arn': 'string',
                'Id': 'string'
            },
            'State': 'associating'|'associated'|'disassociating'|'disassociated',
            'Timestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • IamInstanceProfileAssociations (list) --

      Information about the IAM instance profile associations.

      • (dict) --

        Describes an association between an IAM instance profile and an instance.

        • AssociationId (string) --

          The ID of the association.

        • InstanceId (string) --

          The ID of the instance.

        • IamInstanceProfile (dict) --

          The IAM instance profile.

          • Arn (string) --

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

          • Id (string) --

            The ID of the instance profile.

        • State (string) --

          The state of the association.

        • Timestamp (datetime) --

          The time the IAM instance profile was associated with the instance.

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

Examples

This example describes the specified IAM instance profile association.

response = client.describe_iam_instance_profile_associations(
    AssociationIds=[
        'iip-assoc-0db249b1f25fa24b8',
    ],
)

print(response)

Expected Output:

{
    'IamInstanceProfileAssociations': [
        {
            'AssociationId': 'iip-assoc-0db249b1f25fa24b8',
            'IamInstanceProfile': {
                'Arn': 'arn:aws:iam::123456789012:instance-profile/admin-role',
                'Id': 'AIPAJVQN4F5WVLGCJDRGM',
            },
            'InstanceId': 'i-09eb09efa73ec1dee',
            'State': 'associated',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_id_format(**kwargs)

Describes the ID format settings for your resources on a per-Region basis, for example, to view which resource types are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

These settings apply to the IAM user who makes the request; they do not apply to the entire Amazon Web Services account. By default, an IAM user defaults to the same settings as the root user, unless they explicitly override the settings by running the ModifyIdFormat command. Resources created with longer IDs are visible to all IAM users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

See also: AWS API Documentation

Request Syntax

response = client.describe_id_format(
    Resource='string'
)
Parameters
Resource (string) -- The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway
Return type
dict
Returns
Response Syntax
{
    'Statuses': [
        {
            'Deadline': datetime(2015, 1, 1),
            'Resource': 'string',
            'UseLongIds': True|False
        },
    ]
}

Response Structure

  • (dict) --
    • Statuses (list) --

      Information about the ID format for the resource.

      • (dict) --

        Describes the ID format for a resource.

        • Deadline (datetime) --

          The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

        • Resource (string) --

          The type of resource.

        • UseLongIds (boolean) --

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

describe_identity_id_format(**kwargs)

Describes the ID format settings for resources for the specified IAM user, IAM role, or root user. For example, you can view the resource types that are enabled for longer IDs. This request only returns information about resource types whose ID formats can be modified; it does not return information about other resource types. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide .

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

These settings apply to the principal specified in the request. They do not apply to the principal that makes the request.

See also: AWS API Documentation

Request Syntax

response = client.describe_identity_id_format(
    PrincipalArn='string',
    Resource='string'
)
Parameters
  • PrincipalArn (string) --

    [REQUIRED]

    The ARN of the principal, which can be an IAM role, IAM user, or the root user.

  • Resource (string) -- The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway
Return type

dict

Returns

Response Syntax

{
    'Statuses': [
        {
            'Deadline': datetime(2015, 1, 1),
            'Resource': 'string',
            'UseLongIds': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • Statuses (list) --

      Information about the ID format for the resources.

      • (dict) --

        Describes the ID format for a resource.

        • Deadline (datetime) --

          The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

        • Resource (string) --

          The type of resource.

        • UseLongIds (boolean) --

          Indicates whether longer IDs (17-character IDs) are enabled for the resource.

describe_image_attribute(**kwargs)

Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = client.describe_image_attribute(
    Attribute='description'|'kernel'|'ramdisk'|'launchPermission'|'productCodes'|'blockDeviceMapping'|'sriovNetSupport'|'bootMode'|'tpmSupport'|'uefiData'|'lastLaunchedTime',
    ImageId='string',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The AMI attribute.

    Note : The blockDeviceMapping attribute is deprecated. Using this attribute returns the Client.AuthFailure error. To get information about the block device mappings for an AMI, use the DescribeImages action.
  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'BlockDeviceMappings': [
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    'ImageId': 'string',
    'LaunchPermissions': [
        {
            'Group': 'all',
            'UserId': 'string',
            'OrganizationArn': 'string',
            'OrganizationalUnitArn': 'string'
        },
    ],
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'Description': {
        'Value': 'string'
    },
    'KernelId': {
        'Value': 'string'
    },
    'RamdiskId': {
        'Value': 'string'
    },
    'SriovNetSupport': {
        'Value': 'string'
    },
    'BootMode': {
        'Value': 'string'
    },
    'TpmSupport': {
        'Value': 'string'
    },
    'UefiData': {
        'Value': 'string'
    },
    'LastLaunchedTime': {
        'Value': 'string'
    }
}

Response Structure

  • (dict) --

    Describes an image attribute.

    • BlockDeviceMappings (list) --

      The block device mapping entries.

      • (dict) --

        Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh ).

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

          NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

          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.

        • Ebs (dict) --

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

          • DeleteOnTermination (boolean) --

            Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

          • Iops (integer) --

            The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3 : 3,000-16,000 IOPS
            • io1 : 100-64,000 IOPS
            • io2 : 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

          • SnapshotId (string) --

            The ID of the snapshot.

          • VolumeSize (integer) --

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

            The following are the supported volumes sizes for each volume type:

            • gp2 and gp3 :1-16,384
            • io1 and io2 : 4-16,384
            • st1 and sc1 : 125-16,384
            • standard : 1-1,024
          • VolumeType (string) --

            The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

          • KmsKeyId (string) --

            Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

            This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

          • Throughput (integer) --

            The throughput that the volume supports, in MiB/s.

            This parameter is valid only for gp3 volumes.

            Valid Range: Minimum value of 125. Maximum value of 1000.

          • OutpostArn (string) --

            The ARN of the Outpost on which the snapshot is stored.

            This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

          • Encrypted (boolean) --

            Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

            In no case can you remove encryption from an encrypted volume.

            Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

            This parameter is not returned by DescribeImageAttribute .

        • NoDevice (string) --

          To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

    • ImageId (string) --

      The ID of the AMI.

    • LaunchPermissions (list) --

      The launch permissions.

      • (dict) --

        Describes a launch permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn (string) --

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn (string) --

          The Amazon Resource Name (ARN) of an organizational unit (OU).

    • ProductCodes (list) --

      The product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • Description (dict) --

      A description for the AMI.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • KernelId (dict) --

      The kernel ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • RamdiskId (dict) --

      The RAM disk ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • SriovNetSupport (dict) --

      Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • BootMode (dict) --

      The boot mode.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • TpmSupport (dict) --

      If the image is configured for NitroTPM support, the value is v2.0 .

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • UefiData (dict) --

      Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot in the Amazon Elastic Compute Cloud User Guide .

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • LastLaunchedTime (dict) --

      The date and time, in ISO 8601 date-time format , when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.

      Note

      lastLaunchedTime data is available starting April 2017.

      • Value (string) --

        The attribute value. The value is case-sensitive.

Examples

This example describes the launch permissions for the specified AMI.

response = client.describe_image_attribute(
    Attribute='launchPermission',
    ImageId='ami-5731123e',
)

print(response)

Expected Output:

{
    'ImageId': 'ami-5731123e',
    'LaunchPermissions': [
        {
            'UserId': '123456789012',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_images(**kwargs)

Describes the specified images (AMIs, AKIs, and ARIs) available to you or all of the images available to you.

The images available to you include public images, private images that you own, and private images owned by other Amazon Web Services accounts for which you have explicit launch permissions.

Recently deregistered images appear in the returned results for a short interval and then return empty results. After all instances that reference a deregistered AMI are terminated, specifying the ID of the image will eventually return an error indicating that the AMI ID cannot be found.

See also: AWS API Documentation

Request Syntax

response = client.describe_images(
    ExecutableUsers=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImageIds=[
        'string',
    ],
    Owners=[
        'string',
    ],
    IncludeDeprecated=True|False,
    DryRun=True|False
)
Parameters
  • ExecutableUsers (list) --

    Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

    • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.
    • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.
    • If you specify all , all public AMIs are returned.
    • (string) --
  • Filters (list) --

    The filters.

    • architecture - The image architecture (i386 | x86_64 | arm64 ).
    • block-device-mapping.delete-on-termination - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.
    • block-device-mapping.device-name - The device name specified in the block device mapping (for example, /dev/sdh or xvdh ).
    • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.
    • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.
    • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard ).
    • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.
    • creation-date - The time when the image was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • description - The description of the image (provided during image creation).
    • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.
    • hypervisor - The hypervisor type (ovm | xen ).
    • image-id - The ID of the image.
    • image-type - The image type (machine | kernel | ramdisk ).
    • is-public - A Boolean that indicates whether the image is public.
    • kernel-id - The kernel ID.
    • manifest-location - The location of the image manifest.
    • name - The name of the AMI (provided during image creation).
    • owner-alias - The owner alias (amazon | aws-marketplace ). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.
    • platform - The platform. To only list Windows-based AMIs, use windows .
    • product-code - The product code.
    • product-code.type - The type of the product code (marketplace ).
    • ramdisk-id - The RAM disk ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (ebs | instance-store ).
    • state - The state of the image (available | pending | failed ).
    • state-reason-code - The reason code for the state change.
    • state-reason-message - The message for the state change.
    • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • virtualization-type - The virtualization type (paravirtual | hvm ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImageIds (list) --

    The image IDs.

    Default: Describes all images available to you.

    • (string) --
  • Owners (list) --

    Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , amazon , and aws-marketplace . If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • (string) --
  • IncludeDeprecated (boolean) --

    If true , all deprecated AMIs are included in the response. If false , no deprecated AMIs are included in the response. If no value is specified, the default value is false .

    Note

    If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false ) that you set for this parameter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Images': [
        {
            'Architecture': 'i386'|'x86_64'|'arm64'|'x86_64_mac',
            'CreationDate': 'string',
            'ImageId': 'string',
            'ImageLocation': 'string',
            'ImageType': 'machine'|'kernel'|'ramdisk',
            'Public': True|False,
            'KernelId': 'string',
            'OwnerId': 'string',
            'Platform': 'Windows',
            'PlatformDetails': 'string',
            'UsageOperation': 'string',
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'RamdiskId': 'string',
            'State': 'pending'|'available'|'invalid'|'deregistered'|'transient'|'failed'|'error',
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'VirtualName': 'string',
                    'Ebs': {
                        'DeleteOnTermination': True|False,
                        'Iops': 123,
                        'SnapshotId': 'string',
                        'VolumeSize': 123,
                        'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                        'KmsKeyId': 'string',
                        'Throughput': 123,
                        'OutpostArn': 'string',
                        'Encrypted': True|False
                    },
                    'NoDevice': 'string'
                },
            ],
            'Description': 'string',
            'EnaSupport': True|False,
            'Hypervisor': 'ovm'|'xen',
            'ImageOwnerAlias': 'string',
            'Name': 'string',
            'RootDeviceName': 'string',
            'RootDeviceType': 'ebs'|'instance-store',
            'SriovNetSupport': 'string',
            'StateReason': {
                'Code': 'string',
                'Message': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VirtualizationType': 'hvm'|'paravirtual',
            'BootMode': 'legacy-bios'|'uefi',
            'TpmSupport': 'v2.0',
            'DeprecationTime': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Images (list) --

      Information about the images.

      • (dict) --

        Describes an image.

        • Architecture (string) --

          The architecture of the image.

        • CreationDate (string) --

          The date and time the image was created.

        • ImageId (string) --

          The ID of the AMI.

        • ImageLocation (string) --

          The location of the AMI.

        • ImageType (string) --

          The type of image.

        • Public (boolean) --

          Indicates whether the image has public launch permissions. The value is true if this image has public launch permissions or false if it has only implicit and explicit launch permissions.

        • KernelId (string) --

          The kernel associated with the image, if any. Only applicable for machine images.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the image.

        • Platform (string) --

          This value is set to windows for Windows AMIs; otherwise, it is blank.

        • PlatformDetails (string) --

          The platform details associated with the billing code of the AMI. For more information, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide .

        • UsageOperation (string) --

          The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API . You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.

        • ProductCodes (list) --

          Any product codes associated with the AMI.

          • (dict) --

            Describes a product code.

            • ProductCodeId (string) --

              The product code.

            • ProductCodeType (string) --

              The type of product code.

        • RamdiskId (string) --

          The RAM disk associated with the image, if any. Only applicable for machine images.

        • State (string) --

          The current state of the AMI. If the state is available , the image is successfully registered and can be used to launch an instance.

        • BlockDeviceMappings (list) --

          Any block device mapping entries.

          • (dict) --

            Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

            • DeviceName (string) --

              The device name (for example, /dev/sdh or xvdh ).

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

              NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

              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.

            • Ebs (dict) --

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

              • DeleteOnTermination (boolean) --

                Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

              • Iops (integer) --

                The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                The following are the supported values for each volume type:

                • gp3 : 3,000-16,000 IOPS
                • io1 : 100-64,000 IOPS
                • io2 : 100-64,000 IOPS

                For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

                This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

              • SnapshotId (string) --

                The ID of the snapshot.

              • VolumeSize (integer) --

                The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                The following are the supported volumes sizes for each volume type:

                • gp2 and gp3 :1-16,384
                • io1 and io2 : 4-16,384
                • st1 and sc1 : 125-16,384
                • standard : 1-1,024
              • VolumeType (string) --

                The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

              • KmsKeyId (string) --

                Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

              • Throughput (integer) --

                The throughput that the volume supports, in MiB/s.

                This parameter is valid only for gp3 volumes.

                Valid Range: Minimum value of 125. Maximum value of 1000.

              • OutpostArn (string) --

                The ARN of the Outpost on which the snapshot is stored.

                This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

              • Encrypted (boolean) --

                Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

                In no case can you remove encryption from an encrypted volume.

                Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

                This parameter is not returned by DescribeImageAttribute .

            • NoDevice (string) --

              To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

        • Description (string) --

          The description of the AMI that was provided during image creation.

        • EnaSupport (boolean) --

          Specifies whether enhanced networking with ENA is enabled.

        • Hypervisor (string) --

          The hypervisor type of the image.

        • ImageOwnerAlias (string) --

          The Amazon Web Services account alias (for example, amazon , self ) or the Amazon Web Services account ID of the AMI owner.

        • Name (string) --

          The name of the AMI that was provided during image creation.

        • RootDeviceName (string) --

          The device name of the root device volume (for example, /dev/sda1 ).

        • RootDeviceType (string) --

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

        • SriovNetSupport (string) --

          Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

        • StateReason (dict) --

          The reason for the state change.

          • Code (string) --

            The reason code for the state change.

          • Message (string) --

            The message for the state change.

            • Server.InsufficientInstanceCapacity : There was insufficient capacity available to satisfy the launch request.
            • Server.InternalError : An internal error caused the instance to terminate during launch.
            • Server.ScheduledStop : The instance was stopped due to a scheduled retirement.
            • Server.SpotInstanceShutdown : The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
            • Server.SpotInstanceTermination : The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
            • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.
            • Client.InstanceTerminated : The instance was terminated or rebooted during AMI creation.
            • Client.InternalError : A client error caused the instance to terminate during launch.
            • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.
            • Client.UserInitiatedHibernate : Hibernation was initiated on 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 account limits.
        • Tags (list) --

          Any tags assigned to the image.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VirtualizationType (string) --

          The type of virtualization of the AMI.

        • BootMode (string) --

          The boot mode of the image. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide .

        • TpmSupport (string) --

          If the image is configured for NitroTPM support, the value is v2.0 . For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide .

        • DeprecationTime (string) --

          The date and time to deprecate the AMI, in UTC, in the following format: YYYY -MM -DD T*HH* :MM :SS Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

Examples

This example describes the specified AMI.

response = client.describe_images(
    ImageIds=[
        'ami-5731123e',
    ],
)

print(response)

Expected Output:

{
    'Images': [
        {
            'Architecture': 'x86_64',
            'BlockDeviceMappings': [
                {
                    'DeviceName': '/dev/sda1',
                    'Ebs': {
                        'DeleteOnTermination': True,
                        'SnapshotId': 'snap-1234567890abcdef0',
                        'VolumeSize': 8,
                        'VolumeType': 'standard',
                    },
                },
            ],
            'Description': 'An AMI for my server',
            'Hypervisor': 'xen',
            'ImageId': 'ami-5731123e',
            'ImageLocation': '123456789012/My server',
            'ImageType': 'machine',
            'KernelId': 'aki-88aa75e1',
            'Name': 'My server',
            'OwnerId': '123456789012',
            'Public': False,
            'RootDeviceName': '/dev/sda1',
            'RootDeviceType': 'ebs',
            'State': 'available',
            'VirtualizationType': 'paravirtual',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_import_image_tasks(**kwargs)

Displays details about an import virtual machine or import snapshot tasks that are already created.

See also: AWS API Documentation

Request Syntax

response = client.describe_import_image_tasks(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImportTaskIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    Filter tasks using the task-state filter and one of the following values: active , completed , deleting , or deleted .

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImportTaskIds (list) --

    The IDs of the import image tasks.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call.
  • NextToken (string) -- A token that indicates the next page of results.
Return type

dict

Returns

Response Syntax

{
    'ImportImageTasks': [
        {
            'Architecture': 'string',
            'Description': 'string',
            'Encrypted': True|False,
            'Hypervisor': 'string',
            'ImageId': 'string',
            'ImportTaskId': 'string',
            'KmsKeyId': 'string',
            'LicenseType': 'string',
            'Platform': 'string',
            'Progress': 'string',
            'SnapshotDetails': [
                {
                    'Description': 'string',
                    'DeviceName': 'string',
                    'DiskImageSize': 123.0,
                    'Format': 'string',
                    'Progress': 'string',
                    'SnapshotId': 'string',
                    'Status': 'string',
                    'StatusMessage': 'string',
                    'Url': 'string',
                    'UserBucket': {
                        'S3Bucket': 'string',
                        'S3Key': 'string'
                    }
                },
            ],
            'Status': 'string',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'LicenseSpecifications': [
                {
                    'LicenseConfigurationArn': 'string'
                },
            ],
            'UsageOperation': 'string',
            'BootMode': 'legacy-bios'|'uefi'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ImportImageTasks (list) --

      A list of zero or more import image tasks that are currently active or were completed or canceled in the previous 7 days.

      • (dict) --

        Describes an import image task.

        • Architecture (string) --

          The architecture of the virtual machine.

          Valid values: i386 | x86_64 | arm64

        • Description (string) --

          A description of the import task.

        • Encrypted (boolean) --

          Indicates whether the image is encrypted.

        • Hypervisor (string) --

          The target hypervisor for the import task.

          Valid values: xen

        • ImageId (string) --

          The ID of the Amazon Machine Image (AMI) of the imported virtual machine.

        • ImportTaskId (string) --

          The ID of the import image task.

        • KmsKeyId (string) --

          The identifier for the KMS key that was used to create the encrypted image.

        • LicenseType (string) --

          The license type of the virtual machine.

        • Platform (string) --

          The description string for the import image task.

        • Progress (string) --

          The percentage of progress of the import image task.

        • SnapshotDetails (list) --

          Information about the snapshots.

          • (dict) --

            Describes the snapshot created from the imported disk.

            • Description (string) --

              A description for the snapshot.

            • DeviceName (string) --

              The block device mapping for the snapshot.

            • DiskImageSize (float) --

              The size of the disk in the snapshot, in GiB.

            • Format (string) --

              The format of the disk image from which the snapshot is created.

            • Progress (string) --

              The percentage of progress for the task.

            • SnapshotId (string) --

              The snapshot ID of the disk being imported.

            • Status (string) --

              A brief status of the snapshot creation.

            • StatusMessage (string) --

              A detailed status message for the snapshot creation.

            • Url (string) --

              The URL used to access the disk image.

            • UserBucket (dict) --

              The Amazon S3 bucket for the disk image.

              • S3Bucket (string) --

                The Amazon S3 bucket from which the disk image was created.

              • S3Key (string) --

                The file name of the disk image.

        • Status (string) --

          A brief status for the import image task.

        • StatusMessage (string) --

          A descriptive status message for the import image task.

        • Tags (list) --

          The tags for the import image 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 256 Unicode characters.

        • LicenseSpecifications (list) --

          The ARNs of the license configurations that are associated with the import image task.

          • (dict) --

            The response information for license configurations.

            • LicenseConfigurationArn (string) --

              The ARN of a license configuration.

        • UsageOperation (string) --

          The usage operation value.

        • BootMode (string) --

          The boot mode of the virtual machine.

    • NextToken (string) --

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

describe_import_snapshot_tasks(**kwargs)

Describes your import snapshot tasks.

See also: AWS API Documentation

Request Syntax

response = client.describe_import_snapshot_tasks(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImportTaskIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImportTaskIds (list) --

    A list of import snapshot task IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
  • NextToken (string) -- A token that indicates the next page of results.
Return type

dict

Returns

Response Syntax

{
    'ImportSnapshotTasks': [
        {
            'Description': 'string',
            'ImportTaskId': 'string',
            'SnapshotTaskDetail': {
                'Description': 'string',
                'DiskImageSize': 123.0,
                'Encrypted': True|False,
                'Format': 'string',
                'KmsKeyId': 'string',
                'Progress': 'string',
                'SnapshotId': 'string',
                'Status': 'string',
                'StatusMessage': 'string',
                'Url': 'string',
                'UserBucket': {
                    'S3Bucket': 'string',
                    'S3Key': 'string'
                }
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ImportSnapshotTasks (list) --

      A list of zero or more import snapshot tasks that are currently active or were completed or canceled in the previous 7 days.

      • (dict) --

        Describes an import snapshot task.

        • Description (string) --

          A description of the import snapshot task.

        • ImportTaskId (string) --

          The ID of the import snapshot task.

        • SnapshotTaskDetail (dict) --

          Describes an import snapshot task.

          • Description (string) --

            The description of the snapshot.

          • DiskImageSize (float) --

            The size of the disk in the snapshot, in GiB.

          • Encrypted (boolean) --

            Indicates whether the snapshot is encrypted.

          • Format (string) --

            The format of the disk image from which the snapshot is created.

          • KmsKeyId (string) --

            The identifier for the KMS key that was used to create the encrypted snapshot.

          • Progress (string) --

            The percentage of completion for the import snapshot task.

          • SnapshotId (string) --

            The snapshot ID of the disk being imported.

          • Status (string) --

            A brief status for the import snapshot task.

          • StatusMessage (string) --

            A detailed status message for the import snapshot task.

          • Url (string) --

            The URL of the disk image from which the snapshot is created.

          • UserBucket (dict) --

            The Amazon S3 bucket for the disk image.

            • S3Bucket (string) --

              The Amazon S3 bucket from which the disk image was created.

            • S3Key (string) --

              The file name of the disk image.

        • Tags (list) --

          The tags for the import snapshot 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 256 Unicode characters.

    • NextToken (string) --

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

describe_instance_attribute(**kwargs)

Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport

See also: AWS API Documentation

Request Syntax

response = client.describe_instance_attribute(
    Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop',
    DryRun=True|False,
    InstanceId='string'
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The instance attribute.

    Note: The enaSupport attribute is not supported at this time.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

Return type

dict

Returns

Response Syntax

{
    'Groups': [
        {
            'GroupName': 'string',
            'GroupId': 'string'
        },
    ],
    'BlockDeviceMappings': [
        {
            'DeviceName': 'string',
            'Ebs': {
                'AttachTime': datetime(2015, 1, 1),
                'DeleteOnTermination': True|False,
                'Status': 'attaching'|'attached'|'detaching'|'detached',
                'VolumeId': 'string'
            }
        },
    ],
    'DisableApiTermination': {
        'Value': True|False
    },
    'EnaSupport': {
        'Value': True|False
    },
    'EnclaveOptions': {
        'Enabled': True|False
    },
    'EbsOptimized': {
        'Value': True|False
    },
    'InstanceId': 'string',
    'InstanceInitiatedShutdownBehavior': {
        'Value': 'string'
    },
    'InstanceType': {
        'Value': 'string'
    },
    'KernelId': {
        'Value': 'string'
    },
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'RamdiskId': {
        'Value': 'string'
    },
    'RootDeviceName': {
        'Value': 'string'
    },
    'SourceDestCheck': {
        'Value': True|False
    },
    'SriovNetSupport': {
        'Value': 'string'
    },
    'UserData': {
        'Value': 'string'
    },
    'DisableApiStop': {
        'Value': True|False
    }
}

Response Structure

  • (dict) --

    Describes an instance attribute.

    • Groups (list) --

      The security groups associated with the instance.

      • (dict) --

        Describes a security group.

        • GroupName (string) --

          The name of the security group.

        • GroupId (string) --

          The ID of the security group.

    • BlockDeviceMappings (list) --

      The block device mapping of the instance.

      • (dict) --

        Describes a block device mapping.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh ).

        • Ebs (dict) --

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

          • AttachTime (datetime) --

            The time stamp when the attachment initiated.

          • DeleteOnTermination (boolean) --

            Indicates whether the volume is deleted on instance termination.

          • Status (string) --

            The attachment state.

          • VolumeId (string) --

            The ID of the EBS volume.

    • DisableApiTermination (dict) --

      If the value is true , you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • EnaSupport (dict) --

      Indicates whether enhanced networking with ENA is enabled.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • EnclaveOptions (dict) --

      To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true ; otherwise, set it to false .

      • Enabled (boolean) --

        If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

    • EbsOptimized (dict) --

      Indicates whether the instance is optimized for Amazon EBS I/O.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • InstanceId (string) --

      The ID of the instance.

    • InstanceInitiatedShutdownBehavior (dict) --

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

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • InstanceType (dict) --

      The instance type.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • KernelId (dict) --

      The kernel ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • ProductCodes (list) --

      A list of product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • RamdiskId (dict) --

      The RAM disk ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • RootDeviceName (dict) --

      The device name of the root device volume (for example, /dev/sda1 ).

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • SourceDestCheck (dict) --

      Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • SriovNetSupport (dict) --

      Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • UserData (dict) --

      The user data.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • DisableApiStop (dict) --

      To enable the instance for Amazon Web Services Stop Protection, set this parameter to true ; otherwise, set it to false .

      • Value (boolean) --

        The attribute value. The valid values are true or false .

Examples

This example describes the instance type of the specified instance.

response = client.describe_instance_attribute(
    Attribute='instanceType',
    InstanceId='i-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'InstanceId': 'i-1234567890abcdef0',
    'InstanceType': {
        'Value': 't1.micro',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the disableApiTermination attribute of the specified instance.

response = client.describe_instance_attribute(
    Attribute='disableApiTermination',
    InstanceId='i-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'DisableApiTermination': {
        'Value': 'false',
    },
    'InstanceId': 'i-1234567890abcdef0',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the blockDeviceMapping attribute of the specified instance.

response = client.describe_instance_attribute(
    Attribute='blockDeviceMapping',
    InstanceId='i-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'BlockDeviceMappings': [
        {
            'DeviceName': '/dev/sda1',
            'Ebs': {
                'AttachTime': datetime(2013, 5, 17, 22, 42, 34, 4, 137, 0),
                'DeleteOnTermination': True,
                'Status': 'attached',
                'VolumeId': 'vol-049df61146c4d7901',
            },
        },
        {
            'DeviceName': '/dev/sdf',
            'Ebs': {
                'AttachTime': datetime(2013, 9, 10, 23, 7, 0, 1, 253, 0),
                'DeleteOnTermination': False,
                'Status': 'attached',
                'VolumeId': 'vol-049df61146c4d7901',
            },
        },
    ],
    'InstanceId': 'i-1234567890abcdef0',
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_instance_credit_specifications(**kwargs)

Describes the credit option for CPU usage of the specified burstable performance instances. The credit options are standard and unlimited .

If you do not specify an instance ID, Amazon EC2 returns burstable performance instances with the unlimited credit option, as well as instances that were previously configured as T2, T3, and T3a with the unlimited credit option. For example, if you resize a T2 instance, while it is configured as unlimited , to an M4 instance, Amazon EC2 returns the M4 instance.

If you specify one or more instance IDs, Amazon EC2 returns the credit option (standard or unlimited ) of those instances. If you specify an instance ID that is not valid, such as an instance that is not a burstable performance instance, an error is returned.

Recently terminated instances might appear in the returned results. This interval is usually less than one hour.

If an Availability Zone is experiencing a service disruption and you specify instance IDs in the affected zone, or do not specify any instance IDs at all, the call fails. If you specify only instance IDs in an unaffected zone, the call works normally.

For more information, see Burstable performance instances in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_instance_credit_specifications(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • instance-id - The ID of the instance.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 1000 explicitly specified instance IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'InstanceCreditSpecifications': [
        {
            'InstanceId': 'string',
            'CpuCredits': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstanceCreditSpecifications (list) --

      Information about the credit option for CPU usage of an instance.

      • (dict) --

        Describes the credit option for CPU usage of a burstable performance instance.

        • InstanceId (string) --

          The ID of the instance.

        • CpuCredits (string) --

          The credit option for CPU usage of the instance.

          Valid values: standard | unlimited

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

describe_instance_event_notification_attributes(**kwargs)

Describes the tag keys that are registered to appear in scheduled event notifications for resources in the current Region.

See also: AWS API Documentation

Request Syntax

response = client.describe_instance_event_notification_attributes(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceTagAttribute': {
        'InstanceTagKeys': [
            'string',
        ],
        'IncludeAllTagsOfInstance': True|False
    }
}

Response Structure

  • (dict) --
    • InstanceTagAttribute (dict) --

      Information about the registered tag keys.

      • InstanceTagKeys (list) --

        The registered tag keys.

        • (string) --
      • IncludeAllTagsOfInstance (boolean) --

        Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. true indicates that all tag keys in the current Region are registered.

describe_instance_event_windows(**kwargs)

Describes the specified event windows or all event windows.

If you specify event window IDs, the output includes information for only the specified event windows. If you specify filters, the output includes information for only those event windows that meet the filter criteria. If you do not specify event windows IDs or filters, the output includes information for all event windows, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_instance_event_windows(
    DryRun=True|False,
    InstanceEventWindowIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceEventWindowIds (list) --

    The IDs of the event windows.

    • (string) --
  • Filters (list) --

    One or more filters.

    • dedicated-host-id - The event windows associated with the specified Dedicated Host ID.
    • event-window-name - The event windows associated with the specified names.
    • instance-id - The event windows associated with the specified instance ID.
    • instance-tag - The event windows associated with the specified tag and value.
    • instance-tag-key - The event windows associated with the specified tag key, regardless of the value.
    • instance-tag-value - The event windows associated with the specified tag value, regardless of the key.
    • tag:<key> - The key/value combination of a tag assigned to the event window. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value CMX , specify tag:Owner for the filter name and CMX for the filter value.
    • tag-key - The key of a tag assigned to the event window. Use this filter to find all event windows that have a tag with a specific key, regardless of the tag value.
    • tag-value - The value of a tag assigned to the event window. Use this filter to find all event windows that have a tag with a specific value, regardless of the tag key.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 20 and 500. You cannot specify this parameter and the event window IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Return type

dict

Returns

Response Syntax

{
    'InstanceEventWindows': [
        {
            'InstanceEventWindowId': 'string',
            'TimeRanges': [
                {
                    'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                    'StartHour': 123,
                    'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                    'EndHour': 123
                },
            ],
            'Name': 'string',
            'CronExpression': 'string',
            'AssociationTarget': {
                'InstanceIds': [
                    'string',
                ],
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'DedicatedHostIds': [
                    'string',
                ]
            },
            'State': 'creating'|'deleting'|'active'|'deleted',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstanceEventWindows (list) --

      Information about the event windows.

      • (dict) --

        The event window.

        • InstanceEventWindowId (string) --

          The ID of the event window.

        • TimeRanges (list) --

          One or more time ranges defined for the event window.

          • (dict) --

            The start day and time and the end day and time of the time range, in UTC.

            • StartWeekDay (string) --

              The day on which the time range begins.

            • StartHour (integer) --

              The hour when the time range begins.

            • EndWeekDay (string) --

              The day on which the time range ends.

            • EndHour (integer) --

              The hour when the time range ends.

        • Name (string) --

          The name of the event window.

        • CronExpression (string) --

          The cron expression defined for the event window.

        • AssociationTarget (dict) --

          One or more targets associated with the event window.

          • InstanceIds (list) --

            The IDs of the instances associated with the event window.

            • (string) --
          • Tags (list) --

            The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

            • (dict) --

              Describes a tag.

              • Key (string) --

                The key of the tag.

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

              • Value (string) --

                The value of the tag.

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

          • DedicatedHostIds (list) --

            The IDs of the Dedicated Hosts associated with the event window.

            • (string) --
        • State (string) --

          The current state of the event window.

        • Tags (list) --

          The instance tags associated with the event window.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_instance_status(**kwargs)

Describes the status of the specified instances or all of your instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.

Instance status includes the following components:

  • Status checks - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see Status checks for your instances and Troubleshoot instances with failed status checks in the Amazon EC2 User Guide .
  • Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see Scheduled events for your instances in the Amazon EC2 User Guide .
  • Instance state - You can manage your instances from the moment you launch them through their termination. For more information, see Instance lifecycle in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_instance_status(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False,
    IncludeAllInstances=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone of the instance.
    • event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop ).
    • event.description - A description of the event.
    • event.instance-event-id - The ID of the event whose date and time you are modifying.
    • event.not-after - The latest end time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before - The earliest start time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before-deadline - The deadline for starting the event (for example, 2014-09-15T17:15:20.000Z ).
    • instance-state-code - The code for the instance state, as a 16-bit unsigned integer. The high byte is used for internal purposes 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-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 100 explicitly specified instance IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to retrieve the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IncludeAllInstances (boolean) --

    When true , includes the health status for all instances. When false , includes the health status for running instances only.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'InstanceStatuses': [
        {
            'AvailabilityZone': 'string',
            'OutpostArn': 'string',
            'Events': [
                {
                    'InstanceEventId': 'string',
                    'Code': 'instance-reboot'|'system-reboot'|'system-maintenance'|'instance-retirement'|'instance-stop',
                    'Description': 'string',
                    'NotAfter': datetime(2015, 1, 1),
                    'NotBefore': datetime(2015, 1, 1),
                    'NotBeforeDeadline': datetime(2015, 1, 1)
                },
            ],
            'InstanceId': 'string',
            'InstanceState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceStatus': {
                'Details': [
                    {
                        'ImpairedSince': datetime(2015, 1, 1),
                        'Name': 'reachability',
                        'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                    },
                ],
                'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
            },
            'SystemStatus': {
                'Details': [
                    {
                        'ImpairedSince': datetime(2015, 1, 1),
                        'Name': 'reachability',
                        'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                    },
                ],
                'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstanceStatuses (list) --

      Information about the status of the instances.

      • (dict) --

        Describes the status of an instance.

        • AvailabilityZone (string) --

          The Availability Zone of the instance.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • Events (list) --

          Any scheduled events associated with the instance.

          • (dict) --

            Describes a scheduled event for an instance.

            • InstanceEventId (string) --

              The ID of the event.

            • Code (string) --

              The event code.

            • Description (string) --

              A description of the event.

              After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].

            • NotAfter (datetime) --

              The latest scheduled end time for the event.

            • NotBefore (datetime) --

              The earliest scheduled start time for the event.

            • NotBeforeDeadline (datetime) --

              The deadline for starting the event.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceState (dict) --

          The intended state of the instance. DescribeInstanceStatus requires that an instance be in the running state.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceStatus (dict) --

          Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

          • Details (list) --

            The system instance health or application instance health.

            • (dict) --

              Describes the instance status.

              • ImpairedSince (datetime) --

                The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

              • Name (string) --

                The type of instance status.

              • Status (string) --

                The status.

          • Status (string) --

            The status.

        • SystemStatus (dict) --

          Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.

          • Details (list) --

            The system instance health or application instance health.

            • (dict) --

              Describes the instance status.

              • ImpairedSince (datetime) --

                The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

              • Name (string) --

                The type of instance status.

              • Status (string) --

                The status.

          • Status (string) --

            The status.

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

Examples

This example describes the current status of the specified instance.

response = client.describe_instance_status(
    InstanceIds=[
        'i-1234567890abcdef0',
    ],
)

print(response)

Expected Output:

{
    'InstanceStatuses': [
        {
            'AvailabilityZone': 'us-east-1d',
            'InstanceId': 'i-1234567890abcdef0',
            'InstanceState': {
                'Code': 16,
                'Name': 'running',
            },
            'InstanceStatus': {
                'Details': [
                    {
                        'Name': 'reachability',
                        'Status': 'passed',
                    },
                ],
                'Status': 'ok',
            },
            'SystemStatus': {
                'Details': [
                    {
                        'Name': 'reachability',
                        'Status': 'passed',
                    },
                ],
                'Status': 'ok',
            },
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_instance_type_offerings(**kwargs)

Returns a list of all instance types offered. The results can be filtered by location (Region or Availability Zone). If no location is specified, the instance types offered in the current Region are returned.

See also: AWS API Documentation

Request Syntax

response = client.describe_instance_type_offerings(
    DryRun=True|False,
    LocationType='region'|'availability-zone'|'availability-zone-id',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LocationType (string) -- The location type.
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • location - This depends on the location type. For example, if the location type is region (default), the location is the Region code (for example, us-east-2 .)
    • instance-type - The instance type. For example, c5.2xlarge .
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the next token value.
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'InstanceTypeOfferings': [
        {
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'LocationType': 'region'|'availability-zone'|'availability-zone-id',
            'Location': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstanceTypeOfferings (list) --

      The instance types offered.

      • (dict) --

        The instance types offered.

        • InstanceType (string) --

          The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

        • LocationType (string) --

          The location type.

        • Location (string) --

          The identifier for the location. This depends on the location type. For example, if the location type is region , the location is the Region code (for example, us-east-2 .)

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

describe_instance_types(**kwargs)

Describes the details of the instance types that are offered in a location. The results can be filtered by the attributes of the instance types.

See also: AWS API Documentation

Request Syntax

response = client.describe_instance_types(
    DryRun=True|False,
    InstanceTypes=[
        'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTypes (list) --

    The instance types. For more information, see Instance types in the Amazon EC2 User Guide .

    • (string) --
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • auto-recovery-supported - Indicates whether auto recovery is supported (true | false ).
    • bare-metal - Indicates whether it is a bare metal instance type (true | false ).
    • burstable-performance-supported - Indicates whether it is a burstable performance instance type (true | false ).
    • current-generation - Indicates whether this instance type is the latest generation instance type of an instance family (true | false ).
    • ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.
    • ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output storage operations per second for an EBS-optimized instance type.
    • ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline throughput performance for an EBS-optimized instance type, in MB/s.
    • ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.
    • ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage operations per second for an EBS-optimized instance type.
    • ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum throughput performance for an EBS-optimized instance type, in MB/s.
    • ebs-info.ebs-optimized-support - Indicates whether the instance type is EBS-optimized (supported | unsupported | default ).
    • ebs-info.encryption-support - Indicates whether EBS encryption is supported (supported | unsupported ).
    • ebs-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for EBS volumes (required | supported | unsupported ).
    • free-tier-eligible - Indicates whether the instance type is eligible to use in the free tier (true | false ).
    • hibernation-supported - Indicates whether On-Demand hibernation is supported (true | false ).
    • hypervisor - The hypervisor (nitro | xen ).
    • instance-storage-info.disk.count - The number of local disks.
    • instance-storage-info.disk.size-in-gb - The storage size of each instance storage disk, in GB.
    • instance-storage-info.disk.type - The storage technology for the local instance storage disks (hdd | ssd ).
    • instance-storage-info.encryption-support - Indicates whether data is encrypted at rest (required | supported | unsupported ).
    • instance-storage-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for instance store (required | supported | unsupported ).
    • instance-storage-info.total-size-in-gb - The total amount of storage available from all local instance storage, in GB.
    • instance-storage-supported - Indicates whether the instance type has local instance storage (true | false ).
    • instance-type - The instance type (for example c5.2xlarge or c5*).
    • memory-info.size-in-mib - The memory size.
    • network-info.efa-info.maximum-efa-interfaces - The maximum number of Elastic Fabric Adapters (EFAs) per instance.
    • network-info.efa-supported - Indicates whether the instance type supports Elastic Fabric Adapter (EFA) (true | false ).
    • network-info.ena-support - Indicates whether Elastic Network Adapter (ENA) is supported or required (required | supported | unsupported ).
    • network-info.encryption-in-transit-supported - Indicates whether the instance type automatically encrypts in-transit traffic between instances (true | false ).
    • network-info.ipv4-addresses-per-interface - The maximum number of private IPv4 addresses per network interface.
    • network-info.ipv6-addresses-per-interface - The maximum number of private IPv6 addresses per network interface.
    • network-info.ipv6-supported - Indicates whether the instance type supports IPv6 (true | false ).
    • network-info.maximum-network-cards - The maximum number of network cards per instance.
    • network-info.maximum-network-interfaces - The maximum number of network interfaces per instance.
    • network-info.network-performance - The network performance (for example, "25 Gigabit").
    • processor-info.supported-architecture - The CPU architecture (arm64 | i386 | x86_64 ).
    • processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in GHz.
    • supported-boot-mode - The boot mode (legacy-bios | uefi ).
    • supported-root-device-type - The root device type (ebs | instance-store ).
    • supported-usage-class - The usage class (on-demand | spot ).
    • supported-virtualization-type - The virtualization type (hvm | paravirtual ).
    • vcpu-info.default-cores - The default number of cores for the instance type.
    • vcpu-info.default-threads-per-core - The default number of threads per core for the instance type.
    • vcpu-info.default-vcpus - The default number of vCPUs for the instance type.
    • vcpu-info.valid-cores - The number of cores that can be configured for the instance type.
    • vcpu-info.valid-threads-per-core - The number of threads per core that can be configured for the instance type. For example, "1" or "1,2".
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the next token value.
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'InstanceTypes': [
        {
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'CurrentGeneration': True|False,
            'FreeTierEligible': True|False,
            'SupportedUsageClasses': [
                'spot'|'on-demand',
            ],
            'SupportedRootDeviceTypes': [
                'ebs'|'instance-store',
            ],
            'SupportedVirtualizationTypes': [
                'hvm'|'paravirtual',
            ],
            'BareMetal': True|False,
            'Hypervisor': 'nitro'|'xen',
            'ProcessorInfo': {
                'SupportedArchitectures': [
                    'i386'|'x86_64'|'arm64'|'x86_64_mac',
                ],
                'SustainedClockSpeedInGhz': 123.0
            },
            'VCpuInfo': {
                'DefaultVCpus': 123,
                'DefaultCores': 123,
                'DefaultThreadsPerCore': 123,
                'ValidCores': [
                    123,
                ],
                'ValidThreadsPerCore': [
                    123,
                ]
            },
            'MemoryInfo': {
                'SizeInMiB': 123
            },
            'InstanceStorageSupported': True|False,
            'InstanceStorageInfo': {
                'TotalSizeInGB': 123,
                'Disks': [
                    {
                        'SizeInGB': 123,
                        'Count': 123,
                        'Type': 'hdd'|'ssd'
                    },
                ],
                'NvmeSupport': 'unsupported'|'supported'|'required',
                'EncryptionSupport': 'unsupported'|'required'
            },
            'EbsInfo': {
                'EbsOptimizedSupport': 'unsupported'|'supported'|'default',
                'EncryptionSupport': 'unsupported'|'supported',
                'EbsOptimizedInfo': {
                    'BaselineBandwidthInMbps': 123,
                    'BaselineThroughputInMBps': 123.0,
                    'BaselineIops': 123,
                    'MaximumBandwidthInMbps': 123,
                    'MaximumThroughputInMBps': 123.0,
                    'MaximumIops': 123
                },
                'NvmeSupport': 'unsupported'|'supported'|'required'
            },
            'NetworkInfo': {
                'NetworkPerformance': 'string',
                'MaximumNetworkInterfaces': 123,
                'MaximumNetworkCards': 123,
                'DefaultNetworkCardIndex': 123,
                'NetworkCards': [
                    {
                        'NetworkCardIndex': 123,
                        'NetworkPerformance': 'string',
                        'MaximumNetworkInterfaces': 123
                    },
                ],
                'Ipv4AddressesPerInterface': 123,
                'Ipv6AddressesPerInterface': 123,
                'Ipv6Supported': True|False,
                'EnaSupport': 'unsupported'|'supported'|'required',
                'EfaSupported': True|False,
                'EfaInfo': {
                    'MaximumEfaInterfaces': 123
                },
                'EncryptionInTransitSupported': True|False
            },
            'GpuInfo': {
                'Gpus': [
                    {
                        'Name': 'string',
                        'Manufacturer': 'string',
                        'Count': 123,
                        'MemoryInfo': {
                            'SizeInMiB': 123
                        }
                    },
                ],
                'TotalGpuMemoryInMiB': 123
            },
            'FpgaInfo': {
                'Fpgas': [
                    {
                        'Name': 'string',
                        'Manufacturer': 'string',
                        'Count': 123,
                        'MemoryInfo': {
                            'SizeInMiB': 123
                        }
                    },
                ],
                'TotalFpgaMemoryInMiB': 123
            },
            'PlacementGroupInfo': {
                'SupportedStrategies': [
                    'cluster'|'partition'|'spread',
                ]
            },
            'InferenceAcceleratorInfo': {
                'Accelerators': [
                    {
                        'Count': 123,
                        'Name': 'string',
                        'Manufacturer': 'string'
                    },
                ]
            },
            'HibernationSupported': True|False,
            'BurstablePerformanceSupported': True|False,
            'DedicatedHostsSupported': True|False,
            'AutoRecoverySupported': True|False,
            'SupportedBootModes': [
                'legacy-bios'|'uefi',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstanceTypes (list) --

      The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

      • (dict) --

        Describes the instance type.

        • InstanceType (string) --

          The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

        • CurrentGeneration (boolean) --

          Indicates whether the instance type is current generation.

        • FreeTierEligible (boolean) --

          Indicates whether the instance type is eligible for the free tier.

        • SupportedUsageClasses (list) --

          Indicates whether the instance type is offered for spot or On-Demand.

          • (string) --
        • SupportedRootDeviceTypes (list) --

          The supported root device types.

          • (string) --
        • SupportedVirtualizationTypes (list) --

          The supported virtualization types.

          • (string) --
        • BareMetal (boolean) --

          Indicates whether the instance is a bare metal instance type.

        • Hypervisor (string) --

          The hypervisor for the instance type.

        • ProcessorInfo (dict) --

          Describes the processor.

          • SupportedArchitectures (list) --

            The architectures supported by the instance type.

            • (string) --
          • SustainedClockSpeedInGhz (float) --

            The speed of the processor, in GHz.

        • VCpuInfo (dict) --

          Describes the vCPU configurations for the instance type.

          • DefaultVCpus (integer) --

            The default number of vCPUs for the instance type.

          • DefaultCores (integer) --

            The default number of cores for the instance type.

          • DefaultThreadsPerCore (integer) --

            The default number of threads per core for the instance type.

          • ValidCores (list) --

            The valid number of cores that can be configured for the instance type.

            • (integer) --
          • ValidThreadsPerCore (list) --

            The valid number of threads per core that can be configured for the instance type.

            • (integer) --
        • MemoryInfo (dict) --

          Describes the memory for the instance type.

          • SizeInMiB (integer) --

            The size of the memory, in MiB.

        • InstanceStorageSupported (boolean) --

          Indicates whether instance storage is supported.

        • InstanceStorageInfo (dict) --

          Describes the instance storage for the instance type.

          • TotalSizeInGB (integer) --

            The total size of the disks, in GB.

          • Disks (list) --

            Describes the disks that are available for the instance type.

            • (dict) --

              Describes a disk.

              • SizeInGB (integer) --

                The size of the disk in GB.

              • Count (integer) --

                The number of disks with this configuration.

              • Type (string) --

                The type of disk.

          • NvmeSupport (string) --

            Indicates whether non-volatile memory express (NVMe) is supported.

          • EncryptionSupport (string) --

            Indicates whether data is encrypted at rest.

        • EbsInfo (dict) --

          Describes the Amazon EBS settings for the instance type.

          • EbsOptimizedSupport (string) --

            Indicates whether the instance type is Amazon EBS-optimized. For more information, see Amazon EBS-optimized instances in Amazon EC2 User Guide .

          • EncryptionSupport (string) --

            Indicates whether Amazon EBS encryption is supported.

          • EbsOptimizedInfo (dict) --

            Describes the optimized EBS performance for the instance type.

            • BaselineBandwidthInMbps (integer) --

              The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.

            • BaselineThroughputInMBps (float) --

              The baseline throughput performance for an EBS-optimized instance type, in MB/s.

            • BaselineIops (integer) --

              The baseline input/output storage operations per seconds for an EBS-optimized instance type.

            • MaximumBandwidthInMbps (integer) --

              The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.

            • MaximumThroughputInMBps (float) --

              The maximum throughput performance for an EBS-optimized instance type, in MB/s.

            • MaximumIops (integer) --

              The maximum input/output storage operations per second for an EBS-optimized instance type.

          • NvmeSupport (string) --

            Indicates whether non-volatile memory express (NVMe) is supported.

        • NetworkInfo (dict) --

          Describes the network settings for the instance type.

          • NetworkPerformance (string) --

            The network performance.

          • MaximumNetworkInterfaces (integer) --

            The maximum number of network interfaces for the instance type.

          • MaximumNetworkCards (integer) --

            The maximum number of physical network cards that can be allocated to the instance.

          • DefaultNetworkCardIndex (integer) --

            The index of the default network card, starting at 0.

          • NetworkCards (list) --

            Describes the network cards for the instance type.

            • (dict) --

              Describes the network card support of the instance type.

              • NetworkCardIndex (integer) --

                The index of the network card.

              • NetworkPerformance (string) --

                The network performance of the network card.

              • MaximumNetworkInterfaces (integer) --

                The maximum number of network interfaces for the network card.

          • Ipv4AddressesPerInterface (integer) --

            The maximum number of IPv4 addresses per network interface.

          • Ipv6AddressesPerInterface (integer) --

            The maximum number of IPv6 addresses per network interface.

          • Ipv6Supported (boolean) --

            Indicates whether IPv6 is supported.

          • EnaSupport (string) --

            Indicates whether Elastic Network Adapter (ENA) is supported.

          • EfaSupported (boolean) --

            Indicates whether Elastic Fabric Adapter (EFA) is supported.

          • EfaInfo (dict) --

            Describes the Elastic Fabric Adapters for the instance type.

            • MaximumEfaInterfaces (integer) --

              The maximum number of Elastic Fabric Adapters for the instance type.

          • EncryptionInTransitSupported (boolean) --

            Indicates whether the instance type automatically encrypts in-transit traffic between instances.

        • GpuInfo (dict) --

          Describes the GPU accelerator settings for the instance type.

          • Gpus (list) --

            Describes the GPU accelerators for the instance type.

            • (dict) --

              Describes the GPU accelerators for the instance type.

              • Name (string) --

                The name of the GPU accelerator.

              • Manufacturer (string) --

                The manufacturer of the GPU accelerator.

              • Count (integer) --

                The number of GPUs for the instance type.

              • MemoryInfo (dict) --

                Describes the memory available to the GPU accelerator.

                • SizeInMiB (integer) --

                  The size of the memory available to the GPU accelerator, in MiB.

          • TotalGpuMemoryInMiB (integer) --

            The total size of the memory for the GPU accelerators for the instance type, in MiB.

        • FpgaInfo (dict) --

          Describes the FPGA accelerator settings for the instance type.

          • Fpgas (list) --

            Describes the FPGAs for the instance type.

            • (dict) --

              Describes the FPGA accelerator for the instance type.

              • Name (string) --

                The name of the FPGA accelerator.

              • Manufacturer (string) --

                The manufacturer of the FPGA accelerator.

              • Count (integer) --

                The count of FPGA accelerators for the instance type.

              • MemoryInfo (dict) --

                Describes the memory for the FPGA accelerator for the instance type.

                • SizeInMiB (integer) --

                  The size of the memory available to the FPGA accelerator, in MiB.

          • TotalFpgaMemoryInMiB (integer) --

            The total memory of all FPGA accelerators for the instance type.

        • PlacementGroupInfo (dict) --

          Describes the placement group settings for the instance type.

          • SupportedStrategies (list) --

            The supported placement group types.

            • (string) --
        • InferenceAcceleratorInfo (dict) --

          Describes the Inference accelerator settings for the instance type.

          • Accelerators (list) --

            Describes the Inference accelerators for the instance type.

            • (dict) --

              Describes the Inference accelerators for the instance type.

              • Count (integer) --

                The number of Inference accelerators for the instance type.

              • Name (string) --

                The name of the Inference accelerator.

              • Manufacturer (string) --

                The manufacturer of the Inference accelerator.

        • HibernationSupported (boolean) --

          Indicates whether On-Demand hibernation is supported.

        • BurstablePerformanceSupported (boolean) --

          Indicates whether the instance type is a burstable performance instance type.

        • DedicatedHostsSupported (boolean) --

          Indicates whether Dedicated Hosts are supported on the instance type.

        • AutoRecoverySupported (boolean) --

          Indicates whether auto recovery is supported.

        • SupportedBootModes (list) --

          The supported boot modes. For more information, see Boot modes in the Amazon EC2 User Guide .

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

describe_instances(**kwargs)

Describes the specified instances or all instances.

If you specify instance IDs, the output includes information for only the specified instances. If you specify filters, the output includes information for only those instances that meet the filter criteria. If you do not specify instance IDs or filters, the output includes information for all instances, which can affect performance. We recommend that you use pagination to ensure that the operation returns quickly and successfully.

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

Recently terminated instances might appear in the returned results. This interval is usually less than one hour.

If you describe instances in the rare case where an Availability Zone is experiencing a service disruption and you specify instance IDs that are in the affected zone, or do not specify any instance IDs at all, the call fails. If you describe instances and specify only instance IDs that are in an unaffected zone, the call works normally.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_instances(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Return type

dict

Returns

Response Syntax

{
    'Reservations': [
        {
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'Instances': [
                {
                    'AmiLaunchIndex': 123,
                    'ImageId': 'string',
                    'InstanceId': 'string',
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'KernelId': 'string',
                    'KeyName': 'string',
                    'LaunchTime': datetime(2015, 1, 1),
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    },
                    'Placement': {
                        'AvailabilityZone': 'string',
                        'Affinity': 'string',
                        'GroupName': 'string',
                        'PartitionNumber': 123,
                        'HostId': 'string',
                        'Tenancy': 'default'|'dedicated'|'host',
                        'SpreadDomain': 'string',
                        'HostResourceGroupArn': 'string'
                    },
                    'Platform': 'Windows',
                    'PrivateDnsName': 'string',
                    'PrivateIpAddress': 'string',
                    'ProductCodes': [
                        {
                            'ProductCodeId': 'string',
                            'ProductCodeType': 'devpay'|'marketplace'
                        },
                    ],
                    'PublicDnsName': 'string',
                    'PublicIpAddress': 'string',
                    'RamdiskId': 'string',
                    'State': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'StateTransitionReason': 'string',
                    'SubnetId': 'string',
                    'VpcId': 'string',
                    'Architecture': 'i386'|'x86_64'|'arm64'|'x86_64_mac',
                    'BlockDeviceMappings': [
                        {
                            'DeviceName': 'string',
                            'Ebs': {
                                'AttachTime': datetime(2015, 1, 1),
                                'DeleteOnTermination': True|False,
                                'Status': 'attaching'|'attached'|'detaching'|'detached',
                                'VolumeId': 'string'
                            }
                        },
                    ],
                    'ClientToken': 'string',
                    'EbsOptimized': True|False,
                    'EnaSupport': True|False,
                    'Hypervisor': 'ovm'|'xen',
                    'IamInstanceProfile': {
                        'Arn': 'string',
                        'Id': 'string'
                    },
                    'InstanceLifecycle': 'spot'|'scheduled',
                    'ElasticGpuAssociations': [
                        {
                            'ElasticGpuId': 'string',
                            'ElasticGpuAssociationId': 'string',
                            'ElasticGpuAssociationState': 'string',
                            'ElasticGpuAssociationTime': 'string'
                        },
                    ],
                    'ElasticInferenceAcceleratorAssociations': [
                        {
                            'ElasticInferenceAcceleratorArn': 'string',
                            'ElasticInferenceAcceleratorAssociationId': 'string',
                            'ElasticInferenceAcceleratorAssociationState': 'string',
                            'ElasticInferenceAcceleratorAssociationTime': datetime(2015, 1, 1)
                        },
                    ],
                    'NetworkInterfaces': [
                        {
                            'Association': {
                                'CarrierIp': 'string',
                                'CustomerOwnedIp': 'string',
                                'IpOwnerId': 'string',
                                'PublicDnsName': 'string',
                                'PublicIp': 'string'
                            },
                            'Attachment': {
                                'AttachTime': datetime(2015, 1, 1),
                                'AttachmentId': 'string',
                                'DeleteOnTermination': True|False,
                                'DeviceIndex': 123,
                                'Status': 'attaching'|'attached'|'detaching'|'detached',
                                'NetworkCardIndex': 123
                            },
                            'Description': 'string',
                            'Groups': [
                                {
                                    'GroupName': 'string',
                                    'GroupId': 'string'
                                },
                            ],
                            'Ipv6Addresses': [
                                {
                                    'Ipv6Address': 'string'
                                },
                            ],
                            'MacAddress': 'string',
                            'NetworkInterfaceId': 'string',
                            'OwnerId': 'string',
                            'PrivateDnsName': 'string',
                            'PrivateIpAddress': 'string',
                            'PrivateIpAddresses': [
                                {
                                    'Association': {
                                        'CarrierIp': 'string',
                                        'CustomerOwnedIp': 'string',
                                        'IpOwnerId': 'string',
                                        'PublicDnsName': 'string',
                                        'PublicIp': 'string'
                                    },
                                    'Primary': True|False,
                                    'PrivateDnsName': 'string',
                                    'PrivateIpAddress': 'string'
                                },
                            ],
                            'SourceDestCheck': True|False,
                            'Status': 'available'|'associated'|'attaching'|'in-use'|'detaching',
                            'SubnetId': 'string',
                            'VpcId': 'string',
                            'InterfaceType': 'string',
                            'Ipv4Prefixes': [
                                {
                                    'Ipv4Prefix': 'string'
                                },
                            ],
                            'Ipv6Prefixes': [
                                {
                                    'Ipv6Prefix': 'string'
                                },
                            ]
                        },
                    ],
                    'OutpostArn': 'string',
                    'RootDeviceName': 'string',
                    'RootDeviceType': 'ebs'|'instance-store',
                    'SecurityGroups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'SourceDestCheck': True|False,
                    'SpotInstanceRequestId': 'string',
                    'SriovNetSupport': 'string',
                    'StateReason': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VirtualizationType': 'hvm'|'paravirtual',
                    'CpuOptions': {
                        'CoreCount': 123,
                        'ThreadsPerCore': 123
                    },
                    'CapacityReservationId': 'string',
                    'CapacityReservationSpecification': {
                        'CapacityReservationPreference': 'open'|'none',
                        'CapacityReservationTarget': {
                            'CapacityReservationId': 'string',
                            'CapacityReservationResourceGroupArn': 'string'
                        }
                    },
                    'HibernationOptions': {
                        'Configured': True|False
                    },
                    'Licenses': [
                        {
                            'LicenseConfigurationArn': 'string'
                        },
                    ],
                    'MetadataOptions': {
                        'State': 'pending'|'applied',
                        'HttpTokens': 'optional'|'required',
                        'HttpPutResponseHopLimit': 123,
                        'HttpEndpoint': 'disabled'|'enabled',
                        'HttpProtocolIpv6': 'disabled'|'enabled',
                        'InstanceMetadataTags': 'disabled'|'enabled'
                    },
                    'EnclaveOptions': {
                        'Enabled': True|False
                    },
                    'BootMode': 'legacy-bios'|'uefi',
                    'PlatformDetails': 'string',
                    'UsageOperation': 'string',
                    'UsageOperationUpdateTime': datetime(2015, 1, 1),
                    'PrivateDnsNameOptions': {
                        'HostnameType': 'ip-name'|'resource-name',
                        'EnableResourceNameDnsARecord': True|False,
                        'EnableResourceNameDnsAAAARecord': True|False
                    },
                    'Ipv6Address': 'string',
                    'TpmSupport': 'string',
                    'MaintenanceOptions': {
                        'AutoRecovery': 'disabled'|'default'
                    }
                },
            ],
            'OwnerId': 'string',
            'RequesterId': 'string',
            'ReservationId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Reservations (list) --

      Information about the reservations.

      • (dict) --

        Describes a launch request for one or more instances, and includes owner, requester, and security group information that applies to all instances in the launch request.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

        • Groups (list) --

          [EC2-Classic only] The 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) --

          The instances.

          • (dict) --

            Describes an instance.

            • AmiLaunchIndex (integer) --

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

            • ImageId (string) --

              The ID of the AMI used to launch the instance.

            • InstanceId (string) --

              The ID of the instance.

            • InstanceType (string) --

              The instance type.

            • KernelId (string) --

              The kernel associated with this instance, if applicable.

            • KeyName (string) --

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

            • LaunchTime (datetime) --

              The time the instance was launched.

            • Monitoring (dict) --

              The monitoring for the instance.

              • State (string) --

                Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

            • Placement (dict) --

              The location where the instance launched, if applicable.

              • AvailabilityZone (string) --

                The Availability Zone of the instance.

                If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

                This parameter is not supported by CreateFleet .

              • Affinity (string) --

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

                This parameter is not supported by CreateFleet .

              • GroupName (string) --

                The name of the placement group the instance is in.

              • PartitionNumber (integer) --

                The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

                This parameter is not supported by CreateFleet .

              • HostId (string) --

                The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

                This parameter is not supported by CreateFleet .

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

                This parameter is not supported by CreateFleet .

                T3 instances that use the unlimited CPU credit option do not support host tenancy.

              • SpreadDomain (string) --

                Reserved for future use.

                This parameter is not supported by CreateFleet .

              • HostResourceGroupArn (string) --

                The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

                This parameter is not supported by CreateFleet .

            • Platform (string) --

              The value is Windows for Windows instances; otherwise blank.

            • PrivateDnsName (string) --

              (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

              [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

            • PrivateIpAddress (string) --

              The private IPv4 address assigned to the instance.

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

            • PublicDnsName (string) --

              (IPv4 only) 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.

            • PublicIpAddress (string) --

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

              A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

            • RamdiskId (string) --

              The RAM disk associated with this instance, if applicable.

            • State (dict) --

              The current state of the instance.

              • Code (integer) --

                The state of the instance as a 16-bit unsigned integer.

                The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

                The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

                The valid values for instance-state-code will all be in the range of the low byte and they are:

                • 0 : pending
                • 16 : running
                • 32 : shutting-down
                • 48 : terminated
                • 64 : stopping
                • 80 : stopped

                You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

              • Name (string) --

                The current state of the instance.

            • StateTransitionReason (string) --

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

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

            • Architecture (string) --

              The architecture of the image.

            • BlockDeviceMappings (list) --

              Any block device mapping entries for the instance.

              • (dict) --

                Describes a block device mapping.

                • DeviceName (string) --

                  The device name (for example, /dev/sdh or xvdh ).

                • Ebs (dict) --

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

                  • AttachTime (datetime) --

                    The time stamp when the attachment initiated.

                  • DeleteOnTermination (boolean) --

                    Indicates whether the volume is deleted on instance termination.

                  • Status (string) --

                    The attachment state.

                  • VolumeId (string) --

                    The ID of the EBS volume.

            • ClientToken (string) --

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

            • EbsOptimized (boolean) --

              Indicates whether the instance is optimized for Amazon 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.

            • EnaSupport (boolean) --

              Specifies whether enhanced networking with ENA is enabled.

            • Hypervisor (string) --

              The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

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

            • InstanceLifecycle (string) --

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

            • ElasticGpuAssociations (list) --

              The Elastic GPU associated with the instance.

              • (dict) --

                Describes the association between an instance and an Elastic Graphics accelerator.

                • ElasticGpuId (string) --

                  The ID of the Elastic Graphics accelerator.

                • ElasticGpuAssociationId (string) --

                  The ID of the association.

                • ElasticGpuAssociationState (string) --

                  The state of the association between the instance and the Elastic Graphics accelerator.

                • ElasticGpuAssociationTime (string) --

                  The time the Elastic Graphics accelerator was associated with the instance.

            • ElasticInferenceAcceleratorAssociations (list) --

              The elastic inference accelerator associated with the instance.

              • (dict) --

                Describes the association between an instance and an elastic inference accelerator.

                • ElasticInferenceAcceleratorArn (string) --

                  The Amazon Resource Name (ARN) of the elastic inference accelerator.

                • ElasticInferenceAcceleratorAssociationId (string) --

                  The ID of the association.

                • ElasticInferenceAcceleratorAssociationState (string) --

                  The state of the elastic inference accelerator.

                • ElasticInferenceAcceleratorAssociationTime (datetime) --

                  The time at which the elastic inference accelerator is associated with an instance.

            • NetworkInterfaces (list) --

              [EC2-VPC] The network interfaces for the instance.

              • (dict) --

                Describes a network interface.

                • Association (dict) --

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

                  • CarrierIp (string) --

                    The carrier IP address associated with the network interface.

                  • CustomerOwnedIp (string) --

                    The customer-owned IP address associated with the network interface.

                  • IpOwnerId (string) --

                    The ID of the owner of the Elastic IP address.

                  • PublicDnsName (string) --

                    The public DNS name.

                  • PublicIp (string) --

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

                • Attachment (dict) --

                  The network interface attachment.

                  • AttachTime (datetime) --

                    The time stamp when the attachment initiated.

                  • AttachmentId (string) --

                    The ID of the network interface attachment.

                  • DeleteOnTermination (boolean) --

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

                  • DeviceIndex (integer) --

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

                  • Status (string) --

                    The attachment state.

                  • NetworkCardIndex (integer) --

                    The index of the network card.

                • Description (string) --

                  The description.

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

                • Ipv6Addresses (list) --

                  One or more IPv6 addresses associated with the network interface.

                  • (dict) --

                    Describes an IPv6 address.

                    • Ipv6Address (string) --

                      The IPv6 address.

                • MacAddress (string) --

                  The MAC address.

                • NetworkInterfaceId (string) --

                  The ID of the network interface.

                • OwnerId (string) --

                  The ID of the Amazon Web Services account that created the network interface.

                • PrivateDnsName (string) --

                  The private DNS name.

                • PrivateIpAddress (string) --

                  The IPv4 address of the network interface within the subnet.

                • PrivateIpAddresses (list) --

                  One or more private IPv4 addresses associated with the network interface.

                  • (dict) --

                    Describes a private IPv4 address.

                    • Association (dict) --

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

                      • CarrierIp (string) --

                        The carrier IP address associated with the network interface.

                      • CustomerOwnedIp (string) --

                        The customer-owned IP address associated with the network interface.

                      • IpOwnerId (string) --

                        The ID of the owner of the Elastic IP address.

                      • PublicDnsName (string) --

                        The public DNS name.

                      • PublicIp (string) --

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

                    • Primary (boolean) --

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

                    • PrivateDnsName (string) --

                      The private IPv4 DNS name.

                    • PrivateIpAddress (string) --

                      The private IPv4 address of the network interface.

                • SourceDestCheck (boolean) --

                  Indicates whether source/destination checking is enabled.

                • Status (string) --

                  The status of the network interface.

                • SubnetId (string) --

                  The ID of the subnet.

                • VpcId (string) --

                  The ID of the VPC.

                • InterfaceType (string) --

                  The type of network interface.

                  Valid values: interface | efa | trunk

                • Ipv4Prefixes (list) --

                  The IPv4 delegated prefixes that are assigned to the network interface.

                  • (dict) --

                    Information about an IPv4 prefix.

                    • Ipv4Prefix (string) --

                      One or more IPv4 prefixes assigned to the network interface.

                • Ipv6Prefixes (list) --

                  The IPv6 delegated prefixes that are assigned to the network interface.

                  • (dict) --

                    Information about an IPv6 prefix.

                    • Ipv6Prefix (string) --

                      One or more IPv6 prefixes assigned to the network interface.

            • OutpostArn (string) --

              The Amazon Resource Name (ARN) of the Outpost.

            • RootDeviceName (string) --

              The device name of the root device volume (for example, /dev/sda1 ).

            • RootDeviceType (string) --

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

            • SecurityGroups (list) --

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

              Indicates whether source/destination checking is enabled.

            • SpotInstanceRequestId (string) --

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

            • SriovNetSupport (string) --

              Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

            • 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.InsufficientInstanceCapacity : There was insufficient capacity available to satisfy the launch request.
                • Server.InternalError : An internal error caused the instance to terminate during launch.
                • Server.ScheduledStop : The instance was stopped due to a scheduled retirement.
                • Server.SpotInstanceShutdown : The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
                • Server.SpotInstanceTermination : The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
                • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.
                • Client.InstanceTerminated : The instance was terminated or rebooted during AMI creation.
                • Client.InternalError : A client error caused the instance to terminate during launch.
                • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.
                • Client.UserInitiatedHibernate : Hibernation was initiated on 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 account limits.
            • 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 256 Unicode characters.

            • VirtualizationType (string) --

              The virtualization type of the instance.

            • CpuOptions (dict) --

              The CPU options for the instance.

              • CoreCount (integer) --

                The number of CPU cores for the instance.

              • ThreadsPerCore (integer) --

                The number of threads per CPU core.

            • CapacityReservationId (string) --

              The ID of the Capacity Reservation.

            • CapacityReservationSpecification (dict) --

              Information about the Capacity Reservation targeting option.

              • CapacityReservationPreference (string) --

                Describes the instance's Capacity Reservation preferences. Possible preferences include:

                • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
                • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
              • CapacityReservationTarget (dict) --

                Information about the targeted Capacity Reservation or Capacity Reservation group.

                • CapacityReservationId (string) --

                  The ID of the targeted Capacity Reservation.

                • CapacityReservationResourceGroupArn (string) --

                  The ARN of the targeted Capacity Reservation group.

            • HibernationOptions (dict) --

              Indicates whether the instance is enabled for hibernation.

              • Configured (boolean) --

                If this parameter is set to true , your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

            • Licenses (list) --

              The license configurations for the instance.

              • (dict) --

                Describes a license configuration.

                • LicenseConfigurationArn (string) --

                  The Amazon Resource Name (ARN) of the license configuration.

            • MetadataOptions (dict) --

              The metadata options for the instance.

              • State (string) --

                The state of the metadata option changes.

                pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

                applied - The metadata options have been successfully applied on the instance.

              • HttpTokens (string) --

                The state of token usage for your instance metadata requests.

                If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

                If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

                Default: optional

              • HttpPutResponseHopLimit (integer) --

                The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

                Default: 1

                Possible values: Integers from 1 to 64

              • HttpEndpoint (string) --

                Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

                If the value is disabled , you cannot access your instance metadata.

              • HttpProtocolIpv6 (string) --

                Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

              • InstanceMetadataTags (string) --

                Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see Work with instance tags using the instance metadata .

            • EnclaveOptions (dict) --

              Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

              • Enabled (boolean) --

                If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

            • BootMode (string) --

              The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide .

            • PlatformDetails (string) --

              The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide .

            • UsageOperation (string) --

              The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide .

            • UsageOperationUpdateTime (datetime) --

              The time that the usage operation was last updated.

            • PrivateDnsNameOptions (dict) --

              The options for the instance hostname.

              • HostnameType (string) --

                The type of hostname to assign to an instance.

              • EnableResourceNameDnsARecord (boolean) --

                Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

              • EnableResourceNameDnsAAAARecord (boolean) --

                Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

            • Ipv6Address (string) --

              The IPv6 address assigned to the instance.

            • TpmSupport (string) --

              If the instance is configured for NitroTPM support, the value is v2.0 . For more information, see NitroTPM in the Amazon EC2 User Guide .

            • MaintenanceOptions (dict) --

              Provides information on the recovery and maintenance options of your instance.

              • AutoRecovery (string) --

                Provides information on the current automatic recovery behavior of your instance.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the reservation.

        • RequesterId (string) --

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

        • ReservationId (string) --

          The ID of the reservation.

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

Examples

This example describes the specified instance.

response = client.describe_instances(
    InstanceIds=[
        'i-1234567890abcdef0',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the instances with the t2.micro instance type.

response = client.describe_instances(
    Filters=[
        {
            'Name': 'instance-type',
            'Values': [
                't2.micro',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the instances with the Purpose=test tag.

response = client.describe_instances(
    Filters=[
        {
            'Name': 'tag:Purpose',
            'Values': [
                'test',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_internet_gateways(**kwargs)

Describes one or more of your internet gateways.

See also: AWS API Documentation

Request Syntax

response = client.describe_internet_gateways(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    InternetGatewayIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • attachment.state - The current state of the attachment between the gateway and the VPC (available ). Present only if a VPC is attached.
    • attachment.vpc-id - The ID of an attached VPC.
    • internet-gateway-id - The ID of the Internet gateway.
    • owner-id - The ID of the Amazon Web Services account that owns the internet gateway.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayIds (list) --

    One or more internet gateway IDs.

    Default: Describes all your internet gateways.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'InternetGateways': [
        {
            'Attachments': [
                {
                    'State': 'attaching'|'attached'|'detaching'|'detached',
                    'VpcId': 'string'
                },
            ],
            'InternetGatewayId': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InternetGateways (list) --

      Information about one or more internet gateways.

      • (dict) --

        Describes an internet gateway.

        • Attachments (list) --

          Any VPCs attached to the internet gateway.

          • (dict) --

            Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

            • State (string) --

              The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            • VpcId (string) --

              The ID of the VPC.

        • InternetGatewayId (string) --

          The ID of the internet gateway.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the internet gateway.

        • Tags (list) --

          Any tags assigned to the internet gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

Examples

This example describes the Internet gateway for the specified VPC.

response = client.describe_internet_gateways(
    Filters=[
        {
            'Name': 'attachment.vpc-id',
            'Values': [
                'vpc-a01106c2',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'InternetGateways': [
        {
            'Attachments': [
                {
                    'State': 'available',
                    'VpcId': 'vpc-a01106c2',
                },
            ],
            'InternetGatewayId': 'igw-c0a643a9',
            'Tags': [
            ],
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_ipam_pools(**kwargs)

Get information about your IPAM pools.

See also: AWS API Documentation

Request Syntax

response = client.describe_ipam_pools(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    IpamPoolIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in the request.
  • NextToken (string) -- The token for the next page of results.
  • IpamPoolIds (list) --

    The IDs of the IPAM pools you would like information on.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'IpamPools': [
        {
            'OwnerId': 'string',
            'IpamPoolId': 'string',
            'SourceIpamPoolId': 'string',
            'IpamPoolArn': 'string',
            'IpamScopeArn': 'string',
            'IpamScopeType': 'public'|'private',
            'IpamArn': 'string',
            'IpamRegion': 'string',
            'Locale': 'string',
            'PoolDepth': 123,
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
            'StateMessage': 'string',
            'Description': 'string',
            'AutoImport': True|False,
            'PubliclyAdvertisable': True|False,
            'AddressFamily': 'ipv4'|'ipv6',
            'AllocationMinNetmaskLength': 123,
            'AllocationMaxNetmaskLength': 123,
            'AllocationDefaultNetmaskLength': 123,
            'AllocationResourceTags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'AwsService': 'ec2'
        },
    ]
}

Response Structure

  • (dict) --

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

    • IpamPools (list) --

      Information about the IPAM pools.

      • (dict) --

        In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable you to organize your IP addresses according to your routing and security needs. For example, if you have separate routing and security needs for development and production applications, you can create a pool for each.

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the IPAM pool.

        • IpamPoolId (string) --

          The ID of the IPAM pool.

        • SourceIpamPoolId (string) --

          The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.

        • IpamPoolArn (string) --

          The ARN of the IPAM pool.

        • IpamScopeArn (string) --

          The ARN of the scope of the IPAM pool.

        • IpamScopeType (string) --

          In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

        • IpamArn (string) --

          The ARN of the IPAM.

        • IpamRegion (string) --

          The Amazon Web Services Region of the IPAM pool.

        • Locale (string) --

          The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.

        • PoolDepth (integer) --

          The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

        • State (string) --

          The state of the IPAM pool.

        • StateMessage (string) --

          A message related to the failed creation of an IPAM pool.

        • Description (string) --

          The description of the IPAM pool.

        • AutoImport (boolean) --

          If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

          A locale must be set on the pool for this feature to work.

        • PubliclyAdvertisable (boolean) --

          Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to ipv4 .

        • AddressFamily (string) --

          The address family of the pool.

        • AllocationMinNetmaskLength (integer) --

          The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

        • AllocationMaxNetmaskLength (integer) --

          The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

        • AllocationDefaultNetmaskLength (integer) --

          The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.

        • AllocationResourceTags (list) --

          Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.

          • (dict) --

            The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

            • Key (string) --

              The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

            • Value (string) --

              The value of the tag.

        • Tags (list) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • AwsService (string) --

          Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.

describe_ipam_scopes(**kwargs)

Get information about your IPAM scopes.

See also: AWS API Documentation

Request Syntax

response = client.describe_ipam_scopes(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    IpamScopeIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in the request.
  • NextToken (string) -- The token for the next page of results.
  • IpamScopeIds (list) --

    The IDs of the scopes you want information on.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'IpamScopes': [
        {
            'OwnerId': 'string',
            'IpamScopeId': 'string',
            'IpamScopeArn': 'string',
            'IpamArn': 'string',
            'IpamRegion': 'string',
            'IpamScopeType': 'public'|'private',
            'IsDefault': True|False,
            'Description': 'string',
            'PoolCount': 123,
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

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

    • IpamScopes (list) --

      The scopes you want information on.

      • (dict) --

        In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

        For more information, see How IPAM works in the Amazon VPC IPAM User Guide .

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the scope.

        • IpamScopeId (string) --

          The ID of the scope.

        • IpamScopeArn (string) --

          The ARN of the scope.

        • IpamArn (string) --

          The ARN of the IPAM.

        • IpamRegion (string) --

          The Amazon Web Services Region of the IPAM scope.

        • IpamScopeType (string) --

          The type of the scope.

        • IsDefault (boolean) --

          Defines if the scope is the default scope or not.

        • Description (string) --

          The description of the scope.

        • PoolCount (integer) --

          The number of pools in the scope.

        • State (string) --

          The state of the IPAM scope.

        • Tags (list) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

describe_ipams(**kwargs)

Get information about your IPAM pools.

For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_ipams(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    IpamIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in the request.
  • NextToken (string) -- The token for the next page of results.
  • IpamIds (list) --

    The IDs of the IPAMs you want information on.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'Ipams': [
        {
            'OwnerId': 'string',
            'IpamId': 'string',
            'IpamArn': 'string',
            'IpamRegion': 'string',
            'PublicDefaultScopeId': 'string',
            'PrivateDefaultScopeId': 'string',
            'ScopeCount': 123,
            'Description': 'string',
            'OperatingRegions': [
                {
                    'RegionName': 'string'
                },
            ],
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

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

    • Ipams (list) --

      Information about the IPAMs.

      • (dict) --

        IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the IPAM.

        • IpamId (string) --

          The ID of the IPAM.

        • IpamArn (string) --

          The ARN of the IPAM.

        • IpamRegion (string) --

          The Amazon Web Services Region of the IPAM.

        • PublicDefaultScopeId (string) --

          The ID of the IPAM's default public scope.

        • PrivateDefaultScopeId (string) --

          The ID of the IPAM's default private scope.

        • ScopeCount (integer) --

          The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

        • Description (string) --

          The description for the IPAM.

        • OperatingRegions (list) --

          The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

          For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

          • (dict) --

            The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

            For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

            • RegionName (string) --

              The name of the operating Region.

        • State (string) --

          The state of the IPAM.

        • Tags (list) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

describe_ipv6_pools(**kwargs)

Describes your IPv6 address pools.

See also: AWS API Documentation

Request Syntax

response = client.describe_ipv6_pools(
    PoolIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters
  • PoolIds (list) --

    The IDs of the IPv6 address pools.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'Ipv6Pools': [
        {
            'PoolId': 'string',
            'Description': 'string',
            'PoolCidrBlocks': [
                {
                    'Cidr': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Ipv6Pools (list) --

      Information about the IPv6 address pools.

      • (dict) --

        Describes an IPv6 address pool.

        • PoolId (string) --

          The ID of the address pool.

        • Description (string) --

          The description for the address pool.

        • PoolCidrBlocks (list) --

          The CIDR blocks for the address pool.

          • (dict) --

            Describes a CIDR block for an address pool.

            • Cidr (string) --

              The CIDR block.

        • Tags (list) --

          Any tags for the address pool.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_key_pairs(**kwargs)

Describes the specified key pairs or all of your key pairs.

For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_key_pairs(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    KeyNames=[
        'string',
    ],
    KeyPairIds=[
        'string',
    ],
    DryRun=True|False,
    IncludePublicKey=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • key-pair-id - The ID of the key pair.
    • fingerprint - The fingerprint of the key pair.
    • key-name - The name of the key pair.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • KeyNames (list) --

    The key pair names.

    Default: Describes all of your key pairs.

    • (string) --
  • KeyPairIds (list) --

    The IDs of the key pairs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IncludePublicKey (boolean) --

    If true , the public key material is included in the response.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'KeyPairs': [
        {
            'KeyPairId': 'string',
            'KeyFingerprint': 'string',
            'KeyName': 'string',
            'KeyType': 'rsa'|'ed25519',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'PublicKey': 'string',
            'CreateTime': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • KeyPairs (list) --

      Information about the key pairs.

      • (dict) --

        Describes a key pair.

        • KeyPairId (string) --

          The ID of the key pair.

        • KeyFingerprint (string) --

          If you used CreateKeyPair to create the key pair:

          • For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
          • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8 .

          If you used ImportKeyPair to provide Amazon Web Services the public key:

          • For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.
          • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8 .
        • KeyName (string) --

          The name of the key pair.

        • KeyType (string) --

          The type of key pair.

        • Tags (list) --

          Any tags applied to the key pair.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • PublicKey (string) --

          The public key material.

        • CreateTime (datetime) --

          If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in ISO 8601 date-time format , in the UTC time zone.

          If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in ISO 8601 date-time format , in the UTC time zone.

Examples

This example displays the fingerprint for the specified key.

response = client.describe_key_pairs(
    KeyNames=[
        'my-key-pair',
    ],
)

print(response)

Expected Output:

{
    'KeyPairs': [
        {
            'KeyFingerprint': '1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f',
            'KeyName': 'my-key-pair',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_launch_template_versions(**kwargs)

Describes one or more versions of a specified launch template. You can describe all versions, individual versions, or a range of versions. You can also describe all the latest versions or all the default versions of all the launch templates in your account.

See also: AWS API Documentation

Request Syntax

response = client.describe_launch_template_versions(
    DryRun=True|False,
    LaunchTemplateId='string',
    LaunchTemplateName='string',
    Versions=[
        'string',
    ],
    MinVersion='string',
    MaxVersion='string',
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LaunchTemplateId (string) --

    The ID of the launch template.

    To describe one or more versions of a specified launch template, you must specify either the LaunchTemplateId or the LaunchTemplateName , but not both.

    To describe all the latest or default launch template versions in your account, you must omit this parameter.

  • LaunchTemplateName (string) --

    The name of the launch template.

    To describe one or more versions of a specified launch template, you must specify either the LaunchTemplateName or the LaunchTemplateId , but not both.

    To describe all the latest or default launch template versions in your account, you must omit this parameter.

  • Versions (list) --

    One or more versions of the launch template. Valid values depend on whether you are describing a specified launch template (by ID or name) or all launch templates in your account.

    To describe one or more versions of a specified launch template, valid values are $Latest , $Default , and numbers.

    To describe all launch templates in your account that are defined as the latest version, the valid value is $Latest . To describe all launch templates in your account that are defined as the default version, the valid value is $Default . You can specify $Latest and $Default in the same request. You cannot specify numbers.

    • (string) --
  • MinVersion (string) -- The version number after which to describe launch template versions.
  • MaxVersion (string) -- The version number up to which to describe launch template versions.
  • NextToken (string) -- The token to request the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 1 and 200.
  • Filters (list) --

    One or more filters.

    • create-time - The time the launch template version was created.
    • ebs-optimized - A boolean that indicates whether the instance is optimized for Amazon EBS I/O.
    • http-endpoint - Indicates whether the HTTP metadata endpoint on your instances is enabled (enabled | disabled ).
    • http-protocol-ipv4 - Indicates whether the IPv4 endpoint for the instance metadata service is enabled (enabled | disabled ).
    • host-resource-group-arn - The ARN of the host resource group in which to launch the instances.
    • http-tokens - The state of token usage for your instance metadata requests (optional | required ).
    • iam-instance-profile - The ARN of the IAM instance profile.
    • image-id - The ID of the AMI.
    • instance-type - The instance type.
    • is-default-version - A boolean that indicates whether the launch template version is the default version.
    • kernel-id - The kernel ID.
    • license-configuration-arn - The ARN of the license configuration.
    • network-card-index - The index of the network card.
    • ram-disk-id - The RAM disk ID.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'LaunchTemplateVersions': [
        {
            'LaunchTemplateId': 'string',
            'LaunchTemplateName': 'string',
            'VersionNumber': 123,
            'VersionDescription': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'CreatedBy': 'string',
            'DefaultVersion': True|False,
            'LaunchTemplateData': {
                'KernelId': 'string',
                'EbsOptimized': True|False,
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Name': 'string'
                },
                'BlockDeviceMappings': [
                    {
                        'DeviceName': 'string',
                        'VirtualName': 'string',
                        'Ebs': {
                            'Encrypted': True|False,
                            'DeleteOnTermination': True|False,
                            'Iops': 123,
                            'KmsKeyId': 'string',
                            'SnapshotId': 'string',
                            'VolumeSize': 123,
                            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                            'Throughput': 123
                        },
                        'NoDevice': 'string'
                    },
                ],
                'NetworkInterfaces': [
                    {
                        'AssociateCarrierIpAddress': True|False,
                        'AssociatePublicIpAddress': True|False,
                        'DeleteOnTermination': True|False,
                        'Description': 'string',
                        'DeviceIndex': 123,
                        'Groups': [
                            'string',
                        ],
                        'InterfaceType': 'string',
                        'Ipv6AddressCount': 123,
                        'Ipv6Addresses': [
                            {
                                'Ipv6Address': 'string'
                            },
                        ],
                        'NetworkInterfaceId': 'string',
                        'PrivateIpAddress': 'string',
                        'PrivateIpAddresses': [
                            {
                                'Primary': True|False,
                                'PrivateIpAddress': 'string'
                            },
                        ],
                        'SecondaryPrivateIpAddressCount': 123,
                        'SubnetId': 'string',
                        'NetworkCardIndex': 123,
                        'Ipv4Prefixes': [
                            {
                                'Ipv4Prefix': 'string'
                            },
                        ],
                        'Ipv4PrefixCount': 123,
                        'Ipv6Prefixes': [
                            {
                                'Ipv6Prefix': 'string'
                            },
                        ],
                        'Ipv6PrefixCount': 123
                    },
                ],
                'ImageId': 'string',
                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                'KeyName': 'string',
                'Monitoring': {
                    'Enabled': True|False
                },
                'Placement': {
                    'AvailabilityZone': 'string',
                    'Affinity': 'string',
                    'GroupName': 'string',
                    'HostId': 'string',
                    'Tenancy': 'default'|'dedicated'|'host',
                    'SpreadDomain': 'string',
                    'HostResourceGroupArn': 'string',
                    'PartitionNumber': 123
                },
                'RamDiskId': 'string',
                'DisableApiTermination': True|False,
                'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
                'UserData': 'string',
                'TagSpecifications': [
                    {
                        'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                        'Tags': [
                            {
                                'Key': 'string',
                                'Value': 'string'
                            },
                        ]
                    },
                ],
                'ElasticGpuSpecifications': [
                    {
                        'Type': 'string'
                    },
                ],
                'ElasticInferenceAccelerators': [
                    {
                        'Type': 'string',
                        'Count': 123
                    },
                ],
                'SecurityGroupIds': [
                    'string',
                ],
                'SecurityGroups': [
                    'string',
                ],
                'InstanceMarketOptions': {
                    'MarketType': 'spot',
                    'SpotOptions': {
                        'MaxPrice': 'string',
                        'SpotInstanceType': 'one-time'|'persistent',
                        'BlockDurationMinutes': 123,
                        'ValidUntil': datetime(2015, 1, 1),
                        'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
                    }
                },
                'CreditSpecification': {
                    'CpuCredits': 'string'
                },
                'CpuOptions': {
                    'CoreCount': 123,
                    'ThreadsPerCore': 123
                },
                'CapacityReservationSpecification': {
                    'CapacityReservationPreference': 'open'|'none',
                    'CapacityReservationTarget': {
                        'CapacityReservationId': 'string',
                        'CapacityReservationResourceGroupArn': 'string'
                    }
                },
                'LicenseSpecifications': [
                    {
                        'LicenseConfigurationArn': 'string'
                    },
                ],
                'HibernationOptions': {
                    'Configured': True|False
                },
                'MetadataOptions': {
                    'State': 'pending'|'applied',
                    'HttpTokens': 'optional'|'required',
                    'HttpPutResponseHopLimit': 123,
                    'HttpEndpoint': 'disabled'|'enabled',
                    'HttpProtocolIpv6': 'disabled'|'enabled',
                    'InstanceMetadataTags': 'disabled'|'enabled'
                },
                'EnclaveOptions': {
                    'Enabled': True|False
                },
                'InstanceRequirements': {
                    'VCpuCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'MemoryMiB': {
                        'Min': 123,
                        'Max': 123
                    },
                    'CpuManufacturers': [
                        'intel'|'amd'|'amazon-web-services',
                    ],
                    'MemoryGiBPerVCpu': {
                        'Min': 123.0,
                        'Max': 123.0
                    },
                    'ExcludedInstanceTypes': [
                        'string',
                    ],
                    'InstanceGenerations': [
                        'current'|'previous',
                    ],
                    'SpotMaxPricePercentageOverLowestPrice': 123,
                    'OnDemandMaxPricePercentageOverLowestPrice': 123,
                    'BareMetal': 'included'|'required'|'excluded',
                    'BurstablePerformance': 'included'|'required'|'excluded',
                    'RequireHibernateSupport': True|False,
                    'NetworkInterfaceCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'LocalStorage': 'included'|'required'|'excluded',
                    'LocalStorageTypes': [
                        'hdd'|'ssd',
                    ],
                    'TotalLocalStorageGB': {
                        'Min': 123.0,
                        'Max': 123.0
                    },
                    'BaselineEbsBandwidthMbps': {
                        'Min': 123,
                        'Max': 123
                    },
                    'AcceleratorTypes': [
                        'gpu'|'fpga'|'inference',
                    ],
                    'AcceleratorCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'AcceleratorManufacturers': [
                        'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                    ],
                    'AcceleratorNames': [
                        'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                    ],
                    'AcceleratorTotalMemoryMiB': {
                        'Min': 123,
                        'Max': 123
                    }
                },
                'PrivateDnsNameOptions': {
                    'HostnameType': 'ip-name'|'resource-name',
                    'EnableResourceNameDnsARecord': True|False,
                    'EnableResourceNameDnsAAAARecord': True|False
                },
                'MaintenanceOptions': {
                    'AutoRecovery': 'default'|'disabled'
                },
                'DisableApiStop': True|False
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LaunchTemplateVersions (list) --

      Information about the launch template versions.

      • (dict) --

        Describes a launch template version.

        • LaunchTemplateId (string) --

          The ID of the launch template.

        • LaunchTemplateName (string) --

          The name of the launch template.

        • VersionNumber (integer) --

          The version number.

        • VersionDescription (string) --

          The description for the version.

        • CreateTime (datetime) --

          The time the version was created.

        • CreatedBy (string) --

          The principal that created the version.

        • DefaultVersion (boolean) --

          Indicates whether the version is the default version.

        • LaunchTemplateData (dict) --

          Information about the launch template.

          • KernelId (string) --

            The ID of the kernel, if applicable.

          • EbsOptimized (boolean) --

            Indicates whether the instance is optimized for Amazon EBS I/O.

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

          • BlockDeviceMappings (list) --

            The block device mappings.

            • (dict) --

              Describes a block device mapping.

              • DeviceName (string) --

                The device name.

              • VirtualName (string) --

                The virtual device name (ephemeralN).

              • Ebs (dict) --

                Information about the block device for an EBS volume.

                • Encrypted (boolean) --

                  Indicates whether the EBS volume is encrypted.

                • DeleteOnTermination (boolean) --

                  Indicates whether the EBS volume is deleted on instance termination.

                • Iops (integer) --

                  The number of I/O operations per second (IOPS) that the volume supports.

                • KmsKeyId (string) --

                  The ARN of the Key Management Service (KMS) CMK used for encryption.

                • SnapshotId (string) --

                  The ID of the snapshot.

                • VolumeSize (integer) --

                  The size of the volume, in GiB.

                • VolumeType (string) --

                  The volume type.

                • Throughput (integer) --

                  The throughput that the volume supports, in MiB/s.

              • NoDevice (string) --

                To omit the device from the block device mapping, specify an empty string.

          • NetworkInterfaces (list) --

            The network interfaces.

            • (dict) --

              Describes a network interface.

              • AssociateCarrierIpAddress (boolean) --

                Indicates whether to associate a Carrier IP address with eth0 for a new network interface.

                Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide .

              • AssociatePublicIpAddress (boolean) --

                Indicates whether to associate a public IPv4 address with eth0 for a new network interface.

              • DeleteOnTermination (boolean) --

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

              • Description (string) --

                A description for the network interface.

              • DeviceIndex (integer) --

                The device index for the network interface attachment.

              • Groups (list) --

                The IDs of one or more security groups.

                • (string) --
              • InterfaceType (string) --

                The type of network interface.

              • Ipv6AddressCount (integer) --

                The number of IPv6 addresses for the network interface.

              • Ipv6Addresses (list) --

                The IPv6 addresses for the network interface.

                • (dict) --

                  Describes an IPv6 address.

                  • Ipv6Address (string) --

                    The IPv6 address.

              • NetworkInterfaceId (string) --

                The ID of the network interface.

              • PrivateIpAddress (string) --

                The primary private IPv4 address of the network interface.

              • PrivateIpAddresses (list) --

                One or more private IPv4 addresses.

                • (dict) --

                  Describes a secondary private IPv4 address for a network interface.

                  • Primary (boolean) --

                    Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                  • PrivateIpAddress (string) --

                    The private IPv4 addresses.

              • SecondaryPrivateIpAddressCount (integer) --

                The number of secondary private IPv4 addresses for the network interface.

              • SubnetId (string) --

                The ID of the subnet for the network interface.

              • NetworkCardIndex (integer) --

                The index of the network card.

              • Ipv4Prefixes (list) --

                One or more IPv4 prefixes assigned to the network interface.

                • (dict) --

                  Information about the IPv4 delegated prefixes assigned to a network interface.

                  • Ipv4Prefix (string) --

                    One or more IPv4 delegated prefixes assigned to the network interface.

              • Ipv4PrefixCount (integer) --

                The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.

              • Ipv6Prefixes (list) --

                One or more IPv6 prefixes assigned to the network interface.

                • (dict) --

                  Information about the IPv6 delegated prefixes assigned to a network interface.

                  • Ipv6Prefix (string) --

                    One or more IPv6 delegated prefixes assigned to the network interface.

              • Ipv6PrefixCount (integer) --

                The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.

          • ImageId (string) --

            The ID of the AMI that was used to launch the instance.

          • InstanceType (string) --

            The instance type.

          • KeyName (string) --

            The name of the key pair.

          • Monitoring (dict) --

            The monitoring for the instance.

            • Enabled (boolean) --

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

          • Placement (dict) --

            The placement of the instance.

            • AvailabilityZone (string) --

              The Availability Zone of the instance.

            • Affinity (string) --

              The affinity setting for the instance on the Dedicated Host.

            • GroupName (string) --

              The name of the placement group for the instance.

            • HostId (string) --

              The ID of the Dedicated Host for the instance.

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

            • SpreadDomain (string) --

              Reserved for future use.

            • HostResourceGroupArn (string) --

              The ARN of the host resource group in which to launch the instances.

            • PartitionNumber (integer) --

              The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition .

          • RamDiskId (string) --

            The ID of the RAM disk, if applicable.

          • DisableApiTermination (boolean) --

            If set to true , indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.

          • InstanceInitiatedShutdownBehavior (string) --

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

          • UserData (string) --

            The user data for the instance.

          • TagSpecifications (list) --

            The tags that are applied to the resources that are created during instance launch.

            • (dict) --

              The tags specification for the launch template.

              • ResourceType (string) --

                The type of resource to tag.

              • Tags (list) --

                The tags for 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 256 Unicode characters.

          • ElasticGpuSpecifications (list) --

            The elastic GPU specification.

            • (dict) --

              Describes an elastic GPU.

              • Type (string) --

                The elastic GPU type.

          • ElasticInferenceAccelerators (list) --

            The elastic inference accelerator for the instance.

            • (dict) --

              Describes an elastic inference accelerator.

              • Type (string) --

                The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

              • Count (integer) --

                The number of elastic inference accelerators to attach to the instance.

                Default: 1

          • SecurityGroupIds (list) --

            The security group IDs.

            • (string) --
          • SecurityGroups (list) --

            The security group names.

            • (string) --
          • InstanceMarketOptions (dict) --

            The market (purchasing) option for the instances.

            • MarketType (string) --

              The market type.

            • SpotOptions (dict) --

              The options for Spot Instances.

              • MaxPrice (string) --

                The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                Warning

                If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

              • SpotInstanceType (string) --

                The Spot Instance request type.

              • BlockDurationMinutes (integer) --

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

              • ValidUntil (datetime) --

                The end date of the request. For 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.

              • InstanceInterruptionBehavior (string) --

                The behavior when a Spot Instance is interrupted.

          • CreditSpecification (dict) --

            The credit option for CPU usage of the instance.

            • CpuCredits (string) --

              The credit option for CPU usage of a T instance.

              Valid values: standard | unlimited

          • CpuOptions (dict) --

            The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide .

            • CoreCount (integer) --

              The number of CPU cores for the instance.

            • ThreadsPerCore (integer) --

              The number of threads per CPU core.

          • CapacityReservationSpecification (dict) --

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference (string) --

              Indicates the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
            • CapacityReservationTarget (dict) --

              Information about the target Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId (string) --

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn (string) --

                The ARN of the targeted Capacity Reservation group.

          • LicenseSpecifications (list) --

            The license configurations.

            • (dict) --

              Describes a license configuration.

              • LicenseConfigurationArn (string) --

                The Amazon Resource Name (ARN) of the license configuration.

          • HibernationOptions (dict) --

            Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .

            • Configured (boolean) --

              If this parameter is set to true , the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • MetadataOptions (dict) --

            The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .

            • State (string) --

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

            • HttpTokens (string) --

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional .

              If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

            • HttpPutResponseHopLimit (integer) --

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint (string) --

              Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled .

              Note

              If you specify a value of disabled , you will not be able to access your instance metadata.

            • HttpProtocolIpv6 (string) --

              Enables or disables the IPv6 endpoint for the instance metadata service.

              Default: disabled

            • InstanceMetadataTags (string) --

              Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

              Default: disabled

          • EnclaveOptions (dict) --

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled (boolean) --

              If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • InstanceRequirements (dict) --

            The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

            If you specify InstanceRequirements , you can't specify InstanceTypes .

            • VCpuCount (dict) --

              The minimum and maximum number of vCPUs.

              • Min (integer) --

                The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

              • Max (integer) --

                The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

            • MemoryMiB (dict) --

              The minimum and maximum amount of memory, in MiB.

              • Min (integer) --

                The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • CpuManufacturers (list) --

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel .
              • For instance types with AMD CPUs, specify amd .
              • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

              Note

              Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

              • (string) --
            • MemoryGiBPerVCpu (dict) --

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

              • Max (float) --

                The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

            • ExcludedInstanceTypes (list) --

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

              For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

              • (string) --
            • InstanceGenerations (list) --

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

              For current generation instance types, specify current .

              For previous generation instance types, specify previous .

              Default: Current and previous generation instance types

              • (string) --
            • SpotMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 20

            • BareMetal (string) --

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included .
              • To require only bare metal instance types, specify required .
              • To exclude bare metal instance types, specify excluded .

              Default: excluded

            • BurstablePerformance (string) --

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

              • To include burstable performance instance types, specify included .
              • To require only burstable performance instance types, specify required .
              • To exclude burstable performance instance types, specify excluded .

              Default: excluded

            • RequireHibernateSupport (boolean) --

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores .

              Default: false

            • NetworkInterfaceCount (dict) --

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

            • LocalStorage (string) --

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

              • To include instance types with instance store volumes, specify included .
              • To require only instance types with instance store volumes, specify required .
              • To exclude instance types with instance store volumes, specify excluded .

              Default: included

            • LocalStorageTypes (list) --

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd .
              • For instance types with solid state drive (SSD) storage, specify ssd .

              Default: hdd and ssd

              • (string) --
            • TotalLocalStorageGB (dict) --

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

              • Max (float) --

                The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

            • BaselineEbsBandwidthMbps (dict) --

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

            • AcceleratorTypes (list) --

              The accelerator types that must be on the instance type.

              • For instance types with GPU accelerators, specify gpu .
              • For instance types with FPGA accelerators, specify fpga .
              • For instance types with inference accelerators, specify inference .

              Default: Any accelerator type

              • (string) --
            • AcceleratorCount (dict) --

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0 .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

            • AcceleratorManufacturers (list) --

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia .
              • For instance types with AMD devices, specify amd .
              • For instance types with Amazon Web Services devices, specify amazon-web-services .
              • For instance types with Xilinx devices, specify xilinx .

              Default: Any manufacturer

              • (string) --
            • AcceleratorNames (list) --

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100 .
              • For instance types with NVIDIA V100 GPUs, specify v100 .
              • For instance types with NVIDIA K80 GPUs, specify k80 .
              • For instance types with NVIDIA T4 GPUs, specify t4 .
              • For instance types with NVIDIA M60 GPUs, specify m60 .
              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
              • For instance types with Xilinx VU9P FPGAs, specify vu9p .

              Default: Any accelerator

              • (string) --
            • AcceleratorTotalMemoryMiB (dict) --

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • PrivateDnsNameOptions (dict) --

            The options for the instance hostname.

            • HostnameType (string) --

              The type of hostname to assign to an instance.

            • EnableResourceNameDnsARecord (boolean) --

              Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

            • EnableResourceNameDnsAAAARecord (boolean) --

              Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

          • MaintenanceOptions (dict) --

            The maintenance options for your instance.

            • AutoRecovery (string) --

              Disables the automatic recovery behavior of your instance or sets it to default.

          • DisableApiStop (boolean) --

            Indicates whether the instance is enabled for stop protection. For more information, see Stop Protection .

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

Examples

This example describes the versions for the specified launch template.

response = client.describe_launch_template_versions(
    LaunchTemplateId='068f72b72934aff71',
)

print(response)

Expected Output:

{
    'LaunchTemplateVersions': [
        {
            'CreateTime': datetime(2017, 11, 20, 13, 12, 32, 0, 324, 0),
            'CreatedBy': 'arn:aws:iam::123456789102:root',
            'DefaultVersion': False,
            'LaunchTemplateData': {
                'ImageId': 'ami-6057e21a',
                'InstanceType': 't2.medium',
                'KeyName': 'kp-us-east',
                'NetworkInterfaces': [
                    {
                        'DeviceIndex': 0,
                        'Groups': [
                            'sg-7c227019',
                        ],
                        'SubnetId': 'subnet-1a2b3c4d',
                    },
                ],
            },
            'LaunchTemplateId': 'lt-068f72b72934aff71',
            'LaunchTemplateName': 'Webservers',
            'VersionNumber': 2,
        },
        {
            'CreateTime': datetime(2017, 11, 20, 12, 52, 33, 0, 324, 0),
            'CreatedBy': 'arn:aws:iam::123456789102:root',
            'DefaultVersion': True,
            'LaunchTemplateData': {
                'ImageId': 'ami-aabbcc11',
                'InstanceType': 't2.medium',
                'KeyName': 'kp-us-east',
                'NetworkInterfaces': [
                    {
                        'AssociatePublicIpAddress': True,
                        'DeleteOnTermination': False,
                        'DeviceIndex': 0,
                        'Groups': [
                            'sg-7c227019',
                        ],
                        'SubnetId': 'subnet-7b16de0c',
                    },
                ],
                'UserData': '',
            },
            'LaunchTemplateId': 'lt-068f72b72934aff71',
            'LaunchTemplateName': 'Webservers',
            'VersionNumber': 1,
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_launch_templates(**kwargs)

Describes one or more launch templates.

See also: AWS API Documentation

Request Syntax

response = client.describe_launch_templates(
    DryRun=True|False,
    LaunchTemplateIds=[
        'string',
    ],
    LaunchTemplateNames=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LaunchTemplateIds (list) --

    One or more launch template IDs.

    • (string) --
  • LaunchTemplateNames (list) --

    One or more launch template names.

    • (string) --
  • Filters (list) --

    One or more filters.

    • create-time - The time the launch template was created.
    • launch-template-name - The name of the launch template.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NextToken (string) -- The token to request the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 1 and 200.
Return type

dict

Returns

Response Syntax

{
    'LaunchTemplates': [
        {
            'LaunchTemplateId': 'string',
            'LaunchTemplateName': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'CreatedBy': 'string',
            'DefaultVersionNumber': 123,
            'LatestVersionNumber': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LaunchTemplates (list) --

      Information about the launch templates.

      • (dict) --

        Describes a launch template.

        • LaunchTemplateId (string) --

          The ID of the launch template.

        • LaunchTemplateName (string) --

          The name of the launch template.

        • CreateTime (datetime) --

          The time launch template was created.

        • CreatedBy (string) --

          The principal that created the launch template.

        • DefaultVersionNumber (integer) --

          The version number of the default version of the launch template.

        • LatestVersionNumber (integer) --

          The version number of the latest version of the launch template.

        • Tags (list) --

          The tags for the launch template.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

Examples

This example describes the specified launch template.

response = client.describe_launch_templates(
    LaunchTemplateIds=[
        'lt-01238c059e3466abc',
    ],
)

print(response)

Expected Output:

{
    'LaunchTemplates': [
        {
            'CreateTime': datetime(2018, 1, 16, 4, 32, 57, 1, 16, 0),
            'CreatedBy': 'arn:aws:iam::123456789012:root',
            'DefaultVersionNumber': 1,
            'LatestVersionNumber': 1,
            'LaunchTemplateId': 'lt-01238c059e3466abc',
            'LaunchTemplateName': 'my-template',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_local_gateway_route_table_virtual_interface_group_associations(**kwargs)

Describes the associations between virtual interface groups and local gateway route tables.

See also: AWS API Documentation

Request Syntax

response = client.describe_local_gateway_route_table_virtual_interface_group_associations(
    LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds (list) --

    The IDs of the associations.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.
    • local-gateway-route-table-id - The ID of the local gateway route table.
    • local-gateway-route-table-virtual-interface-group-association-id - The ID of the association.
    • local-gateway-route-table-virtual-interface-group-id - The ID of the virtual interface group.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.
    • state - The state of the association.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTableVirtualInterfaceGroupAssociations': [
        {
            'LocalGatewayRouteTableVirtualInterfaceGroupAssociationId': 'string',
            'LocalGatewayVirtualInterfaceGroupId': 'string',
            'LocalGatewayId': 'string',
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LocalGatewayRouteTableVirtualInterfaceGroupAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes an association between a local gateway route table and a virtual interface group.

        • LocalGatewayRouteTableVirtualInterfaceGroupAssociationId (string) --

          The ID of the association.

        • LocalGatewayVirtualInterfaceGroupId (string) --

          The ID of the virtual interface group.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.

        • State (string) --

          The state of the association.

        • Tags (list) --

          The tags assigned to the association.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_local_gateway_route_table_vpc_associations(**kwargs)

Describes the specified associations between VPCs and local gateway route tables.

See also: AWS API Documentation

Request Syntax

response = client.describe_local_gateway_route_table_vpc_associations(
    LocalGatewayRouteTableVpcAssociationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayRouteTableVpcAssociationIds (list) --

    The IDs of the associations.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local gateway route table for the association.
    • local-gateway-route-table-id - The ID of the local gateway route table.
    • local-gateway-route-table-vpc-association-id - The ID of the association.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway route table for the association.
    • state - The state of the association.
    • vpc-id - The ID of the VPC.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTableVpcAssociations': [
        {
            'LocalGatewayRouteTableVpcAssociationId': 'string',
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'LocalGatewayId': 'string',
            'VpcId': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LocalGatewayRouteTableVpcAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes an association between a local gateway route table and a VPC.

        • LocalGatewayRouteTableVpcAssociationId (string) --

          The ID of the association.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table for the association.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • VpcId (string) --

          The ID of the VPC.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway route table for the association.

        • State (string) --

          The state of the association.

        • Tags (list) --

          The tags assigned to the association.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_local_gateway_route_tables(**kwargs)

Describes one or more local gateway route tables. By default, all local gateway route tables are described. Alternatively, you can filter the results.

See also: AWS API Documentation

Request Syntax

response = client.describe_local_gateway_route_tables(
    LocalGatewayRouteTableIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayRouteTableIds (list) --

    The IDs of the local gateway route tables.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local gateway route table.
    • local-gateway-route-table-id - The ID of a local gateway route table.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway route table.
    • state - The state of the local gateway route table.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTables': [
        {
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'LocalGatewayId': 'string',
            'OutpostArn': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LocalGatewayRouteTables (list) --

      Information about the local gateway route tables.

      • (dict) --

        Describes a local gateway route table.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway route table.

        • State (string) --

          The state of the local gateway route table.

        • Tags (list) --

          The tags assigned to the local gateway route table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_local_gateway_virtual_interface_groups(**kwargs)

Describes the specified local gateway virtual interface groups.

See also: AWS API Documentation

Request Syntax

response = client.describe_local_gateway_virtual_interface_groups(
    LocalGatewayVirtualInterfaceGroupIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayVirtualInterfaceGroupIds (list) --

    The IDs of the virtual interface groups.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-virtual-interface-group-id - The ID of the virtual interface group.
    • local-gateway-virtual-interface-id - The ID of the virtual interface.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway virtual interface group.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGatewayVirtualInterfaceGroups': [
        {
            'LocalGatewayVirtualInterfaceGroupId': 'string',
            'LocalGatewayVirtualInterfaceIds': [
                'string',
            ],
            'LocalGatewayId': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LocalGatewayVirtualInterfaceGroups (list) --

      The virtual interface groups.

      • (dict) --

        Describes a local gateway virtual interface group.

        • LocalGatewayVirtualInterfaceGroupId (string) --

          The ID of the virtual interface group.

        • LocalGatewayVirtualInterfaceIds (list) --

          The IDs of the virtual interfaces.

          • (string) --
        • LocalGatewayId (string) --

          The ID of the local gateway.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway virtual interface group.

        • Tags (list) --

          The tags assigned to the virtual interface 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 256 Unicode characters.

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

describe_local_gateway_virtual_interfaces(**kwargs)

Describes the specified local gateway virtual interfaces.

See also: AWS API Documentation

Request Syntax

response = client.describe_local_gateway_virtual_interfaces(
    LocalGatewayVirtualInterfaceIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayVirtualInterfaceIds (list) --

    The IDs of the virtual interfaces.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-address - The local address.
    • local-bgp-asn - The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.
    • local-gateway-id - The ID of the local gateway.
    • local-gateway-virtual-interface-id - The ID of the virtual interface.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway virtual interface.
    • peer-address - The peer address.
    • peer-bgp-asn - The peer BGP ASN.
    • vlan - The ID of the VLAN.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGatewayVirtualInterfaces': [
        {
            'LocalGatewayVirtualInterfaceId': 'string',
            'LocalGatewayId': 'string',
            'Vlan': 123,
            'LocalAddress': 'string',
            'PeerAddress': 'string',
            'LocalBgpAsn': 123,
            'PeerBgpAsn': 123,
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LocalGatewayVirtualInterfaces (list) --

      Information about the virtual interfaces.

      • (dict) --

        Describes a local gateway virtual interface.

        • LocalGatewayVirtualInterfaceId (string) --

          The ID of the virtual interface.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • Vlan (integer) --

          The ID of the VLAN.

        • LocalAddress (string) --

          The local address.

        • PeerAddress (string) --

          The peer address.

        • LocalBgpAsn (integer) --

          The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.

        • PeerBgpAsn (integer) --

          The peer BGP ASN.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway virtual interface.

        • Tags (list) --

          The tags assigned to the virtual interface.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_local_gateways(**kwargs)

Describes one or more local gateways. By default, all local gateways are described. Alternatively, you can filter the results.

See also: AWS API Documentation

Request Syntax

response = client.describe_local_gateways(
    LocalGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayIds (list) --

    The IDs of the local gateways.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway.
    • state - The state of the association.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'LocalGateways': [
        {
            'LocalGatewayId': 'string',
            'OutpostArn': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • LocalGateways (list) --

      Information about the local gateways.

      • (dict) --

        Describes a local gateway.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway.

        • State (string) --

          The state of the local gateway.

        • Tags (list) --

          The tags assigned to the local gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_managed_prefix_lists(**kwargs)

Describes your managed prefix lists and any Amazon Web Services-managed prefix lists.

To view the entries for your prefix list, use GetManagedPrefixListEntries .

See also: AWS API Documentation

Request Syntax

response = client.describe_managed_prefix_lists(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    PrefixListIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • owner-id - The ID of the prefix list owner.
    • prefix-list-id - The ID of the prefix list.
    • prefix-list-name - The name of the prefix list.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • PrefixListIds (list) --

    One or more prefix list IDs.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'PrefixLists': [
        {
            'PrefixListId': 'string',
            'AddressFamily': 'string',
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
            'StateMessage': 'string',
            'PrefixListArn': 'string',
            'PrefixListName': 'string',
            'MaxEntries': 123,
            'Version': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'OwnerId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

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

    • PrefixLists (list) --

      Information about the prefix lists.

      • (dict) --

        Describes a managed prefix list.

        • PrefixListId (string) --

          The ID of the prefix list.

        • AddressFamily (string) --

          The IP address version.

        • State (string) --

          The current state of the prefix list.

        • StateMessage (string) --

          The state message.

        • PrefixListArn (string) --

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName (string) --

          The name of the prefix list.

        • MaxEntries (integer) --

          The maximum number of entries for the prefix list.

        • Version (integer) --

          The version of the prefix list.

        • Tags (list) --

          The tags for the prefix list.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • OwnerId (string) --

          The ID of the owner of the prefix list.

describe_moving_addresses(**kwargs)

Describes your Elastic IP addresses that are being moved to the EC2-VPC platform, or that are being restored to the EC2-Classic platform. This request does not return information about any other Elastic IP addresses in your account.

See also: AWS API Documentation

Request Syntax

response = client.describe_moving_addresses(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    PublicIps=[
        'string',
    ]
)
Parameters
  • Filters (list) --

    One or more filters.

    • moving-status - The status of the Elastic IP address (MovingToVpc | RestoringToClassic ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) --

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1000; if MaxResults is given a value outside of this range, an error is returned.

    Default: If no value is provided, the default is 1000.

  • NextToken (string) -- The token for the next page of results.
  • PublicIps (list) --

    One or more Elastic IP addresses.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'MovingAddressStatuses': [
        {
            'MoveStatus': 'movingToVpc'|'restoringToClassic',
            'PublicIp': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • MovingAddressStatuses (list) --

      The status for each Elastic IP address.

      • (dict) --

        Describes the status of a moving Elastic IP address.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        • MoveStatus (string) --

          The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.

        • PublicIp (string) --

          The Elastic IP address.

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

Examples

This example describes all of your moving Elastic IP addresses.

response = client.describe_moving_addresses(
)

print(response)

Expected Output:

{
    'MovingAddressStatuses': [
        {
            'MoveStatus': 'MovingToVpc',
            'PublicIp': '198.51.100.0',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_nat_gateways(**kwargs)

Describes one or more of your NAT gateways.

See also: AWS API Documentation

Request Syntax

response = client.describe_nat_gateways(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NatGatewayIds=[
        'string',
    ],
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • nat-gateway-id - The ID of the NAT gateway.
    • state - The state of the NAT gateway (pending | failed | available | deleting | deleted ).
    • subnet-id - The ID of the subnet in which the NAT gateway resides.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC in which the NAT gateway resides.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NatGatewayIds (list) --

    One or more NAT gateway IDs.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'NatGateways': [
        {
            'CreateTime': datetime(2015, 1, 1),
            'DeleteTime': datetime(2015, 1, 1),
            'FailureCode': 'string',
            'FailureMessage': 'string',
            'NatGatewayAddresses': [
                {
                    'AllocationId': 'string',
                    'NetworkInterfaceId': 'string',
                    'PrivateIp': 'string',
                    'PublicIp': 'string'
                },
            ],
            'NatGatewayId': 'string',
            'ProvisionedBandwidth': {
                'ProvisionTime': datetime(2015, 1, 1),
                'Provisioned': 'string',
                'RequestTime': datetime(2015, 1, 1),
                'Requested': 'string',
                'Status': 'string'
            },
            'State': 'pending'|'failed'|'available'|'deleting'|'deleted',
            'SubnetId': 'string',
            'VpcId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'ConnectivityType': 'private'|'public'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NatGateways (list) --

      Information about the NAT gateways.

      • (dict) --

        Describes a NAT gateway.

        • CreateTime (datetime) --

          The date and time the NAT gateway was created.

        • DeleteTime (datetime) --

          The date and time the NAT gateway was deleted, if applicable.

        • FailureCode (string) --

          If the NAT gateway could not be created, specifies the error code for the failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound )

        • FailureMessage (string) --

          If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

          • For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"
          • For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"
          • For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"
          • For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"
          • For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."
          • For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."
        • NatGatewayAddresses (list) --

          Information about the IP addresses and network interface associated with the NAT gateway.

          • (dict) --

            Describes the IP addresses and network interface associated with a NAT gateway.

            • AllocationId (string) --

              [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

            • NetworkInterfaceId (string) --

              The ID of the network interface associated with the NAT gateway.

            • PrivateIp (string) --

              The private IP address associated with the NAT gateway.

            • PublicIp (string) --

              [Public NAT gateway only] The Elastic IP address associated with the NAT gateway.

        • NatGatewayId (string) --

          The ID of the NAT gateway.

        • ProvisionedBandwidth (dict) --

          Reserved. If you need to sustain traffic greater than the documented limits , contact us through the Support Center .

        • State (string) --

          The state of the NAT gateway.

          • pending : The NAT gateway is being created and is not ready to process traffic.
          • failed : The NAT gateway could not be created. Check the failureCode and failureMessage fields for the reason.
          • available : The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.
          • deleting : The NAT gateway is in the process of being terminated and may still be processing traffic.
          • deleted : The NAT gateway has been terminated and is no longer processing traffic.
        • SubnetId (string) --

          The ID of the subnet in which the NAT gateway is located.

        • VpcId (string) --

          The ID of the VPC in which the NAT gateway is located.

        • Tags (list) --

          The tags for the NAT gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • ConnectivityType (string) --

          Indicates whether the NAT gateway supports public or private connectivity.

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

Examples

This example describes the NAT gateway for the specified VPC.

response = client.describe_nat_gateways(
    Filter=[
        {
            'Name': 'vpc-id',
            'Values': [
                'vpc-1a2b3c4d',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'NatGateways': [
        {
            'CreateTime': datetime(2015, 12, 1, 12, 26, 55, 1, 335, 0),
            'NatGatewayAddresses': [
                {
                    'AllocationId': 'eipalloc-89c620ec',
                    'NetworkInterfaceId': 'eni-9dec76cd',
                    'PrivateIp': '10.0.0.149',
                    'PublicIp': '198.11.222.333',
                },
            ],
            'NatGatewayId': 'nat-05dba92075d71c408',
            'State': 'available',
            'SubnetId': 'subnet-847e4dc2',
            'VpcId': 'vpc-1a2b3c4d',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_network_acls(**kwargs)

Describes one or more of your network ACLs.

For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_network_acls(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkAclIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • association.association-id - The ID of an association ID for the ACL.
    • association.network-acl-id - The ID of the network ACL involved in the association.
    • association.subnet-id - The ID of the subnet involved in the association.
    • default - Indicates whether the ACL is the default network ACL for the VPC.
    • entry.cidr - The IPv4 CIDR range specified in the entry.
    • entry.icmp.code - The ICMP code specified in the entry, if any.
    • entry.icmp.type - The ICMP type specified in the entry, if any.
    • entry.ipv6-cidr - The IPv6 CIDR range specified in the entry.
    • entry.port-range.from - The start of the port range specified in the entry.
    • entry.port-range.to - The end of the port range specified in the entry.
    • entry.protocol - The protocol specified in the entry (tcp | udp | icmp or a protocol number).
    • entry.rule-action - Allows or denies the matching traffic (allow | deny ).
    • entry.egress - A Boolean that indicates the type of rule. Specify true for egress rules, or false for ingress rules.
    • entry.rule-number - The number of an entry (in other words, rule) in the set of ACL entries.
    • network-acl-id - The ID of the network ACL.
    • owner-id - The ID of the Amazon Web Services account that owns the network ACL.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the network ACL.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkAclIds (list) --

    One or more network ACL IDs.

    Default: Describes all your network ACLs.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'NetworkAcls': [
        {
            'Associations': [
                {
                    'NetworkAclAssociationId': 'string',
                    'NetworkAclId': 'string',
                    'SubnetId': 'string'
                },
            ],
            'Entries': [
                {
                    'CidrBlock': 'string',
                    'Egress': True|False,
                    'IcmpTypeCode': {
                        'Code': 123,
                        'Type': 123
                    },
                    'Ipv6CidrBlock': 'string',
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'Protocol': 'string',
                    'RuleAction': 'allow'|'deny',
                    'RuleNumber': 123
                },
            ],
            'IsDefault': True|False,
            'NetworkAclId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'OwnerId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkAcls (list) --

      Information about one or more network ACLs.

      • (dict) --

        Describes a network ACL.

        • Associations (list) --

          Any associations between the network ACL and one or more subnets

          • (dict) --

            Describes an association between a network ACL and a subnet.

            • NetworkAclAssociationId (string) --

              The ID of the association between a network ACL and a subnet.

            • NetworkAclId (string) --

              The ID of the network ACL.

            • SubnetId (string) --

              The ID of the subnet.

        • Entries (list) --

          One or more entries (rules) in the network ACL.

          • (dict) --

            Describes an entry in a network ACL.

            • CidrBlock (string) --

              The IPv4 network range to allow or deny, in CIDR notation.

            • Egress (boolean) --

              Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

            • IcmpTypeCode (dict) --

              ICMP protocol: The ICMP type and code.

              • Code (integer) --

                The ICMP code. A value of -1 means all codes for the specified ICMP type.

              • Type (integer) --

                The ICMP type. A value of -1 means all types.

            • Ipv6CidrBlock (string) --

              The IPv6 network range to allow or deny, in CIDR notation.

            • PortRange (dict) --

              TCP or UDP protocols: The range of ports the rule applies to.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • Protocol (string) --

              The protocol number. A value of "-1" means all protocols.

            • RuleAction (string) --

              Indicates whether to allow or deny the traffic that matches the rule.

            • RuleNumber (integer) --

              The rule number for the entry. ACL entries are processed in ascending order by rule number.

        • IsDefault (boolean) --

          Indicates whether this is the default network ACL for the VPC.

        • NetworkAclId (string) --

          The ID of the network ACL.

        • Tags (list) --

          Any tags assigned to the network ACL.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VpcId (string) --

          The ID of the VPC for the network ACL.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the network ACL.

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

Examples

This example describes the specified network ACL.

response = client.describe_network_acls(
    NetworkAclIds=[
        'acl-5fb85d36',
    ],
)

print(response)

Expected Output:

{
    'NetworkAcls': [
        {
            'Associations': [
                {
                    'NetworkAclAssociationId': 'aclassoc-66ea5f0b',
                    'NetworkAclId': 'acl-9aeb5ef7',
                    'SubnetId': 'subnet-65ea5f08',
                },
            ],
            'Entries': [
                {
                    'CidrBlock': '0.0.0.0/0',
                    'Egress': True,
                    'Protocol': '-1',
                    'RuleAction': 'deny',
                    'RuleNumber': 32767,
                },
                {
                    'CidrBlock': '0.0.0.0/0',
                    'Egress': False,
                    'Protocol': '-1',
                    'RuleAction': 'deny',
                    'RuleNumber': 32767,
                },
            ],
            'IsDefault': False,
            'NetworkAclId': 'acl-5fb85d36',
            'Tags': [
            ],
            'VpcId': 'vpc-a01106c2',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_network_insights_access_scope_analyses(**kwargs)

Describes the specified Network Access Scope analyses.

See also: AWS API Documentation

Request Syntax

response = client.describe_network_insights_access_scope_analyses(
    NetworkInsightsAccessScopeAnalysisIds=[
        'string',
    ],
    NetworkInsightsAccessScopeId='string',
    AnalysisStartTimeBegin=datetime(2015, 1, 1),
    AnalysisStartTimeEnd=datetime(2015, 1, 1),
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    DryRun=True|False,
    NextToken='string'
)
Parameters
  • NetworkInsightsAccessScopeAnalysisIds (list) --

    The IDs of the Network Access Scope analyses.

    • (string) --
  • NetworkInsightsAccessScopeId (string) -- The ID of the Network Access Scope.
  • AnalysisStartTimeBegin (datetime) -- Filters the results based on the start time. The analysis must have started on or after this time.
  • AnalysisStartTimeEnd (datetime) -- Filters the results based on the start time. The analysis must have started on or before this time.
  • Filters (list) --

    There are no supported filters.

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopeAnalyses': [
        {
            'NetworkInsightsAccessScopeAnalysisId': 'string',
            'NetworkInsightsAccessScopeAnalysisArn': 'string',
            'NetworkInsightsAccessScopeId': 'string',
            'Status': 'running'|'succeeded'|'failed',
            'StatusMessage': 'string',
            'WarningMessage': 'string',
            'StartDate': datetime(2015, 1, 1),
            'EndDate': datetime(2015, 1, 1),
            'FindingsFound': 'true'|'false'|'unknown',
            'AnalyzedEniCount': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopeAnalyses (list) --

      The Network Access Scope analyses.

      • (dict) --

        Describes a Network Access Scope analysis.

        • NetworkInsightsAccessScopeAnalysisId (string) --

          The ID of the Network Access Scope analysis.

        • NetworkInsightsAccessScopeAnalysisArn (string) --

          The Amazon Resource Name (ARN) of the Network Access Scope analysis.

        • NetworkInsightsAccessScopeId (string) --

          The ID of the Network Access Scope.

        • Status (string) --

          The status.

        • StatusMessage (string) --

          The status message.

        • WarningMessage (string) --

          The warning message.

        • StartDate (datetime) --

          The analysis start date.

        • EndDate (datetime) --

          The analysis end date.

        • FindingsFound (string) --

          Indicates whether there are findings.

        • AnalyzedEniCount (integer) --

          The number of network interfaces analyzed.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_network_insights_access_scopes(**kwargs)

Describes the specified Network Access Scopes.

See also: AWS API Documentation

Request Syntax

response = client.describe_network_insights_access_scopes(
    NetworkInsightsAccessScopeIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    DryRun=True|False,
    NextToken='string'
)
Parameters
  • NetworkInsightsAccessScopeIds (list) --

    The IDs of the Network Access Scopes.

    • (string) --
  • Filters (list) --

    There are no supported filters.

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopes': [
        {
            'NetworkInsightsAccessScopeId': 'string',
            'NetworkInsightsAccessScopeArn': 'string',
            'CreatedDate': datetime(2015, 1, 1),
            'UpdatedDate': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopes (list) --

      The Network Access Scopes.

      • (dict) --

        Describes a Network Access Scope.

        • NetworkInsightsAccessScopeId (string) --

          The ID of the Network Access Scope.

        • NetworkInsightsAccessScopeArn (string) --

          The Amazon Resource Name (ARN) of the Network Access Scope.

        • CreatedDate (datetime) --

          The creation date.

        • UpdatedDate (datetime) --

          The last updated date.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_network_insights_analyses(**kwargs)

Describes one or more of your network insights analyses.

See also: AWS API Documentation

Request Syntax

response = client.describe_network_insights_analyses(
    NetworkInsightsAnalysisIds=[
        'string',
    ],
    NetworkInsightsPathId='string',
    AnalysisStartTime=datetime(2015, 1, 1),
    AnalysisEndTime=datetime(2015, 1, 1),
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    DryRun=True|False,
    NextToken='string'
)
Parameters
  • NetworkInsightsAnalysisIds (list) --

    The ID of the network insights analyses. You must specify either analysis IDs or a path ID.

    • (string) --
  • NetworkInsightsPathId (string) -- The ID of the path. You must specify either a path ID or analysis IDs.
  • AnalysisStartTime (datetime) -- The time when the network insights analyses started.
  • AnalysisEndTime (datetime) -- The time when the network insights analyses ended.
  • Filters (list) --

    The filters. The following are the possible values:

    • PathFound - A Boolean value that indicates whether a feasible path is found.
    • Status - The status of the analysis (running | succeeded | failed).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAnalyses': [
        {
            'NetworkInsightsAnalysisId': 'string',
            'NetworkInsightsAnalysisArn': 'string',
            'NetworkInsightsPathId': 'string',
            'FilterInArns': [
                'string',
            ],
            'StartDate': datetime(2015, 1, 1),
            'Status': 'running'|'succeeded'|'failed',
            'StatusMessage': 'string',
            'WarningMessage': 'string',
            'NetworkPathFound': True|False,
            'ForwardPathComponents': [
                {
                    'SequenceNumber': 123,
                    'AclRule': {
                        'Cidr': 'string',
                        'Egress': True|False,
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'string',
                        'RuleNumber': 123
                    },
                    'AttachedTo': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Component': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'DestinationVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'OutboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'InboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'RouteTableRoute': {
                        'DestinationCidr': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'string',
                        'TransitGatewayId': 'string',
                        'VpcPeeringConnectionId': 'string'
                    },
                    'SecurityGroupRule': {
                        'Cidr': 'string',
                        'Direction': 'string',
                        'SecurityGroupId': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'PrefixListId': 'string',
                        'Protocol': 'string'
                    },
                    'SourceVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Subnet': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Vpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AdditionalDetails': [
                        {
                            'AdditionalDetailType': 'string',
                            'Component': {
                                'Id': 'string',
                                'Arn': 'string',
                                'Name': 'string'
                            }
                        },
                    ],
                    'TransitGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTableRoute': {
                        'DestinationCidr': 'string',
                        'State': 'string',
                        'RouteOrigin': 'string',
                        'PrefixListId': 'string',
                        'AttachmentId': 'string',
                        'ResourceId': 'string',
                        'ResourceType': 'string'
                    }
                },
            ],
            'ReturnPathComponents': [
                {
                    'SequenceNumber': 123,
                    'AclRule': {
                        'Cidr': 'string',
                        'Egress': True|False,
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'string',
                        'RuleNumber': 123
                    },
                    'AttachedTo': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Component': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'DestinationVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'OutboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'InboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'RouteTableRoute': {
                        'DestinationCidr': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'string',
                        'TransitGatewayId': 'string',
                        'VpcPeeringConnectionId': 'string'
                    },
                    'SecurityGroupRule': {
                        'Cidr': 'string',
                        'Direction': 'string',
                        'SecurityGroupId': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'PrefixListId': 'string',
                        'Protocol': 'string'
                    },
                    'SourceVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Subnet': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Vpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AdditionalDetails': [
                        {
                            'AdditionalDetailType': 'string',
                            'Component': {
                                'Id': 'string',
                                'Arn': 'string',
                                'Name': 'string'
                            }
                        },
                    ],
                    'TransitGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTableRoute': {
                        'DestinationCidr': 'string',
                        'State': 'string',
                        'RouteOrigin': 'string',
                        'PrefixListId': 'string',
                        'AttachmentId': 'string',
                        'ResourceId': 'string',
                        'ResourceType': 'string'
                    }
                },
            ],
            'Explanations': [
                {
                    'Acl': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AclRule': {
                        'Cidr': 'string',
                        'Egress': True|False,
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'string',
                        'RuleNumber': 123
                    },
                    'Address': 'string',
                    'Addresses': [
                        'string',
                    ],
                    'AttachedTo': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AvailabilityZones': [
                        'string',
                    ],
                    'Cidrs': [
                        'string',
                    ],
                    'Component': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'CustomerGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Destination': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'DestinationVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Direction': 'string',
                    'ExplanationCode': 'string',
                    'IngressRouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'InternetGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'LoadBalancerArn': 'string',
                    'ClassicLoadBalancerListener': {
                        'LoadBalancerPort': 123,
                        'InstancePort': 123
                    },
                    'LoadBalancerListenerPort': 123,
                    'LoadBalancerTarget': {
                        'Address': 'string',
                        'AvailabilityZone': 'string',
                        'Instance': {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        },
                        'Port': 123
                    },
                    'LoadBalancerTargetGroup': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'LoadBalancerTargetGroups': [
                        {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        },
                    ],
                    'LoadBalancerTargetPort': 123,
                    'ElasticLoadBalancerListener': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'MissingComponent': 'string',
                    'NatGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'NetworkInterface': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'PacketField': 'string',
                    'VpcPeeringConnection': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Port': 123,
                    'PortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ],
                    'PrefixList': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Protocols': [
                        'string',
                    ],
                    'RouteTableRoute': {
                        'DestinationCidr': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'string',
                        'TransitGatewayId': 'string',
                        'VpcPeeringConnectionId': 'string'
                    },
                    'RouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'SecurityGroup': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'SecurityGroupRule': {
                        'Cidr': 'string',
                        'Direction': 'string',
                        'SecurityGroupId': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'PrefixListId': 'string',
                        'Protocol': 'string'
                    },
                    'SecurityGroups': [
                        {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        },
                    ],
                    'SourceVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'State': 'string',
                    'Subnet': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'SubnetRouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Vpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'VpcEndpoint': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'VpnConnection': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'VpnGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTableRoute': {
                        'DestinationCidr': 'string',
                        'State': 'string',
                        'RouteOrigin': 'string',
                        'PrefixListId': 'string',
                        'AttachmentId': 'string',
                        'ResourceId': 'string',
                        'ResourceType': 'string'
                    },
                    'TransitGatewayAttachment': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    }
                },
            ],
            'AlternatePathHints': [
                {
                    'ComponentId': 'string',
                    'ComponentArn': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsAnalyses (list) --

      Information about the network insights analyses.

      • (dict) --

        Describes a network insights analysis.

        • NetworkInsightsAnalysisId (string) --

          The ID of the network insights analysis.

        • NetworkInsightsAnalysisArn (string) --

          The Amazon Resource Name (ARN) of the network insights analysis.

        • NetworkInsightsPathId (string) --

          The ID of the path.

        • FilterInArns (list) --

          The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.

          • (string) --
        • StartDate (datetime) --

          The time the analysis started.

        • Status (string) --

          The status of the network insights analysis.

        • StatusMessage (string) --

          The status message, if the status is failed .

        • WarningMessage (string) --

          The warning message.

        • NetworkPathFound (boolean) --

          Indicates whether the destination is reachable from the source.

        • ForwardPathComponents (list) --

          The components in the path from source to destination.

          • (dict) --

            Describes a path component.

            • SequenceNumber (integer) --

              The sequence number.

            • AclRule (dict) --

              The network ACL rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Egress (boolean) --

                Indicates whether the rule is an outbound rule.

              • PortRange (dict) --

                The range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • Protocol (string) --

                The protocol.

              • RuleAction (string) --

                Indicates whether to allow or deny traffic that matches the rule.

              • RuleNumber (integer) --

                The rule number.

            • AttachedTo (dict) --

              The resource to which the path component is attached.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Component (dict) --

              The component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • DestinationVpc (dict) --

              The destination VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • OutboundHeader (dict) --

              The outbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • InboundHeader (dict) --

              The inbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • RouteTableRoute (dict) --

              The route table route.

              • DestinationCidr (string) --

                The destination IPv4 address, in CIDR notation.

              • DestinationPrefixListId (string) --

                The prefix of the Amazon Web Service.

              • EgressOnlyInternetGatewayId (string) --

                The ID of an egress-only internet gateway.

              • GatewayId (string) --

                The ID of the gateway, such as an internet gateway or virtual private gateway.

              • InstanceId (string) --

                The ID of the instance, such as a NAT instance.

              • NatGatewayId (string) --

                The ID of a NAT gateway.

              • NetworkInterfaceId (string) --

                The ID of a network interface.

              • Origin (string) --

                Describes how the route was created. The following are the possible values:

                • CreateRouteTable - The route was automatically created when the route table was created.
                • CreateRoute - The route was manually added to the route table.
                • EnableVgwRoutePropagation - The route was propagated by route propagation.
              • TransitGatewayId (string) --

                The ID of a transit gateway.

              • VpcPeeringConnectionId (string) --

                The ID of a VPC peering connection.

            • SecurityGroupRule (dict) --

              The security group rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Direction (string) --

                The direction. The following are the possible values:

                • egress
                • ingress
              • SecurityGroupId (string) --

                The security group ID.

              • PortRange (dict) --

                The port range.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • PrefixListId (string) --

                The prefix list ID.

              • Protocol (string) --

                The protocol name.

            • SourceVpc (dict) --

              The source VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Subnet (dict) --

              The subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Vpc (dict) --

              The component VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AdditionalDetails (list) --

              The additional details.

              • (dict) --

                Describes an additional detail for a path analysis.

                • AdditionalDetailType (string) --

                  The information type.

                • Component (dict) --

                  The path component.

                  • Id (string) --

                    The ID of the component.

                  • Arn (string) --

                    The Amazon Resource Name (ARN) of the component.

                  • Name (string) --

                    The name of the analysis component.

            • TransitGateway (dict) --

              The transit gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTableRoute (dict) --

              The route in a transit gateway route table.

              • DestinationCidr (string) --

                The CIDR block used for destination matches.

              • State (string) --

                The state of the route.

              • RouteOrigin (string) --

                The route origin. The following are the possible values:

                • static
                • propagated
              • PrefixListId (string) --

                The ID of the prefix list.

              • AttachmentId (string) --

                The ID of the route attachment.

              • ResourceId (string) --

                The ID of the resource for the route attachment.

              • ResourceType (string) --

                The resource type for the route attachment.

        • ReturnPathComponents (list) --

          The components in the path from destination to source.

          • (dict) --

            Describes a path component.

            • SequenceNumber (integer) --

              The sequence number.

            • AclRule (dict) --

              The network ACL rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Egress (boolean) --

                Indicates whether the rule is an outbound rule.

              • PortRange (dict) --

                The range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • Protocol (string) --

                The protocol.

              • RuleAction (string) --

                Indicates whether to allow or deny traffic that matches the rule.

              • RuleNumber (integer) --

                The rule number.

            • AttachedTo (dict) --

              The resource to which the path component is attached.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Component (dict) --

              The component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • DestinationVpc (dict) --

              The destination VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • OutboundHeader (dict) --

              The outbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • InboundHeader (dict) --

              The inbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • RouteTableRoute (dict) --

              The route table route.

              • DestinationCidr (string) --

                The destination IPv4 address, in CIDR notation.

              • DestinationPrefixListId (string) --

                The prefix of the Amazon Web Service.

              • EgressOnlyInternetGatewayId (string) --

                The ID of an egress-only internet gateway.

              • GatewayId (string) --

                The ID of the gateway, such as an internet gateway or virtual private gateway.

              • InstanceId (string) --

                The ID of the instance, such as a NAT instance.

              • NatGatewayId (string) --

                The ID of a NAT gateway.

              • NetworkInterfaceId (string) --

                The ID of a network interface.

              • Origin (string) --

                Describes how the route was created. The following are the possible values:

                • CreateRouteTable - The route was automatically created when the route table was created.
                • CreateRoute - The route was manually added to the route table.
                • EnableVgwRoutePropagation - The route was propagated by route propagation.
              • TransitGatewayId (string) --

                The ID of a transit gateway.

              • VpcPeeringConnectionId (string) --

                The ID of a VPC peering connection.

            • SecurityGroupRule (dict) --

              The security group rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Direction (string) --

                The direction. The following are the possible values:

                • egress
                • ingress
              • SecurityGroupId (string) --

                The security group ID.

              • PortRange (dict) --

                The port range.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • PrefixListId (string) --

                The prefix list ID.

              • Protocol (string) --

                The protocol name.

            • SourceVpc (dict) --

              The source VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Subnet (dict) --

              The subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Vpc (dict) --

              The component VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AdditionalDetails (list) --

              The additional details.

              • (dict) --

                Describes an additional detail for a path analysis.

                • AdditionalDetailType (string) --

                  The information type.

                • Component (dict) --

                  The path component.

                  • Id (string) --

                    The ID of the component.

                  • Arn (string) --

                    The Amazon Resource Name (ARN) of the component.

                  • Name (string) --

                    The name of the analysis component.

            • TransitGateway (dict) --

              The transit gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTableRoute (dict) --

              The route in a transit gateway route table.

              • DestinationCidr (string) --

                The CIDR block used for destination matches.

              • State (string) --

                The state of the route.

              • RouteOrigin (string) --

                The route origin. The following are the possible values:

                • static
                • propagated
              • PrefixListId (string) --

                The ID of the prefix list.

              • AttachmentId (string) --

                The ID of the route attachment.

              • ResourceId (string) --

                The ID of the resource for the route attachment.

              • ResourceType (string) --

                The resource type for the route attachment.

        • Explanations (list) --

          The explanations. For more information, see Reachability Analyzer explanation codes .

          • (dict) --

            Describes an explanation code for an unreachable path. For more information, see Reachability Analyzer explanation codes .

            • Acl (dict) --

              The network ACL.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AclRule (dict) --

              The network ACL rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Egress (boolean) --

                Indicates whether the rule is an outbound rule.

              • PortRange (dict) --

                The range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • Protocol (string) --

                The protocol.

              • RuleAction (string) --

                Indicates whether to allow or deny traffic that matches the rule.

              • RuleNumber (integer) --

                The rule number.

            • Address (string) --

              The IPv4 address, in CIDR notation.

            • Addresses (list) --

              The IPv4 addresses, in CIDR notation.

              • (string) --
            • AttachedTo (dict) --

              The resource to which the component is attached.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AvailabilityZones (list) --

              The Availability Zones.

              • (string) --
            • Cidrs (list) --

              The CIDR ranges.

              • (string) --
            • Component (dict) --

              The component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • CustomerGateway (dict) --

              The customer gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Destination (dict) --

              The destination.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • DestinationVpc (dict) --

              The destination VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Direction (string) --

              The direction. The following are the possible values:

              • egress
              • ingress
            • ExplanationCode (string) --

              The explanation code.

            • IngressRouteTable (dict) --

              The route table.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • InternetGateway (dict) --

              The internet gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • LoadBalancerArn (string) --

              The Amazon Resource Name (ARN) of the load balancer.

            • ClassicLoadBalancerListener (dict) --

              The listener for a Classic Load Balancer.

              • LoadBalancerPort (integer) --

                The port on which the load balancer is listening.

              • InstancePort (integer) --

                [Classic Load Balancers] The back-end port for the listener.

            • LoadBalancerListenerPort (integer) --

              The listener port of the load balancer.

            • LoadBalancerTarget (dict) --

              The target.

              • Address (string) --

                The IP address.

              • AvailabilityZone (string) --

                The Availability Zone.

              • Instance (dict) --

                Information about the instance.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

              • Port (integer) --

                The port on which the target is listening.

            • LoadBalancerTargetGroup (dict) --

              The target group.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • LoadBalancerTargetGroups (list) --

              The target groups.

              • (dict) --

                Describes a path component.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

            • LoadBalancerTargetPort (integer) --

              The target port.

            • ElasticLoadBalancerListener (dict) --

              The load balancer listener.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • MissingComponent (string) --

              The missing component.

            • NatGateway (dict) --

              The NAT gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • NetworkInterface (dict) --

              The network interface.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • PacketField (string) --

              The packet field.

            • VpcPeeringConnection (dict) --

              The VPC peering connection.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Port (integer) --

              The port.

            • PortRanges (list) --

              The port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

            • PrefixList (dict) --

              The prefix list.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Protocols (list) --

              The protocols.

              • (string) --
            • RouteTableRoute (dict) --

              The route table route.

              • DestinationCidr (string) --

                The destination IPv4 address, in CIDR notation.

              • DestinationPrefixListId (string) --

                The prefix of the Amazon Web Service.

              • EgressOnlyInternetGatewayId (string) --

                The ID of an egress-only internet gateway.

              • GatewayId (string) --

                The ID of the gateway, such as an internet gateway or virtual private gateway.

              • InstanceId (string) --

                The ID of the instance, such as a NAT instance.

              • NatGatewayId (string) --

                The ID of a NAT gateway.

              • NetworkInterfaceId (string) --

                The ID of a network interface.

              • Origin (string) --

                Describes how the route was created. The following are the possible values:

                • CreateRouteTable - The route was automatically created when the route table was created.
                • CreateRoute - The route was manually added to the route table.
                • EnableVgwRoutePropagation - The route was propagated by route propagation.
              • TransitGatewayId (string) --

                The ID of a transit gateway.

              • VpcPeeringConnectionId (string) --

                The ID of a VPC peering connection.

            • RouteTable (dict) --

              The route table.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • SecurityGroup (dict) --

              The security group.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • SecurityGroupRule (dict) --

              The security group rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Direction (string) --

                The direction. The following are the possible values:

                • egress
                • ingress
              • SecurityGroupId (string) --

                The security group ID.

              • PortRange (dict) --

                The port range.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • PrefixListId (string) --

                The prefix list ID.

              • Protocol (string) --

                The protocol name.

            • SecurityGroups (list) --

              The security groups.

              • (dict) --

                Describes a path component.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

            • SourceVpc (dict) --

              The source VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • State (string) --

              The state.

            • Subnet (dict) --

              The subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • SubnetRouteTable (dict) --

              The route table for the subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Vpc (dict) --

              The component VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • VpcEndpoint (dict) --

              The VPC endpoint.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • VpnConnection (dict) --

              The VPN connection.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • VpnGateway (dict) --

              The VPN gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGateway (dict) --

              The transit gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTable (dict) --

              The transit gateway route table.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTableRoute (dict) --

              The transit gateway route table route.

              • DestinationCidr (string) --

                The CIDR block used for destination matches.

              • State (string) --

                The state of the route.

              • RouteOrigin (string) --

                The route origin. The following are the possible values:

                • static
                • propagated
              • PrefixListId (string) --

                The ID of the prefix list.

              • AttachmentId (string) --

                The ID of the route attachment.

              • ResourceId (string) --

                The ID of the resource for the route attachment.

              • ResourceType (string) --

                The resource type for the route attachment.

            • TransitGatewayAttachment (dict) --

              The transit gateway attachment.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

        • AlternatePathHints (list) --

          Potential intermediate components.

          • (dict) --

            Describes an potential intermediate component of a feasible path.

            • ComponentId (string) --

              The ID of the component.

            • ComponentArn (string) --

              The Amazon Resource Name (ARN) of the component.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_network_insights_paths(**kwargs)

Describes one or more of your paths.

See also: AWS API Documentation

Request Syntax

response = client.describe_network_insights_paths(
    NetworkInsightsPathIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    DryRun=True|False,
    NextToken='string'
)
Parameters
  • NetworkInsightsPathIds (list) --

    The IDs of the paths.

    • (string) --
  • Filters (list) --

    The filters. The following are the possible values:

    • Destination - The ID of the resource.
    • DestinationPort - The destination port.
    • Name - The path name.
    • Protocol - The protocol.
    • Source - The ID of the resource.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsPaths': [
        {
            'NetworkInsightsPathId': 'string',
            'NetworkInsightsPathArn': 'string',
            'CreatedDate': datetime(2015, 1, 1),
            'Source': 'string',
            'Destination': 'string',
            'SourceIp': 'string',
            'DestinationIp': 'string',
            'Protocol': 'tcp'|'udp',
            'DestinationPort': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsPaths (list) --

      Information about the paths.

      • (dict) --

        Describes a path.

        • NetworkInsightsPathId (string) --

          The ID of the path.

        • NetworkInsightsPathArn (string) --

          The Amazon Resource Name (ARN) of the path.

        • CreatedDate (datetime) --

          The time stamp when the path was created.

        • Source (string) --

          The Amazon Web Services resource that is the source of the path.

        • Destination (string) --

          The Amazon Web Services resource that is the destination of the path.

        • SourceIp (string) --

          The IP address of the Amazon Web Services resource that is the source of the path.

        • DestinationIp (string) --

          The IP address of the Amazon Web Services resource that is the destination of the path.

        • Protocol (string) --

          The protocol.

        • DestinationPort (integer) --

          The destination port.

        • Tags (list) --

          The tags associated with the path.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_network_interface_attribute(**kwargs)

Describes a network interface attribute. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = client.describe_network_interface_attribute(
    Attribute='description'|'groupSet'|'sourceDestCheck'|'attachment',
    DryRun=True|False,
    NetworkInterfaceId='string'
)
Parameters
  • Attribute (string) -- The attribute of the network interface. This parameter is required.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

Return type

dict

Returns

Response Syntax

{
    'Attachment': {
        'AttachTime': datetime(2015, 1, 1),
        'AttachmentId': 'string',
        'DeleteOnTermination': True|False,
        'DeviceIndex': 123,
        'NetworkCardIndex': 123,
        'InstanceId': 'string',
        'InstanceOwnerId': 'string',
        'Status': 'attaching'|'attached'|'detaching'|'detached'
    },
    'Description': {
        'Value': 'string'
    },
    'Groups': [
        {
            'GroupName': 'string',
            'GroupId': 'string'
        },
    ],
    'NetworkInterfaceId': 'string',
    'SourceDestCheck': {
        'Value': True|False
    }
}

Response Structure

  • (dict) --

    Contains the output of DescribeNetworkInterfaceAttribute.

    • Attachment (dict) --

      The attachment (if any) of the network interface.

      • AttachTime (datetime) --

        The timestamp indicating when the attachment initiated.

      • AttachmentId (string) --

        The ID of the network interface attachment.

      • DeleteOnTermination (boolean) --

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

      • DeviceIndex (integer) --

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

      • NetworkCardIndex (integer) --

        The index of the network card.

      • InstanceId (string) --

        The ID of the instance.

      • InstanceOwnerId (string) --

        The Amazon Web Services account ID of the owner of the instance.

      • Status (string) --

        The attachment state.

    • Description (dict) --

      The description of the network interface.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • Groups (list) --

      The security groups associated with the network interface.

      • (dict) --

        Describes a security group.

        • GroupName (string) --

          The name of the security group.

        • GroupId (string) --

          The ID of the security group.

    • NetworkInterfaceId (string) --

      The ID of the network interface.

    • SourceDestCheck (dict) --

      Indicates whether source/destination checking is enabled.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

Examples

This example describes the attachment attribute of the specified network interface.

response = client.describe_network_interface_attribute(
    Attribute='attachment',
    NetworkInterfaceId='eni-686ea200',
)

print(response)

Expected Output:

{
    'Attachment': {
        'AttachTime': datetime(2015, 5, 21, 20, 2, 20, 3, 141, 0),
        'AttachmentId': 'eni-attach-43348162',
        'DeleteOnTermination': True,
        'DeviceIndex': 0,
        'InstanceId': 'i-1234567890abcdef0',
        'InstanceOwnerId': '123456789012',
        'Status': 'attached',
    },
    'NetworkInterfaceId': 'eni-686ea200',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the description attribute of the specified network interface.

response = client.describe_network_interface_attribute(
    Attribute='description',
    NetworkInterfaceId='eni-686ea200',
)

print(response)

Expected Output:

{
    'Description': {
        'Value': 'My description',
    },
    'NetworkInterfaceId': 'eni-686ea200',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the groupSet attribute of the specified network interface.

response = client.describe_network_interface_attribute(
    Attribute='groupSet',
    NetworkInterfaceId='eni-686ea200',
)

print(response)

Expected Output:

{
    'Groups': [
        {
            'GroupId': 'sg-903004f8',
            'GroupName': 'my-security-group',
        },
    ],
    'NetworkInterfaceId': 'eni-686ea200',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the sourceDestCheck attribute of the specified network interface.

response = client.describe_network_interface_attribute(
    Attribute='sourceDestCheck',
    NetworkInterfaceId='eni-686ea200',
)

print(response)

Expected Output:

{
    'NetworkInterfaceId': 'eni-686ea200',
    'SourceDestCheck': {
        'Value': True,
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_network_interface_permissions(**kwargs)

Describes the permissions for your network interfaces.

See also: AWS API Documentation

Request Syntax

response = client.describe_network_interface_permissions(
    NetworkInterfacePermissionIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • NetworkInterfacePermissionIds (list) --

    One or more network interface permission IDs.

    • (string) --
  • Filters (list) --

    One or more filters.

    • network-interface-permission.network-interface-permission-id - The ID of the permission.
    • network-interface-permission.network-interface-id - The ID of the network interface.
    • network-interface-permission.aws-account-id - The Amazon Web Services account ID.
    • network-interface-permission.aws-service - The Amazon Web Service.
    • network-interface-permission.permission - The type of permission (INSTANCE-ATTACH | EIP-ASSOCIATE ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NextToken (string) -- The token to request the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. If this parameter is not specified, up to 50 results are returned by default.
Return type

dict

Returns

Response Syntax

{
    'NetworkInterfacePermissions': [
        {
            'NetworkInterfacePermissionId': 'string',
            'NetworkInterfaceId': 'string',
            'AwsAccountId': 'string',
            'AwsService': 'string',
            'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE',
            'PermissionState': {
                'State': 'pending'|'granted'|'revoking'|'revoked',
                'StatusMessage': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output for DescribeNetworkInterfacePermissions.

    • NetworkInterfacePermissions (list) --

      The network interface permissions.

      • (dict) --

        Describes a permission for a network interface.

        • NetworkInterfacePermissionId (string) --

          The ID of the network interface permission.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • AwsAccountId (string) --

          The Amazon Web Services account ID.

        • AwsService (string) --

          The Amazon Web Service.

        • Permission (string) --

          The type of permission.

        • PermissionState (dict) --

          Information about the state of the permission.

          • State (string) --

            The state of the permission.

          • StatusMessage (string) --

            A status message, if applicable.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

describe_network_interfaces(**kwargs)

Describes one or more of your network interfaces.

See also: AWS API Documentation

Request Syntax

response = client.describe_network_interfaces(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkInterfaceIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • addresses.private-ip-address - The private IPv4 addresses associated with the network interface.
    • addresses.primary - Whether the private IPv4 address is the primary IP address associated with the network interface.
    • addresses.association.public-ip - The association ID returned when the network interface was associated with the Elastic IP address (IPv4).
    • addresses.association.owner-id - The owner ID of the addresses associated with the network interface.
    • association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • association.public-dns-name - The public DNS name for the network interface (IPv4).
    • attachment.attachment-id - The ID of the interface attachment.
    • attachment.attach-time - The time that the network interface was attached to an instance.
    • attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.
    • attachment.device-index - The device index to which the network interface is attached.
    • attachment.instance-id - The ID of the instance to which the network interface is attached.
    • attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.
    • attachment.status - The status of the attachment (attaching | attached | detaching | detached ).
    • availability-zone - The Availability Zone of the network interface.
    • description - The description of the network interface.
    • group-id - The ID of a security group associated with the network interface.
    • group-name - The name of a security group associated with the network interface.
    • ipv6-addresses.ipv6-address - An IPv6 address associated with the network interface.
    • interface-type - The type of network interface (api_gateway_managed | aws_codestar_connections_managed | branch | efa | gateway_load_balancer | gateway_load_balancer_endpoint | global_accelerator_managed | interface | iot_rules_managed | lambda | load_balancer | nat_gateway | network_load_balancer | quicksight | transit_gateway | trunk | vpc_endpoint ).
    • mac-address - The MAC address of the network interface.
    • network-interface-id - The ID of the network interface.
    • owner-id - The Amazon Web Services account ID of the network interface owner.
    • private-ip-address - The private IPv4 address or addresses of the network interface.
    • private-dns-name - The private DNS name of the network interface (IPv4).
    • requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.
    • requester-managed - Indicates whether the network interface is being managed by an Amazon Web Service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).
    • source-dest-check - Indicates 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.
    • status - The status of the network interface. If the network interface is not attached to an instance, the status is available ; if a network interface is attached to an instance the status is in-use .
    • subnet-id - The ID of the subnet for the network interface.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the network interface.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceIds (list) --

    One or more network interface IDs.

    Default: Describes all your network interfaces.

    • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. You cannot specify this parameter and the network interface IDs parameter in the same request.
Return type

dict

Returns

Response Syntax

{
    'NetworkInterfaces': [
        {
            'Association': {
                'AllocationId': 'string',
                'AssociationId': 'string',
                'IpOwnerId': 'string',
                'PublicDnsName': 'string',
                'PublicIp': 'string',
                'CustomerOwnedIp': 'string',
                'CarrierIp': 'string'
            },
            'Attachment': {
                'AttachTime': datetime(2015, 1, 1),
                'AttachmentId': 'string',
                'DeleteOnTermination': True|False,
                'DeviceIndex': 123,
                'NetworkCardIndex': 123,
                'InstanceId': 'string',
                'InstanceOwnerId': 'string',
                'Status': 'attaching'|'attached'|'detaching'|'detached'
            },
            'AvailabilityZone': 'string',
            'Description': 'string',
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'InterfaceType': 'interface'|'natGateway'|'efa'|'trunk'|'load_balancer'|'network_load_balancer'|'vpc_endpoint'|'branch'|'transit_gateway'|'lambda'|'quicksight'|'global_accelerator_managed'|'api_gateway_managed'|'gateway_load_balancer'|'gateway_load_balancer_endpoint'|'iot_rules_managed'|'aws_codestar_connections_managed',
            'Ipv6Addresses': [
                {
                    'Ipv6Address': 'string'
                },
            ],
            'MacAddress': 'string',
            'NetworkInterfaceId': 'string',
            'OutpostArn': 'string',
            'OwnerId': 'string',
            'PrivateDnsName': 'string',
            'PrivateIpAddress': 'string',
            'PrivateIpAddresses': [
                {
                    'Association': {
                        'AllocationId': 'string',
                        'AssociationId': 'string',
                        'IpOwnerId': 'string',
                        'PublicDnsName': 'string',
                        'PublicIp': 'string',
                        'CustomerOwnedIp': 'string',
                        'CarrierIp': 'string'
                    },
                    'Primary': True|False,
                    'PrivateDnsName': 'string',
                    'PrivateIpAddress': 'string'
                },
            ],
            'Ipv4Prefixes': [
                {
                    'Ipv4Prefix': 'string'
                },
            ],
            'Ipv6Prefixes': [
                {
                    'Ipv6Prefix': 'string'
                },
            ],
            'RequesterId': 'string',
            'RequesterManaged': True|False,
            'SourceDestCheck': True|False,
            'Status': 'available'|'associated'|'attaching'|'in-use'|'detaching',
            'SubnetId': 'string',
            'TagSet': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'DenyAllIgwTraffic': True|False,
            'Ipv6Native': True|False,
            'Ipv6Address': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeNetworkInterfaces.

    • NetworkInterfaces (list) --

      Information about one or more network interfaces.

      • (dict) --

        Describes a network interface.

        • Association (dict) --

          The association information for an Elastic IP address (IPv4) associated with the network interface.

          • AllocationId (string) --

            The allocation ID.

          • AssociationId (string) --

            The association ID.

          • IpOwnerId (string) --

            The ID of the Elastic IP address owner.

          • PublicDnsName (string) --

            The public DNS name.

          • PublicIp (string) --

            The address of the Elastic IP address bound to the network interface.

          • CustomerOwnedIp (string) --

            The customer-owned IP address associated with the network interface.

          • CarrierIp (string) --

            The carrier IP address associated with the network interface.

            This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

        • Attachment (dict) --

          The network interface attachment.

          • AttachTime (datetime) --

            The timestamp indicating when the attachment initiated.

          • AttachmentId (string) --

            The ID of the network interface attachment.

          • DeleteOnTermination (boolean) --

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

          • DeviceIndex (integer) --

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

          • NetworkCardIndex (integer) --

            The index of the network card.

          • InstanceId (string) --

            The ID of the instance.

          • InstanceOwnerId (string) --

            The Amazon Web Services account ID of the owner of the instance.

          • Status (string) --

            The attachment state.

        • AvailabilityZone (string) --

          The Availability Zone.

        • Description (string) --

          A description.

        • Groups (list) --

          Any security groups for the network interface.

          • (dict) --

            Describes a security group.

            • GroupName (string) --

              The name of the security group.

            • GroupId (string) --

              The ID of the security group.

        • InterfaceType (string) --

          The type of network interface.

        • Ipv6Addresses (list) --

          The IPv6 addresses associated with the network interface.

          • (dict) --

            Describes an IPv6 address associated with a network interface.

            • Ipv6Address (string) --

              The IPv6 address.

        • MacAddress (string) --

          The MAC address.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the network interface.

        • PrivateDnsName (string) --

          The private DNS name.

        • PrivateIpAddress (string) --

          The IPv4 address of the network interface within the subnet.

        • PrivateIpAddresses (list) --

          The private IPv4 addresses associated with the network interface.

          • (dict) --

            Describes the private IPv4 address of a network interface.

            • Association (dict) --

              The association information for an Elastic IP address (IPv4) associated with the network interface.

              • AllocationId (string) --

                The allocation ID.

              • AssociationId (string) --

                The association ID.

              • IpOwnerId (string) --

                The ID of the Elastic IP address owner.

              • PublicDnsName (string) --

                The public DNS name.

              • PublicIp (string) --

                The address of the Elastic IP address bound to the network interface.

              • CustomerOwnedIp (string) --

                The customer-owned IP address associated with the network interface.

              • CarrierIp (string) --

                The carrier IP address associated with the network interface.

                This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

            • Primary (boolean) --

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

            • PrivateDnsName (string) --

              The private DNS name.

            • PrivateIpAddress (string) --

              The private IPv4 address.

        • Ipv4Prefixes (list) --

          The IPv4 prefixes that are assigned to the network interface.

        • Ipv6Prefixes (list) --

          The IPv6 prefixes that are assigned to the network interface.

          • (dict) --

            Describes the IPv6 prefix.

            • Ipv6Prefix (string) --

              The IPv6 prefix.

        • RequesterId (string) --

          The alias or Amazon Web Services account ID of the principal or service that created the network interface.

        • RequesterManaged (boolean) --

          Indicates whether the network interface is being managed by Amazon Web Services.

        • SourceDestCheck (boolean) --

          Indicates whether source/destination checking is enabled.

        • Status (string) --

          The status of the network interface.

        • SubnetId (string) --

          The ID of the subnet.

        • TagSet (list) --

          Any tags assigned to the network interface.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VpcId (string) --

          The ID of the VPC.

        • DenyAllIgwTraffic (boolean) --

          Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true , inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.

        • Ipv6Native (boolean) --

          Indicates whether this is an IPv6 only network interface.

        • Ipv6Address (string) --

          The IPv6 globally unique address associated with the network interface.

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

Examples

response = client.describe_network_interfaces(
    NetworkInterfaceIds=[
        'eni-e5aa89a3',
    ],
)

print(response)

Expected Output:

{
    'NetworkInterfaces': [
        {
            'Association': {
                'AssociationId': 'eipassoc-0fbb766a',
                'IpOwnerId': '123456789012',
                'PublicDnsName': 'ec2-203-0-113-12.compute-1.amazonaws.com',
                'PublicIp': '203.0.113.12',
            },
            'Attachment': {
                'AttachTime': datetime(2013, 11, 30, 23, 36, 42, 5, 334, 0),
                'AttachmentId': 'eni-attach-66c4350a',
                'DeleteOnTermination': False,
                'DeviceIndex': 1,
                'InstanceId': 'i-1234567890abcdef0',
                'InstanceOwnerId': '123456789012',
                'Status': 'attached',
            },
            'AvailabilityZone': 'us-east-1d',
            'Description': 'my network interface',
            'Groups': [
                {
                    'GroupId': 'sg-8637d3e3',
                    'GroupName': 'default',
                },
            ],
            'MacAddress': '02:2f:8f:b0:cf:75',
            'NetworkInterfaceId': 'eni-e5aa89a3',
            'OwnerId': '123456789012',
            'PrivateDnsName': 'ip-10-0-1-17.ec2.internal',
            'PrivateIpAddress': '10.0.1.17',
            'PrivateIpAddresses': [
                {
                    'Association': {
                        'AssociationId': 'eipassoc-0fbb766a',
                        'IpOwnerId': '123456789012',
                        'PublicDnsName': 'ec2-203-0-113-12.compute-1.amazonaws.com',
                        'PublicIp': '203.0.113.12',
                    },
                    'Primary': True,
                    'PrivateDnsName': 'ip-10-0-1-17.ec2.internal',
                    'PrivateIpAddress': '10.0.1.17',
                },
            ],
            'RequesterManaged': False,
            'SourceDestCheck': True,
            'Status': 'in-use',
            'SubnetId': 'subnet-b61f49f0',
            'TagSet': [
            ],
            'VpcId': 'vpc-a01106c2',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_placement_groups(**kwargs)

Describes the specified placement groups or all of your placement groups. For more information, see Placement groups in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_placement_groups(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    GroupNames=[
        'string',
    ],
    GroupIds=[
        'string',
    ]
)
Parameters
  • Filters (list) --

    The filters.

    • group-name - The name of the placement group.
    • group-arn - The Amazon Resource Name (ARN) of the placement group.
    • spread-level - The spread level for the placement group (host | rack ).
    • state - The state of the placement group (pending | available | deleting | deleted ).
    • strategy - The strategy of the placement group (cluster | spread | partition ).
    • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupNames (list) --

    The names of the placement groups.

    Default: Describes all your placement groups, or only those otherwise specified.

    • (string) --
  • GroupIds (list) --

    The IDs of the placement groups.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'PlacementGroups': [
        {
            'GroupName': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'Strategy': 'cluster'|'spread'|'partition',
            'PartitionCount': 123,
            'GroupId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'GroupArn': 'string',
            'SpreadLevel': 'host'|'rack'
        },
    ]
}

Response Structure

  • (dict) --

    • PlacementGroups (list) --

      Information about the placement groups.

      • (dict) --

        Describes a placement group.

        • GroupName (string) --

          The name of the placement group.

        • State (string) --

          The state of the placement group.

        • Strategy (string) --

          The placement strategy.

        • PartitionCount (integer) --

          The number of partitions. Valid only if strategy is set to partition .

        • GroupId (string) --

          The ID of the placement group.

        • Tags (list) --

          Any tags applied to the placement 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 256 Unicode characters.

        • GroupArn (string) --

          The Amazon Resource Name (ARN) of the placement group.

        • SpreadLevel (string) --

          The spread level for the placement group. Only Outpost placement groups can be spread across hosts.

describe_prefix_lists(**kwargs)

Describes available Amazon Web Services services in a prefix list format, which includes the prefix list name and prefix list ID of the service and the IP address range for the service.

We recommend that you use DescribeManagedPrefixLists instead.

See also: AWS API Documentation

Request Syntax

response = client.describe_prefix_lists(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    PrefixListIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • prefix-list-id : The ID of a prefix list.
    • prefix-list-name : The name of a prefix list.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • PrefixListIds (list) --

    One or more prefix list IDs.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'PrefixLists': [
        {
            'Cidrs': [
                'string',
            ],
            'PrefixListId': 'string',
            'PrefixListName': 'string'
        },
    ]
}

Response Structure

  • (dict) --

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

    • PrefixLists (list) --

      All available prefix lists.

      • (dict) --

        Describes prefixes for Amazon Web Services services.

        • Cidrs (list) --

          The IP address range of the Amazon Web Service.

          • (string) --
        • PrefixListId (string) --

          The ID of the prefix.

        • PrefixListName (string) --

          The name of the prefix.

describe_principal_id_format(**kwargs)

Describes the ID format settings for the root user and all IAM roles and IAM users that have explicitly specified a longer ID (17-character ID) preference.

By default, all IAM roles and IAM users default to the same ID settings as the root user, unless they explicitly override the settings. This request is useful for identifying those IAM users and IAM roles that have overridden the default ID settings.

The following resource types support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

See also: AWS API Documentation

Request Syntax

response = client.describe_principal_id_format(
    DryRun=True|False,
    Resources=[
        'string',
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Resources (list) --

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value.
  • NextToken (string) -- The token to request the next page of results.
Return type

dict

Returns

Response Syntax

{
    'Principals': [
        {
            'Arn': 'string',
            'Statuses': [
                {
                    'Deadline': datetime(2015, 1, 1),
                    'Resource': 'string',
                    'UseLongIds': True|False
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Principals (list) --

      Information about the ID format settings for the ARN.

      • (dict) --

        PrincipalIdFormat description

        • Arn (string) --

          PrincipalIdFormatARN description

        • Statuses (list) --

          PrincipalIdFormatStatuses description

          • (dict) --

            Describes the ID format for a resource.

            • Deadline (datetime) --

              The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

            • Resource (string) --

              The type of resource.

            • UseLongIds (boolean) --

              Indicates whether longer IDs (17-character IDs) are enabled for the resource.

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

describe_public_ipv4_pools(**kwargs)

Describes the specified IPv4 address pools.

See also: AWS API Documentation

Request Syntax

response = client.describe_public_ipv4_pools(
    PoolIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
Parameters
  • PoolIds (list) --

    The IDs of the address pools.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • Filters (list) --

    One or more filters.

    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
Return type

dict

Returns

Response Syntax

{
    'PublicIpv4Pools': [
        {
            'PoolId': 'string',
            'Description': 'string',
            'PoolAddressRanges': [
                {
                    'FirstAddress': 'string',
                    'LastAddress': 'string',
                    'AddressCount': 123,
                    'AvailableAddressCount': 123
                },
            ],
            'TotalAddressCount': 123,
            'TotalAvailableAddressCount': 123,
            'NetworkBorderGroup': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PublicIpv4Pools (list) --

      Information about the address pools.

      • (dict) --

        Describes an IPv4 address pool.

        • PoolId (string) --

          The ID of the address pool.

        • Description (string) --

          A description of the address pool.

        • PoolAddressRanges (list) --

          The address ranges.

          • (dict) --

            Describes an address range of an IPv4 address pool.

            • FirstAddress (string) --

              The first IP address in the range.

            • LastAddress (string) --

              The last IP address in the range.

            • AddressCount (integer) --

              The number of addresses in the range.

            • AvailableAddressCount (integer) --

              The number of available addresses in the range.

        • TotalAddressCount (integer) --

          The total number of addresses.

        • TotalAvailableAddressCount (integer) --

          The total number of available addresses.

        • NetworkBorderGroup (string) --

          The name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.

        • Tags (list) --

          Any tags for the address pool.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_regions(**kwargs)

Describes the Regions that are enabled for your account, or all Regions.

For a list of the Regions supported by Amazon EC2, see Amazon Elastic Compute Cloud endpoints and quotas .

For information about enabling and disabling Regions for your account, see Managing Amazon Web Services Regions in the Amazon Web Services General Reference .

See also: AWS API Documentation

Request Syntax

response = client.describe_regions(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    RegionNames=[
        'string',
    ],
    DryRun=True|False,
    AllRegions=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • endpoint - The endpoint of the Region (for example, ec2.us-east-1.amazonaws.com ).
    • opt-in-status - The opt-in status of the Region (opt-in-not-required | opted-in | not-opted-in ).
    • region-name - The name of the Region (for example, us-east-1 ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • RegionNames (list) --

    The names of the Regions. You can specify any Regions, whether they are enabled and disabled for your account.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • AllRegions (boolean) -- Indicates whether to display all Regions, including Regions that are disabled for your account.
Return type

dict

Returns

Response Syntax

{
    'Regions': [
        {
            'Endpoint': 'string',
            'RegionName': 'string',
            'OptInStatus': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Regions (list) --

      Information about the Regions.

      • (dict) --

        Describes a Region.

        • Endpoint (string) --

          The Region service endpoint.

        • RegionName (string) --

          The name of the Region.

        • OptInStatus (string) --

          The Region opt-in status. The possible values are opt-in-not-required , opted-in , and not-opted-in .

Examples

This example describes all the regions that are available to you.

response = client.describe_regions(
)

print(response)

Expected Output:

{
    'Regions': [
        {
            'Endpoint': 'ec2.ap-south-1.amazonaws.com',
            'RegionName': 'ap-south-1',
        },
        {
            'Endpoint': 'ec2.eu-west-1.amazonaws.com',
            'RegionName': 'eu-west-1',
        },
        {
            'Endpoint': 'ec2.ap-southeast-1.amazonaws.com',
            'RegionName': 'ap-southeast-1',
        },
        {
            'Endpoint': 'ec2.ap-southeast-2.amazonaws.com',
            'RegionName': 'ap-southeast-2',
        },
        {
            'Endpoint': 'ec2.eu-central-1.amazonaws.com',
            'RegionName': 'eu-central-1',
        },
        {
            'Endpoint': 'ec2.ap-northeast-2.amazonaws.com',
            'RegionName': 'ap-northeast-2',
        },
        {
            'Endpoint': 'ec2.ap-northeast-1.amazonaws.com',
            'RegionName': 'ap-northeast-1',
        },
        {
            'Endpoint': 'ec2.us-east-1.amazonaws.com',
            'RegionName': 'us-east-1',
        },
        {
            'Endpoint': 'ec2.sa-east-1.amazonaws.com',
            'RegionName': 'sa-east-1',
        },
        {
            'Endpoint': 'ec2.us-west-1.amazonaws.com',
            'RegionName': 'us-west-1',
        },
        {
            'Endpoint': 'ec2.us-west-2.amazonaws.com',
            'RegionName': 'us-west-2',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_replace_root_volume_tasks(**kwargs)

Describes a root volume replacement task. For more information, see Replace a root volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_replace_root_volume_tasks(
    ReplaceRootVolumeTaskIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • ReplaceRootVolumeTaskIds (list) --

    The ID of the root volume replacement task to view.

    • (string) --
  • Filters (list) --

    Filter to use:

    • instance-id - The ID of the instance for which the root volume replacement task was created.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ReplaceRootVolumeTasks': [
        {
            'ReplaceRootVolumeTaskId': 'string',
            'InstanceId': 'string',
            'TaskState': 'pending'|'in-progress'|'failing'|'succeeded'|'failed'|'failed-detached',
            'StartTime': 'string',
            'CompleteTime': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ReplaceRootVolumeTasks (list) --

      Information about the root volume replacement task.

      • (dict) --

        Information about a root volume replacement task.

        • ReplaceRootVolumeTaskId (string) --

          The ID of the root volume replacement task.

        • InstanceId (string) --

          The ID of the instance for which the root volume replacement task was created.

        • TaskState (string) --

          The state of the task. The task can be in one of the following states:

          • pending - the replacement volume is being created.
          • in-progress - the original volume is being detached and the replacement volume is being attached.
          • succeeded - the replacement volume has been successfully attached to the instance and the instance is available.
          • failing - the replacement task is in the process of failing.
          • failed - the replacement task has failed but the original root volume is still attached.
          • failing-detached - the replacement task is in the process of failing. The instance might have no root volume attached.
          • failed-detached - the replacement task has failed and the instance has no root volume attached.
        • StartTime (string) --

          The time the task was started.

        • CompleteTime (string) --

          The time the task completed.

        • Tags (list) --

          The 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 256 Unicode characters.

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

describe_reserved_instances(**kwargs)

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

For more information about Reserved Instances, see Reserved Instances in the Amazon EC2 User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_reserved_instances(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    OfferingClass='standard'|'convertible',
    ReservedInstancesIds=[
        'string',
    ],
    DryRun=True|False,
    OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront'
)
Parameters
  • Filters (list) --

    One or more filters.

    • availability-zone - The Availability Zone where the Reserved Instance can be used.
    • duration - The duration of the Reserved Instance (one year or three years), in seconds (31536000 | 94608000 ).
    • end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z).
    • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).
    • instance-type - The instance type that is covered by the reservation.
    • scope - The scope of the Reserved Instance (Region or Availability Zone ).
    • 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) | Red Hat Enterprise Linux with HA (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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • OfferingClass (string) -- Describes whether the Reserved Instance is Standard or Convertible.
  • ReservedInstancesIds (list) --

    One or more Reserved Instance IDs.

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

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • OfferingType (string) -- The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.
Return type

dict

Returns

Response Syntax

{
    'ReservedInstances': [
        {
            'AvailabilityZone': 'string',
            'Duration': 123,
            'End': datetime(2015, 1, 1),
            'FixedPrice': ...,
            'InstanceCount': 123,
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'ReservedInstancesId': 'string',
            'Start': datetime(2015, 1, 1),
            'State': 'payment-pending'|'active'|'payment-failed'|'retired'|'queued'|'queued-deleted',
            'UsagePrice': ...,
            'CurrencyCode': 'USD',
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'OfferingClass': 'standard'|'convertible',
            'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
            'RecurringCharges': [
                {
                    'Amount': 123.0,
                    'Frequency': 'Hourly'
                },
            ],
            'Scope': 'Availability Zone'|'Region',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output for DescribeReservedInstances.

    • ReservedInstances (list) --

      A list of Reserved Instances.

      • (dict) --

        Describes a Reserved Instance.

        • AvailabilityZone (string) --

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

        • Duration (integer) --

          The duration of the Reserved Instance, in seconds.

        • End (datetime) --

          The time when the Reserved Instance expires.

        • FixedPrice (float) --

          The purchase price of the Reserved Instance.

        • InstanceCount (integer) --

          The number of reservations purchased.

        • InstanceType (string) --

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

        • ProductDescription (string) --

          The Reserved Instance product platform description.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

        • Start (datetime) --

          The date and time the Reserved Instance started.

        • State (string) --

          The state of the Reserved Instance purchase.

        • UsagePrice (float) --

          The usage price of the Reserved Instance, per hour.

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

        • InstanceTenancy (string) --

          The tenancy of the instance.

        • OfferingClass (string) --

          The offering class of the Reserved Instance.

        • OfferingType (string) --

          The Reserved Instance offering type.

        • RecurringCharges (list) --

          The recurring charge tag assigned to the resource.

          • (dict) --

            Describes a recurring charge.

            • Amount (float) --

              The amount of the recurring charge.

            • Frequency (string) --

              The frequency of the recurring charge.

        • Scope (string) --

          The scope of the Reserved Instance.

        • Tags (list) --

          Any tags assigned to the resource.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

describe_reserved_instances_listings(**kwargs)

Describes your account's Reserved Instance listings in the Reserved Instance Marketplace.

The Reserved Instance Marketplace matches sellers who want to resell Reserved Instance capacity that they no longer need with buyers who want to purchase additional capacity. Reserved Instances bought and sold through the Reserved Instance Marketplace work like any other Reserved Instances.

As a seller, you choose to list some or all of your Reserved Instances, and you specify the upfront price to receive for them. Your Reserved Instances are then listed in the Reserved Instance Marketplace and are available for purchase.

As a buyer, you specify the configuration of the Reserved Instance to purchase, and the Marketplace matches what you're searching for with what's available. The Marketplace first sells the lowest priced Reserved Instances to you, and continues to sell available Reserved Instance listings to you until your demand is met. You are charged based on the total price of all of the listings that you purchase.

For more information, see Reserved Instance Marketplace in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_reserved_instances_listings(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ReservedInstancesId='string',
    ReservedInstancesListingId='string'
)
Parameters
  • Filters (list) --

    One or more filters.

    • reserved-instances-id - The ID of the Reserved Instances.
    • reserved-instances-listing-id - The ID of the Reserved Instances listing.
    • status - The status of the Reserved Instance listing (pending | active | cancelled | closed ).
    • status-message - The reason for the status.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ReservedInstancesId (string) -- One or more Reserved Instance IDs.
  • ReservedInstancesListingId (string) -- One or more Reserved Instance listing IDs.
Return type

dict

Returns

Response Syntax

{
    'ReservedInstancesListings': [
        {
            'ClientToken': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'InstanceCounts': [
                {
                    'InstanceCount': 123,
                    'State': 'available'|'sold'|'cancelled'|'pending'
                },
            ],
            'PriceSchedules': [
                {
                    'Active': True|False,
                    'CurrencyCode': 'USD',
                    'Price': 123.0,
                    'Term': 123
                },
            ],
            'ReservedInstancesId': 'string',
            'ReservedInstancesListingId': 'string',
            'Status': 'active'|'pending'|'cancelled'|'closed',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'UpdateDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeReservedInstancesListings.

    • ReservedInstancesListings (list) --

      Information about the Reserved Instance listing.

      • (dict) --

        Describes a Reserved Instance listing.

        • ClientToken (string) --

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

        • CreateDate (datetime) --

          The time the listing was created.

        • InstanceCounts (list) --

          The number of instances in this state.

          • (dict) --

            Describes a Reserved Instance listing state.

            • InstanceCount (integer) --

              The number of listed Reserved Instances in the state specified by the state .

            • State (string) --

              The states of the listed Reserved Instances.

        • PriceSchedules (list) --

          The price of the Reserved Instance listing.

          • (dict) --

            Describes the price for a Reserved Instance.

            • Active (boolean) --

              The current price schedule, as determined by the term remaining for the Reserved Instance in the listing.

              A specific price schedule is always in effect, but only one price schedule can be active at any time. Take, for example, a Reserved Instance listing that has five months remaining in its term. When you specify price schedules for five months and two months, this means that schedule 1, covering the first three months of the remaining term, will be active during months 5, 4, and 3. Then schedule 2, covering the last two months of the term, will be active for months 2 and 1.

            • CurrencyCode (string) --

              The currency for transacting the Reserved Instance resale. At this time, the only supported currency is USD .

            • Price (float) --

              The fixed price for the term.

            • Term (integer) --

              The number of months remaining in the reservation. For example, 2 is the second to the last month before the capacity reservation expires.

        • ReservedInstancesId (string) --

          The ID of the Reserved Instance.

        • ReservedInstancesListingId (string) --

          The ID of the Reserved Instance listing.

        • Status (string) --

          The status of the Reserved Instance listing.

        • StatusMessage (string) --

          The reason for the current status of the Reserved Instance listing. The response can be blank.

        • 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 256 Unicode characters.

        • UpdateDate (datetime) --

          The last modified timestamp of the listing.

describe_reserved_instances_modifications(**kwargs)

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 EC2 User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_reserved_instances_modifications(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ReservedInstancesModificationIds=[
        'string',
    ],
    NextToken='string'
)
Parameters
  • Filters (list) --

    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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ReservedInstancesModificationIds (list) --

    IDs for the submitted modification request.

    • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'ReservedInstancesModifications': [
        {
            'ClientToken': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'EffectiveDate': datetime(2015, 1, 1),
            'ModificationResults': [
                {
                    'ReservedInstancesId': 'string',
                    'TargetConfiguration': {
                        'AvailabilityZone': 'string',
                        'InstanceCount': 123,
                        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                        'Platform': 'string',
                        'Scope': 'Availability Zone'|'Region'
                    }
                },
            ],
            'ReservedInstancesIds': [
                {
                    'ReservedInstancesId': 'string'
                },
            ],
            'ReservedInstancesModificationId': 'string',
            'Status': 'string',
            'StatusMessage': 'string',
            'UpdateDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeReservedInstancesModifications.

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

    • ReservedInstancesModifications (list) --

      The Reserved Instance modification information.

      • (dict) --

        Describes a Reserved Instance modification.

        • ClientToken (string) --

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

        • CreateDate (datetime) --

          The time when the modification request was created.

        • EffectiveDate (datetime) --

          The time for the modification to become effective.

        • ModificationResults (list) --

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

          • (dict) --

            Describes the modification request/s.

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

              • InstanceCount (integer) --

                The number of modified Reserved Instances.

                Note

                This is a required field for a request.

              • InstanceType (string) --

                The instance type for the modified Reserved Instances.

              • Platform (string) --

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

              • Scope (string) --

                Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.

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

        • ReservedInstancesModificationId (string) --

          A unique ID for the Reserved Instance modification.

        • Status (string) --

          The status of the Reserved Instances modification request.

        • StatusMessage (string) --

          The reason for the status.

        • UpdateDate (datetime) --

          The time when the modification request was last updated.

describe_reserved_instances_offerings(**kwargs)

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 EC2 User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_reserved_instances_offerings(
    AvailabilityZone='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    IncludeMarketplace=True|False,
    InstanceType='a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    MaxDuration=123,
    MaxInstanceCount=123,
    MinDuration=123,
    OfferingClass='standard'|'convertible',
    ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
    ReservedInstancesOfferingIds=[
        'string',
    ],
    DryRun=True|False,
    InstanceTenancy='default'|'dedicated'|'host',
    MaxResults=123,
    NextToken='string',
    OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront'
)
Parameters
  • AvailabilityZone (string) -- The Availability Zone in which the Reserved Instance can be used.
  • Filters (list) --

    One or more filters.

    • availability-zone - The Availability Zone where the Reserved Instance can be used.
    • duration - The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000 | 94608000 ).
    • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).
    • instance-type - The instance type 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 Amazon Web Services 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) | Red Hat Enterprise Linux with HA (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.
    • scope - The scope of the Reserved Instance (Availability Zone or Region ).
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • IncludeMarketplace (boolean) -- Include Reserved Instance Marketplace offerings in the response.
  • InstanceType (string) -- The instance type that the reservation will cover (for example, m1.small ). For more information, see Instance types in the Amazon EC2 User Guide .
  • MaxDuration (integer) --

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

    Default: 94608000 (3 years)

  • MaxInstanceCount (integer) --

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

    Default: 20

  • MinDuration (integer) --

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

    Default: 2592000 (1 month)

  • OfferingClass (string) -- The offering class of the Reserved Instance. Can be standard or convertible .
  • ProductDescription (string) -- The Reserved Instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.
  • ReservedInstancesOfferingIds (list) --

    One or more Reserved Instances offering IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTenancy (string) --

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

    Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

    Default: default

  • MaxResults (integer) --

    The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. The maximum is 100.

    Default: 100

  • NextToken (string) -- The token to retrieve the next page of results.
  • OfferingType (string) -- The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.
Return type

dict

Returns

Response Syntax

{
    'ReservedInstancesOfferings': [
        {
            'AvailabilityZone': 'string',
            'Duration': 123,
            'FixedPrice': ...,
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'ReservedInstancesOfferingId': 'string',
            'UsagePrice': ...,
            'CurrencyCode': 'USD',
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'Marketplace': True|False,
            'OfferingClass': 'standard'|'convertible',
            'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
            'PricingDetails': [
                {
                    'Count': 123,
                    'Price': 123.0
                },
            ],
            'RecurringCharges': [
                {
                    'Amount': 123.0,
                    'Frequency': 'Hourly'
                },
            ],
            'Scope': 'Availability Zone'|'Region'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeReservedInstancesOfferings.

    • ReservedInstancesOfferings (list) --

      A list of Reserved Instances offerings.

      • (dict) --

        Describes a Reserved Instance offering.

        • AvailabilityZone (string) --

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

        • Duration (integer) --

          The duration of the Reserved Instance, in seconds.

        • FixedPrice (float) --

          The purchase price of the Reserved Instance.

        • InstanceType (string) --

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

        • ProductDescription (string) --

          The Reserved Instance product platform description.

        • ReservedInstancesOfferingId (string) --

          The ID of the Reserved Instance offering. This is the offering ID used in GetReservedInstancesExchangeQuote to confirm that an exchange can be made.

        • UsagePrice (float) --

          The usage price of the Reserved Instance, per hour.

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

        • InstanceTenancy (string) --

          The tenancy of the instance.

        • Marketplace (boolean) --

          Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is true .

        • OfferingClass (string) --

          If convertible it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If standard , it is not possible to perform an exchange.

        • OfferingType (string) --

          The Reserved Instance offering type.

        • PricingDetails (list) --

          The pricing details of the Reserved Instance offering.

          • (dict) --

            Describes a Reserved Instance offering.

            • Count (integer) --

              The number of reservations available for the price.

            • Price (float) --

              The price per instance.

        • RecurringCharges (list) --

          The recurring charge tag assigned to the resource.

          • (dict) --

            Describes a recurring charge.

            • Amount (float) --

              The amount of the recurring charge.

            • Frequency (string) --

              The frequency of the recurring charge.

        • Scope (string) --

          Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.

    • NextToken (string) --

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

describe_route_tables(**kwargs)

Describes one or more of your route tables.

Each subnet in your VPC must be associated with a route table. If a subnet is not explicitly associated with any route table, it is implicitly associated with the main route table. This command does not return the subnet ID for implicit associations.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_route_tables(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    RouteTableIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • association.route-table-association-id - The ID of an association ID for the route table.
    • association.route-table-id - The ID of the route table involved in the association.
    • association.subnet-id - The ID of the subnet involved in the association.
    • association.main - Indicates whether the route table is the main route table for the VPC (true | false ). Route tables that do not have an association ID are not returned in the response.
    • owner-id - The ID of the Amazon Web Services account that owns the route table.
    • route-table-id - The ID of the route table.
    • route.destination-cidr-block - The IPv4 CIDR range specified in a route in the table.
    • route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in a route in the route table.
    • route.destination-prefix-list-id - The ID (prefix) of the Amazon Web Service specified in a route in the table.
    • route.egress-only-internet-gateway-id - The ID of an egress-only Internet gateway specified in a route in the route table.
    • route.gateway-id - The ID of a gateway specified in a route in the table.
    • route.instance-id - The ID of an instance specified in a route in the table.
    • route.nat-gateway-id - The ID of a NAT gateway.
    • route.transit-gateway-id - The ID of a transit gateway.
    • route.origin - Describes how the route was created. CreateRouteTable indicates that the route was automatically created when the route table was created; CreateRoute indicates that the route was manually added to the route table; EnableVgwRoutePropagation indicates that the route was propagated by route propagation.
    • route.state - The state of a route in the route table (active | blackhole ). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on).
    • route.vpc-peering-connection-id - The ID of a VPC peering connection specified in a route in the table.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the route table.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableIds (list) --

    One or more route table IDs.

    Default: Describes all your route tables.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'RouteTables': [
        {
            'Associations': [
                {
                    'Main': True|False,
                    'RouteTableAssociationId': 'string',
                    'RouteTableId': 'string',
                    'SubnetId': 'string',
                    'GatewayId': 'string',
                    'AssociationState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'PropagatingVgws': [
                {
                    'GatewayId': 'string'
                },
            ],
            'RouteTableId': 'string',
            'Routes': [
                {
                    'DestinationCidrBlock': 'string',
                    'DestinationIpv6CidrBlock': 'string',
                    'DestinationPrefixListId': 'string',
                    'EgressOnlyInternetGatewayId': 'string',
                    'GatewayId': 'string',
                    'InstanceId': 'string',
                    'InstanceOwnerId': 'string',
                    'NatGatewayId': 'string',
                    'TransitGatewayId': 'string',
                    'LocalGatewayId': 'string',
                    'CarrierGatewayId': 'string',
                    'NetworkInterfaceId': 'string',
                    'Origin': 'CreateRouteTable'|'CreateRoute'|'EnableVgwRoutePropagation',
                    'State': 'active'|'blackhole',
                    'VpcPeeringConnectionId': 'string',
                    'CoreNetworkArn': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'OwnerId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeRouteTables.

    • RouteTables (list) --

      Information about one or more route tables.

      • (dict) --

        Describes a route table.

        • Associations (list) --

          The associations between the route table and one or more subnets or a gateway.

          • (dict) --

            Describes an association between a route table and a subnet or gateway.

            • Main (boolean) --

              Indicates whether this is the main route table.

            • RouteTableAssociationId (string) --

              The ID of the association.

            • RouteTableId (string) --

              The ID of the route table.

            • SubnetId (string) --

              The ID of the subnet. A subnet ID is not returned for an implicit association.

            • GatewayId (string) --

              The ID of the internet gateway or virtual private gateway.

            • AssociationState (dict) --

              The state of the association.

              • State (string) --

                The state of the association.

              • StatusMessage (string) --

                The status message, if applicable.

        • PropagatingVgws (list) --

          Any virtual private gateway (VGW) propagating routes.

          • (dict) --

            Describes a virtual private gateway propagating route.

            • GatewayId (string) --

              The ID of the virtual private gateway.

        • RouteTableId (string) --

          The ID of the route table.

        • Routes (list) --

          The routes in the route table.

          • (dict) --

            Describes a route in a route table.

            • DestinationCidrBlock (string) --

              The IPv4 CIDR block used for the destination match.

            • DestinationIpv6CidrBlock (string) --

              The IPv6 CIDR block used for the destination match.

            • DestinationPrefixListId (string) --

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId (string) --

              The ID of the egress-only internet gateway.

            • GatewayId (string) --

              The ID of a gateway attached to your VPC.

            • InstanceId (string) --

              The ID of a NAT instance in your VPC.

            • InstanceOwnerId (string) --

              The ID of Amazon Web Services account that owns the instance.

            • NatGatewayId (string) --

              The ID of a NAT gateway.

            • TransitGatewayId (string) --

              The ID of a transit gateway.

            • LocalGatewayId (string) --

              The ID of the local gateway.

            • CarrierGatewayId (string) --

              The ID of the carrier gateway.

            • NetworkInterfaceId (string) --

              The ID of the network interface.

            • Origin (string) --

              Describes how the route was created.

              • CreateRouteTable - The route was automatically created when the route table was created.
              • CreateRoute - The route was manually added to the route table.
              • EnableVgwRoutePropagation - The route was propagated by route propagation.
            • State (string) --

              The state of the route. The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

            • VpcPeeringConnectionId (string) --

              The ID of a VPC peering connection.

            • CoreNetworkArn (string) --

              The Amazon Resource Name (ARN) of the core network.

        • Tags (list) --

          Any tags assigned to the route table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VpcId (string) --

          The ID of the VPC.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the route table.

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

Examples

This example describes the specified route table.

response = client.describe_route_tables(
    RouteTableIds=[
        'rtb-1f382e7d',
    ],
)

print(response)

Expected Output:

{
    'RouteTables': [
        {
            'Associations': [
                {
                    'Main': True,
                    'RouteTableAssociationId': 'rtbassoc-d8ccddba',
                    'RouteTableId': 'rtb-1f382e7d',
                },
            ],
            'PropagatingVgws': [
            ],
            'RouteTableId': 'rtb-1f382e7d',
            'Routes': [
                {
                    'DestinationCidrBlock': '10.0.0.0/16',
                    'GatewayId': 'local',
                    'State': 'active',
                },
            ],
            'Tags': [
            ],
            'VpcId': 'vpc-a01106c2',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_scheduled_instance_availability(**kwargs)

Finds available schedules that meet the specified criteria.

You can search for an available schedule no more than 3 months in advance. You must meet the minimum required duration of 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.

After you find a schedule that meets your needs, call PurchaseScheduledInstances to purchase Scheduled Instances with that schedule.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_scheduled_instance_availability(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    FirstSlotStartTimeRange={
        'EarliestTime': datetime(2015, 1, 1),
        'LatestTime': datetime(2015, 1, 1)
    },
    MaxResults=123,
    MaxSlotDurationInHours=123,
    MinSlotDurationInHours=123,
    NextToken='string',
    Recurrence={
        'Frequency': 'string',
        'Interval': 123,
        'OccurrenceDays': [
            123,
        ],
        'OccurrenceRelativeToEnd': True|False,
        'OccurrenceUnit': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone (for example, us-west-2a ).
    • instance-type - The instance type (for example, c4.large ).
    • network-platform - The network platform (EC2-Classic or EC2-VPC ).
    • platform - The platform (Linux/UNIX or Windows ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • FirstSlotStartTimeRange (dict) --

    [REQUIRED]

    The time period for the first schedule to start.

    • EarliestTime (datetime) -- [REQUIRED]

      The earliest date and time, in UTC, for the Scheduled Instance to start.

    • LatestTime (datetime) -- [REQUIRED]

      The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.

  • MaxResults (integer) -- The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 300. To retrieve the remaining results, make another call with the returned NextToken value.
  • MaxSlotDurationInHours (integer) -- The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720.
  • MinSlotDurationInHours (integer) -- The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.
  • NextToken (string) -- The token for the next set of results.
  • Recurrence (dict) --

    [REQUIRED]

    The schedule recurrence.

    • Frequency (string) --

      The frequency (Daily , Weekly , or Monthly ).

    • Interval (integer) --

      The interval quantity. The interval unit depends on the value of Frequency . For example, every 2 weeks or every 2 months.

    • OccurrenceDays (list) --

      The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.

      • (integer) --
    • OccurrenceRelativeToEnd (boolean) --

      Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.

    • OccurrenceUnit (string) --

      The unit for OccurrenceDays (DayOfWeek or DayOfMonth ). This value is required for a monthly schedule. You can't specify DayOfWeek with a weekly schedule. You can't specify this value with a daily schedule.

Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'ScheduledInstanceAvailabilitySet': [
        {
            'AvailabilityZone': 'string',
            'AvailableInstanceCount': 123,
            'FirstSlotStartTime': datetime(2015, 1, 1),
            'HourlyPrice': 'string',
            'InstanceType': 'string',
            'MaxTermDurationInDays': 123,
            'MinTermDurationInDays': 123,
            'NetworkPlatform': 'string',
            'Platform': 'string',
            'PurchaseToken': 'string',
            'Recurrence': {
                'Frequency': 'string',
                'Interval': 123,
                'OccurrenceDaySet': [
                    123,
                ],
                'OccurrenceRelativeToEnd': True|False,
                'OccurrenceUnit': 'string'
            },
            'SlotDurationInHours': 123,
            'TotalScheduledInstanceHours': 123
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeScheduledInstanceAvailability.

    • NextToken (string) --

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

    • ScheduledInstanceAvailabilitySet (list) --

      Information about the available Scheduled Instances.

      • (dict) --

        Describes a schedule that is available for your Scheduled Instances.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        • AvailabilityZone (string) --

          The Availability Zone.

        • AvailableInstanceCount (integer) --

          The number of available instances.

        • FirstSlotStartTime (datetime) --

          The time period for the first schedule to start.

        • HourlyPrice (string) --

          The hourly price for a single instance.

        • InstanceType (string) --

          The instance type. You can specify one of the C3, C4, M4, or R3 instance types.

        • MaxTermDurationInDays (integer) --

          The maximum term. The only possible value is 365 days.

        • MinTermDurationInDays (integer) --

          The minimum term. The only possible value is 365 days.

        • NetworkPlatform (string) --

          The network platform (EC2-Classic or EC2-VPC ).

        • Platform (string) --

          The platform (Linux/UNIX or Windows ).

        • PurchaseToken (string) --

          The purchase token. This token expires in two hours.

        • Recurrence (dict) --

          The schedule recurrence.

          • Frequency (string) --

            The frequency (Daily , Weekly , or Monthly ).

          • Interval (integer) --

            The interval quantity. The interval unit depends on the value of frequency . For example, every 2 weeks or every 2 months.

          • OccurrenceDaySet (list) --

            The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

            • (integer) --
          • OccurrenceRelativeToEnd (boolean) --

            Indicates whether the occurrence is relative to the end of the specified week or month.

          • OccurrenceUnit (string) --

            The unit for occurrenceDaySet (DayOfWeek or DayOfMonth ).

        • SlotDurationInHours (integer) --

          The number of hours in the schedule.

        • TotalScheduledInstanceHours (integer) --

          The total number of hours for a single instance for the entire term.

Examples

This example describes a schedule that occurs every week on Sunday, starting on the specified date. Note that the output contains a single schedule as an example.

response = client.describe_scheduled_instance_availability(
    FirstSlotStartTimeRange={
        'EarliestTime': datetime(2016, 1, 31, 0, 0, 0, 6, 31, 0),
        'LatestTime': datetime(2016, 1, 31, 4, 0, 0, 6, 31, 0),
    },
    Recurrence={
        'Frequency': 'Weekly',
        'Interval': 1,
        'OccurrenceDays': [
            1,
        ],
    },
)

print(response)

Expected Output:

{
    'ScheduledInstanceAvailabilitySet': [
        {
            'AvailabilityZone': 'us-west-2b',
            'AvailableInstanceCount': 20,
            'FirstSlotStartTime': datetime(2016, 1, 31, 0, 0, 0, 6, 31, 0),
            'HourlyPrice': '0.095',
            'InstanceType': 'c4.large',
            'MaxTermDurationInDays': 366,
            'MinTermDurationInDays': 366,
            'NetworkPlatform': 'EC2-VPC',
            'Platform': 'Linux/UNIX',
            'PurchaseToken': 'eyJ2IjoiMSIsInMiOjEsImMiOi...',
            'Recurrence': {
                'Frequency': 'Weekly',
                'Interval': 1,
                'OccurrenceDaySet': [
                    1,
                ],
                'OccurrenceRelativeToEnd': False,
            },
            'SlotDurationInHours': 23,
            'TotalScheduledInstanceHours': 1219,
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_scheduled_instances(**kwargs)

Describes the specified Scheduled Instances or all your Scheduled Instances.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_scheduled_instances(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    ScheduledInstanceIds=[
        'string',
    ],
    SlotStartTimeRange={
        'EarliestTime': datetime(2015, 1, 1),
        'LatestTime': datetime(2015, 1, 1)
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone (for example, us-west-2a ).
    • instance-type - The instance type (for example, c4.large ).
    • network-platform - The network platform (EC2-Classic or EC2-VPC ).
    • platform - The platform (Linux/UNIX or Windows ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. This value can be between 5 and 300. The default value is 100. To retrieve the remaining results, make another call with the returned NextToken value.
  • NextToken (string) -- The token for the next set of results.
  • ScheduledInstanceIds (list) --

    The Scheduled Instance IDs.

    • (string) --
  • SlotStartTimeRange (dict) --

    The time period for the first schedule to start.

    • EarliestTime (datetime) --

      The earliest date and time, in UTC, for the Scheduled Instance to start.

    • LatestTime (datetime) --

      The latest date and time, in UTC, for the Scheduled Instance to start.

Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'ScheduledInstanceSet': [
        {
            'AvailabilityZone': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'HourlyPrice': 'string',
            'InstanceCount': 123,
            'InstanceType': 'string',
            'NetworkPlatform': 'string',
            'NextSlotStartTime': datetime(2015, 1, 1),
            'Platform': 'string',
            'PreviousSlotEndTime': datetime(2015, 1, 1),
            'Recurrence': {
                'Frequency': 'string',
                'Interval': 123,
                'OccurrenceDaySet': [
                    123,
                ],
                'OccurrenceRelativeToEnd': True|False,
                'OccurrenceUnit': 'string'
            },
            'ScheduledInstanceId': 'string',
            'SlotDurationInHours': 123,
            'TermEndDate': datetime(2015, 1, 1),
            'TermStartDate': datetime(2015, 1, 1),
            'TotalScheduledInstanceHours': 123
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeScheduledInstances.

    • NextToken (string) --

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

    • ScheduledInstanceSet (list) --

      Information about the Scheduled Instances.

      • (dict) --

        Describes a Scheduled Instance.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        • AvailabilityZone (string) --

          The Availability Zone.

        • CreateDate (datetime) --

          The date when the Scheduled Instance was purchased.

        • HourlyPrice (string) --

          The hourly price for a single instance.

        • InstanceCount (integer) --

          The number of instances.

        • InstanceType (string) --

          The instance type.

        • NetworkPlatform (string) --

          The network platform (EC2-Classic or EC2-VPC ).

        • NextSlotStartTime (datetime) --

          The time for the next schedule to start.

        • Platform (string) --

          The platform (Linux/UNIX or Windows ).

        • PreviousSlotEndTime (datetime) --

          The time that the previous schedule ended or will end.

        • Recurrence (dict) --

          The schedule recurrence.

          • Frequency (string) --

            The frequency (Daily , Weekly , or Monthly ).

          • Interval (integer) --

            The interval quantity. The interval unit depends on the value of frequency . For example, every 2 weeks or every 2 months.

          • OccurrenceDaySet (list) --

            The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

            • (integer) --
          • OccurrenceRelativeToEnd (boolean) --

            Indicates whether the occurrence is relative to the end of the specified week or month.

          • OccurrenceUnit (string) --

            The unit for occurrenceDaySet (DayOfWeek or DayOfMonth ).

        • ScheduledInstanceId (string) --

          The Scheduled Instance ID.

        • SlotDurationInHours (integer) --

          The number of hours in the schedule.

        • TermEndDate (datetime) --

          The end date for the Scheduled Instance.

        • TermStartDate (datetime) --

          The start date for the Scheduled Instance.

        • TotalScheduledInstanceHours (integer) --

          The total number of hours for a single instance for the entire term.

Examples

This example describes the specified Scheduled Instance.

response = client.describe_scheduled_instances(
    ScheduledInstanceIds=[
        'sci-1234-1234-1234-1234-123456789012',
    ],
)

print(response)

Expected Output:

{
    'ScheduledInstanceSet': [
        {
            'AvailabilityZone': 'us-west-2b',
            'CreateDate': datetime(2016, 1, 25, 21, 43, 38, 0, 25, 0),
            'HourlyPrice': '0.095',
            'InstanceCount': 1,
            'InstanceType': 'c4.large',
            'NetworkPlatform': 'EC2-VPC',
            'NextSlotStartTime': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
            'Platform': 'Linux/UNIX',
            'Recurrence': {
                'Frequency': 'Weekly',
                'Interval': 1,
                'OccurrenceDaySet': [
                    1,
                ],
                'OccurrenceRelativeToEnd': False,
                'OccurrenceUnit': '',
            },
            'ScheduledInstanceId': 'sci-1234-1234-1234-1234-123456789012',
            'SlotDurationInHours': 32,
            'TermEndDate': datetime(2017, 1, 31, 9, 0, 0, 1, 31, 0),
            'TermStartDate': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
            'TotalScheduledInstanceHours': 1696,
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_security_group_references(**kwargs)

[VPC only] Describes the VPCs on the other side of a VPC peering connection that are referencing the security groups you've specified in this request.

See also: AWS API Documentation

Request Syntax

response = client.describe_security_group_references(
    DryRun=True|False,
    GroupId=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupId (list) --

    [REQUIRED]

    The IDs of the security groups in your account.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'SecurityGroupReferenceSet': [
        {
            'GroupId': 'string',
            'ReferencingVpcId': 'string',
            'VpcPeeringConnectionId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • SecurityGroupReferenceSet (list) --

      Information about the VPCs with the referencing security groups.

      • (dict) --

        Describes a VPC with a security group that references your security group.

        • GroupId (string) --

          The ID of your security group.

        • ReferencingVpcId (string) --

          The ID of the VPC with the referencing security group.

        • VpcPeeringConnectionId (string) --

          The ID of the VPC peering connection.

Examples

This example describes the security group references for the specified security group.

response = client.describe_security_group_references(
    GroupId=[
        'sg-903004f8',
    ],
)

print(response)

Expected Output:

{
    'SecurityGroupReferenceSet': [
        {
            'GroupId': 'sg-903004f8',
            'ReferencingVpcId': 'vpc-1a2b3c4d',
            'VpcPeeringConnectionId': 'pcx-b04deed9',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_security_group_rules(**kwargs)

Describes one or more of your security group rules.

See also: AWS API Documentation

Request Syntax

response = client.describe_security_group_rules(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SecurityGroupRuleIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • group-id - The ID of the security group.
    • security-group-rule-id - The ID of the security group rule.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • SecurityGroupRuleIds (list) --

    The IDs of the security group rules.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.
Return type

dict

Returns

Response Syntax

{
    'SecurityGroupRules': [
        {
            'SecurityGroupRuleId': 'string',
            'GroupId': 'string',
            'GroupOwnerId': 'string',
            'IsEgress': True|False,
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'CidrIpv4': 'string',
            'CidrIpv6': 'string',
            'PrefixListId': 'string',
            'ReferencedGroupInfo': {
                'GroupId': 'string',
                'PeeringStatus': 'string',
                'UserId': 'string',
                'VpcId': 'string',
                'VpcPeeringConnectionId': 'string'
            },
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SecurityGroupRules (list) --

      Information about security group rules.

      • (dict) --

        Describes a security group rule.

        • SecurityGroupRuleId (string) --

          The ID of the security group rule.

        • GroupId (string) --

          The ID of the security group.

        • GroupOwnerId (string) --

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress (boolean) --

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol (string) --

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

          Use -1 to specify all protocols.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 (string) --

          The IPv4 CIDR range.

        • CidrIpv6 (string) --

          The IPv6 CIDR range.

        • PrefixListId (string) --

          The ID of the prefix list.

        • ReferencedGroupInfo (dict) --

          Describes the security group that is referenced in the rule.

          • GroupId (string) --

            The ID of the security group.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The Amazon Web Services account ID.

          • VpcId (string) --

            The ID of the VPC.

          • VpcPeeringConnectionId (string) --

            The ID of the VPC peering connection.

        • Description (string) --

          The security group rule description.

        • Tags (list) --

          The tags applied to the security group rule.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_security_groups(**kwargs)

Describes the specified security groups or all 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 .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_security_groups(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    GroupIds=[
        'string',
    ],
    GroupNames=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    The 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.cidr - An IPv4 CIDR block for an outbound security group rule.
    • egress.ip-permission.from-port - For an outbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.
    • egress.ip-permission.group-id - The ID of a security group that has been referenced in an outbound security group rule.
    • egress.ip-permission.group-name - The name of a security group that is referenced in an outbound security group rule.
    • egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security group rule.
    • egress.ip-permission.prefix-list-id - The ID of a prefix list to which a security group rule allows outbound access.
    • egress.ip-permission.protocol - The IP protocol for an outbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • egress.ip-permission.to-port - For an outbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • egress.ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an outbound security group rule.
    • group-id - The ID of the security group.
    • group-name - The name of the security group.
    • ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule.
    • ip-permission.from-port - For an inbound rule, 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 referenced in an inbound security group rule.
    • ip-permission.group-name - The name of a security group that is referenced in an inbound security group rule.
    • ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group rule.
    • ip-permission.prefix-list-id - The ID of a prefix list from which a security group rule allows inbound access.
    • ip-permission.protocol - The IP protocol for an inbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • ip-permission.to-port - For an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an inbound security group rule.
    • owner-id - The Amazon Web Services account ID of the owner of the security group.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • GroupIds (list) --

    The IDs of the security groups. Required for security groups in a nondefault VPC.

    Default: Describes all of your security groups.

    • (string) --
  • GroupNames (list) --

    [EC2-Classic and default VPC only] The names of the security groups. 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 of your security groups.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token to request the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (dict) --

    • SecurityGroups (list) --

      Information about the security groups.

      • (dict) --

        Describes a security group.

        • Description (string) --

          A description of the security group.

        • GroupName (string) --

          The name of the security group.

        • IpPermissions (list) --

          The inbound rules associated with the security group.

          • (dict) --

            Describes a set of permissions for a security group rule.

            • FromPort (integer) --

              The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • IpProtocol (string) --

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

              [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

            • IpRanges (list) --

              The IPv4 ranges.

              • (dict) --

                Describes an IPv4 range.

                • CidrIp (string) --

                  The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv4 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • Ipv6Ranges (list) --

              [VPC only] The IPv6 ranges.

              • (dict) --

                [EC2-VPC only] Describes an IPv6 range.

                • CidrIpv6 (string) --

                  The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv6 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • PrefixListIds (list) --

              [VPC only] The prefix list IDs.

              • (dict) --

                Describes a prefix list ID.

                • Description (string) --

                  A description for the security group rule that references this prefix list ID.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • PrefixListId (string) --

                  The ID of the prefix.

            • ToPort (integer) --

              The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • UserIdGroupPairs (list) --

              The security group and Amazon Web Services account ID pairs.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

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

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the security group.

        • GroupId (string) --

          The ID of the security group.

        • IpPermissionsEgress (list) --

          [VPC only] The outbound rules associated with the security group.

          • (dict) --

            Describes a set of permissions for a security group rule.

            • FromPort (integer) --

              The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • IpProtocol (string) --

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

              [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

            • IpRanges (list) --

              The IPv4 ranges.

              • (dict) --

                Describes an IPv4 range.

                • CidrIp (string) --

                  The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv4 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • Ipv6Ranges (list) --

              [VPC only] The IPv6 ranges.

              • (dict) --

                [EC2-VPC only] Describes an IPv6 range.

                • CidrIpv6 (string) --

                  The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv6 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • PrefixListIds (list) --

              [VPC only] The prefix list IDs.

              • (dict) --

                Describes a prefix list ID.

                • Description (string) --

                  A description for the security group rule that references this prefix list ID.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • PrefixListId (string) --

                  The ID of the prefix.

            • ToPort (integer) --

              The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • UserIdGroupPairs (list) --

              The security group and Amazon Web Services account ID pairs.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

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

        • 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 256 Unicode characters.

        • VpcId (string) --

          [VPC only] The ID of the VPC for the security group.

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

Examples

This example describes the specified security group.

response = client.describe_security_groups(
    GroupIds=[
        'sg-903004f8',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the security groups that include the specified tag (Purpose=test).

response = client.describe_security_groups(
    Filters=[
        {
            'Name': 'tag:Purpose',
            'Values': [
                'test',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_snapshot_attribute(**kwargs)

Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.

For more information about EBS snapshots, see Amazon EBS snapshots in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_snapshot_attribute(
    Attribute='productCodes'|'createVolumePermission',
    SnapshotId='string',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The snapshot attribute you would like to view.

  • SnapshotId (string) --

    [REQUIRED]

    The ID of the EBS snapshot.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CreateVolumePermissions': [
        {
            'Group': 'all',
            'UserId': 'string'
        },
    ],
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'SnapshotId': 'string'
}

Response Structure

  • (dict) --

    • CreateVolumePermissions (list) --

      The users and groups that have the permissions for creating volumes from the snapshot.

      • (dict) --

        Describes the user or group to be added or removed from the list of create volume permissions for a volume.

        • Group (string) --

          The group to be added or removed. The possible value is all .

        • UserId (string) --

          The ID of the Amazon Web Services account to be added or removed.

    • ProductCodes (list) --

      The product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • SnapshotId (string) --

      The ID of the EBS snapshot.

Examples

This example describes the createVolumePermission attribute on a snapshot with the snapshot ID of snap-066877671789bd71b.

response = client.describe_snapshot_attribute(
    Attribute='createVolumePermission',
    SnapshotId='snap-066877671789bd71b',
)

print(response)

Expected Output:

{
    'CreateVolumePermissions': [
    ],
    'SnapshotId': 'snap-066877671789bd71b',
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_snapshot_tier_status(**kwargs)

Describes the storage tier status of one or more Amazon EBS snapshots.

See also: AWS API Documentation

Request Syntax

response = client.describe_snapshot_tier_status(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    The filters.

    • snapshot-id - The snapshot ID.
    • volume-id - The ID of the volume the snapshot is for.
    • last-tiering-operation - The state of the last archive or restore action. (archival-in-progress | archival-completed | archival-failed | permanent-restore-in-progress | permanent-restore-completed | permanent-restore-failed | temporary-restore-in-progress | temporary-restore-completed | temporary-restore-failed )
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'SnapshotTierStatuses': [
        {
            'SnapshotId': 'string',
            'VolumeId': 'string',
            'Status': 'pending'|'completed'|'error'|'recoverable'|'recovering',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'StorageTier': 'archive'|'standard',
            'LastTieringStartTime': datetime(2015, 1, 1),
            'LastTieringProgress': 123,
            'LastTieringOperationStatus': 'archival-in-progress'|'archival-completed'|'archival-failed'|'temporary-restore-in-progress'|'temporary-restore-completed'|'temporary-restore-failed'|'permanent-restore-in-progress'|'permanent-restore-completed'|'permanent-restore-failed',
            'LastTieringOperationStatusDetail': 'string',
            'ArchivalCompleteTime': datetime(2015, 1, 1),
            'RestoreExpiryTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SnapshotTierStatuses (list) --

      Information about the snapshot's storage tier.

      • (dict) --

        Provides information about a snapshot's storage tier.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeId (string) --

          The ID of the volume from which the snapshot was created.

        • Status (string) --

          The state of the snapshot.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the snapshot.

        • Tags (list) --

          The tags that are assigned to the snapshot.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • StorageTier (string) --

          The storage tier in which the snapshot is stored. standard indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. archive indicates that the snapshot is currently archived and that it must be restored before it can be used.

        • LastTieringStartTime (datetime) --

          The date and time when the last archive or restore process was started.

        • LastTieringProgress (integer) --

          The progress of the last archive or restore process, as a percentage.

        • LastTieringOperationStatus (string) --

          The status of the last archive or restore process.

        • LastTieringOperationStatusDetail (string) --

          A message describing the status of the last archive or restore process.

        • ArchivalCompleteTime (datetime) --

          The date and time when the last archive process was completed.

        • RestoreExpiryTime (datetime) --

          Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.

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

describe_snapshots(**kwargs)

Describes the specified EBS snapshots available to you or all of the EBS snapshots available to you.

The snapshots available to you include public snapshots, private snapshots that you own, and private snapshots owned by other Amazon Web Services accounts for which you have explicit create volume permissions.

The create volume permissions fall into the following categories:

  • public : The owner of the snapshot granted create volume permissions for the snapshot to the all group. All Amazon Web Services accounts have create volume permissions for these snapshots.
  • explicit : The owner of the snapshot granted create volume permissions to a specific Amazon Web Services account.
  • implicit : An Amazon Web Services account has implicit create volume permissions for all snapshots it owns.

The list of snapshots returned can be filtered by specifying snapshot IDs, snapshot owners, or Amazon Web Services accounts with create volume permissions. If no options are specified, Amazon EC2 returns all snapshots for which you have create volume permissions.

If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned. If you specify an invalid snapshot ID, an error is returned. If you specify a snapshot ID for which you do not have access, it is not included in the returned results.

If you specify one or more snapshot owners using the OwnerIds option, only snapshots from the specified owners and for which you have access are returned. The results can include the Amazon Web Services account IDs of the specified owners, amazon for snapshots owned by Amazon, or self for snapshots that you own.

If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned. You can specify Amazon Web Services account IDs (if you own the snapshots), self for snapshots for which you own or have explicit permissions, or all for public snapshots.

If you are describing a long list of snapshots, we recommend that you paginate the output to make the list more manageable. The MaxResults parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeSnapshots request to retrieve the remaining results.

To get the state of fast snapshot restores for a snapshot, use DescribeFastSnapshotRestores .

For more information about EBS snapshots, see Amazon EBS snapshots in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_snapshots(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    OwnerIds=[
        'string',
    ],
    RestorableByUserIds=[
        'string',
    ],
    SnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • description - A description of the snapshot.
    • encrypted - Indicates whether the snapshot is encrypted (true | false )
    • owner-alias - The owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.
    • progress - The progress of the snapshot, as a percentage (for example, 80%).
    • snapshot-id - The snapshot ID.
    • start-time - The time stamp when the snapshot was initiated.
    • status - The status of the snapshot (pending | completed | error ).
    • storage-tier - The storage tier of the snapshot (archive | standard ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The ID of the volume the snapshot is for.
    • volume-size - The size of the volume, in GiB.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • OwnerIds (list) --

    Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , and amazon .

    • (string) --
  • RestorableByUserIds (list) --

    The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • (string) --
  • SnapshotIds (list) --

    The snapshot IDs.

    Default: Describes the snapshots for which you have create volume permissions.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Snapshots': [
        {
            'DataEncryptionKeyId': 'string',
            'Description': 'string',
            'Encrypted': True|False,
            'KmsKeyId': 'string',
            'OwnerId': 'string',
            'Progress': 'string',
            'SnapshotId': 'string',
            'StartTime': datetime(2015, 1, 1),
            'State': 'pending'|'completed'|'error'|'recoverable'|'recovering',
            'StateMessage': 'string',
            'VolumeId': 'string',
            'VolumeSize': 123,
            'OwnerAlias': 'string',
            'OutpostArn': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'StorageTier': 'archive'|'standard',
            'RestoreExpiryTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Snapshots (list) --

      Information about the snapshots.

      • (dict) --

        Describes a snapshot.

        • DataEncryptionKeyId (string) --

          The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by DescribeSnapshots .

        • Description (string) --

          The description for the snapshot.

        • Encrypted (boolean) --

          Indicates whether the snapshot is encrypted.

        • KmsKeyId (string) --

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the EBS snapshot.

        • Progress (string) --

          The progress of the snapshot, as a percentage.

        • SnapshotId (string) --

          The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

        • StartTime (datetime) --

          The time stamp when the snapshot was initiated.

        • State (string) --

          The snapshot state.

        • StateMessage (string) --

          Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by DescribeSnapshots .

        • VolumeId (string) --

          The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

        • VolumeSize (integer) --

          The size of the volume, in GiB.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

        • Tags (list) --

          Any tags assigned to the snapshot.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • StorageTier (string) --

          The storage tier in which the snapshot is stored. standard indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. archive indicates that the snapshot is currently archived and that it must be restored before it can be used.

        • RestoreExpiryTime (datetime) --

          Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.

    • NextToken (string) --

      The NextToken value to include in a future DescribeSnapshots request. When the results of a DescribeSnapshots request exceed MaxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Examples

This example describes a snapshot with the snapshot ID of snap-1234567890abcdef0.

response = client.describe_snapshots(
    SnapshotIds=[
        'snap-1234567890abcdef0',
    ],
)

print(response)

Expected Output:

{
    'NextToken': '',
    'Snapshots': [
        {
            'Description': 'This is my snapshot.',
            'OwnerId': '012345678910',
            'Progress': '100%',
            'SnapshotId': 'snap-1234567890abcdef0',
            'StartTime': datetime(2014, 2, 28, 21, 28, 32, 4, 59, 0),
            'State': 'completed',
            'VolumeId': 'vol-049df61146c4d7901',
            'VolumeSize': 8,
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes all snapshots owned by the ID 012345678910 that are in the pending status.

response = client.describe_snapshots(
    Filters=[
        {
            'Name': 'status',
            'Values': [
                'pending',
            ],
        },
    ],
    OwnerIds=[
        '012345678910',
    ],
)

print(response)

Expected Output:

{
    'NextToken': '',
    'Snapshots': [
        {
            'Description': 'This is my copied snapshot.',
            'OwnerId': '012345678910',
            'Progress': '87%',
            'SnapshotId': 'snap-066877671789bd71b',
            'StartTime': datetime(2014, 2, 28, 21, 37, 27, 4, 59, 0),
            'State': 'pending',
            'VolumeId': 'vol-1234567890abcdef0',
            'VolumeSize': 8,
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_spot_datafeed_subscription(**kwargs)

Describes the data feed for Spot Instances. For more information, see Spot Instance data feed in the Amazon EC2 User Guide for Linux Instances .

See also: AWS API Documentation

Request Syntax

response = client.describe_spot_datafeed_subscription(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'SpotDatafeedSubscription': {
        'Bucket': 'string',
        'Fault': {
            'Code': 'string',
            'Message': 'string'
        },
        'OwnerId': 'string',
        'Prefix': 'string',
        'State': 'Active'|'Inactive'
    }
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotDatafeedSubscription.

    • SpotDatafeedSubscription (dict) --

      The Spot Instance data feed subscription.

      • Bucket (string) --

        The name of the Amazon S3 bucket where the Spot Instance data feed is located.

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

      • OwnerId (string) --

        The Amazon Web Services account ID of the account.

      • Prefix (string) --

        The prefix for the data feed files.

      • State (string) --

        The state of the Spot Instance data feed subscription.

Examples

This example describes the Spot Instance datafeed subscription for your AWS account.

response = client.describe_spot_datafeed_subscription(
)

print(response)

Expected Output:

{
    'SpotDatafeedSubscription': {
        'Bucket': 'my-s3-bucket',
        'OwnerId': '123456789012',
        'Prefix': 'spotdata',
        'State': 'Active',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_spot_fleet_instances(**kwargs)

Describes the running instances for the specified Spot Fleet.

See also: AWS API Documentation

Request Syntax

response = client.describe_spot_fleet_instances(
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    SpotFleetRequestId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
  • SpotFleetRequestId (string) --

    [REQUIRED]

    The ID of the Spot Fleet request.

Return type

dict

Returns

Response Syntax

{
    'ActiveInstances': [
        {
            'InstanceId': 'string',
            'InstanceType': 'string',
            'SpotInstanceRequestId': 'string',
            'InstanceHealth': 'healthy'|'unhealthy'
        },
    ],
    'NextToken': 'string',
    'SpotFleetRequestId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotFleetInstances.

    • ActiveInstances (list) --

      The running instances. This list is refreshed periodically and might be out of date.

      • (dict) --

        Describes a running instance in a Spot Fleet.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceType (string) --

          The instance type.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • InstanceHealth (string) --

          The health status of the instance. If the status of either the instance status check or the system status check is impaired , the health status of the instance is unhealthy . Otherwise, the health status is healthy .

    • NextToken (string) --

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

    • SpotFleetRequestId (string) --

      The ID of the Spot Fleet request.

Examples

This example lists the Spot Instances associated with the specified Spot fleet.

response = client.describe_spot_fleet_instances(
    SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
)

print(response)

Expected Output:

{
    'ActiveInstances': [
        {
            'InstanceId': 'i-1234567890abcdef0',
            'InstanceType': 'm3.medium',
            'SpotInstanceRequestId': 'sir-08b93456',
        },
    ],
    'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_spot_fleet_request_history(**kwargs)

Describes the events for the specified Spot Fleet request during the specified time.

Spot Fleet events are delayed by up to 30 seconds before they can be described. This ensures that you can query by the last evaluated time and not miss a recorded event. Spot Fleet events are available for 48 hours.

For more information, see Monitor fleet events using Amazon EventBridge in the Amazon EC2 User Guide for Linux Instances .

See also: AWS API Documentation

Request Syntax

response = client.describe_spot_fleet_request_history(
    DryRun=True|False,
    EventType='instanceChange'|'fleetRequestChange'|'error'|'information',
    MaxResults=123,
    NextToken='string',
    SpotFleetRequestId='string',
    StartTime=datetime(2015, 1, 1)
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EventType (string) -- The type of events to describe. By default, all events are described.
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
  • SpotFleetRequestId (string) --

    [REQUIRED]

    The ID of the Spot Fleet request.

  • StartTime (datetime) --

    [REQUIRED]

    The starting date and time for the events, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

Return type

dict

Returns

Response Syntax

{
    'HistoryRecords': [
        {
            'EventInformation': {
                'EventDescription': 'string',
                'EventSubType': 'string',
                'InstanceId': 'string'
            },
            'EventType': 'instanceChange'|'fleetRequestChange'|'error'|'information',
            'Timestamp': datetime(2015, 1, 1)
        },
    ],
    'LastEvaluatedTime': datetime(2015, 1, 1),
    'NextToken': 'string',
    'SpotFleetRequestId': 'string',
    'StartTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotFleetRequestHistory.

    • HistoryRecords (list) --

      Information about the events in the history of the Spot Fleet request.

      • (dict) --

        Describes an event in the history of the Spot Fleet request.

        • EventInformation (dict) --

          Information about the event.

          • EventDescription (string) --

            The description of the event.

          • EventSubType (string) --

            The event.

            error events:

            • iamFleetRoleInvalid - The EC2 Fleet or Spot Fleet does not have the required permissions either to launch or terminate an instance.
            • allLaunchSpecsTemporarilyBlacklisted - None of the configurations are valid, and several attempts to launch instances have failed. For more information, see the description of the event.
            • spotInstanceCountLimitExceeded - You've reached the limit on the number of Spot Instances that you can launch.
            • spotFleetRequestConfigurationInvalid - The configuration is not valid. For more information, see the description of the event.

            fleetRequestChange events:

            • active - The EC2 Fleet or Spot Fleet request has been validated and Amazon EC2 is attempting to maintain the target number of running instances.
            • deleted (EC2 Fleet) / cancelled (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and has no running instances. The EC2 Fleet or Spot Fleet will be deleted two days after its instances are terminated.
            • deleted_running (EC2 Fleet) / cancelled_running (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and does not launch additional instances. Its existing instances continue to run until they are interrupted or terminated. The request remains in this state until all instances are interrupted or terminated.
            • deleted_terminating (EC2 Fleet) / cancelled_terminating (Spot Fleet) - The EC2 Fleet is deleted or the Spot Fleet request is canceled and its instances are terminating. The request remains in this state until all instances are terminated.
            • expired - The EC2 Fleet or Spot Fleet request has expired. If the request was created with TerminateInstancesWithExpiration set, a subsequent terminated event indicates that the instances are terminated.
            • modify_in_progress - The EC2 Fleet or Spot Fleet request is being modified. The request remains in this state until the modification is fully processed.
            • modify_succeeded - The EC2 Fleet or Spot Fleet request was modified.
            • submitted - The EC2 Fleet or Spot Fleet request is being evaluated and Amazon EC2 is preparing to launch the target number of instances.
            • progress - The EC2 Fleet or Spot Fleet request is in the process of being fulfilled.

            instanceChange events:

            • launched - A new instance was launched.
            • terminated - An instance was terminated by the user.
            • termination_notified - An instance termination notification was sent when a Spot Instance was terminated by Amazon EC2 during scale-down, when the target capacity of the fleet was modified down, for example, from a target capacity of 4 to a target capacity of 3.

            Information events:

            • fleetProgressHalted - The price in every launch specification is not valid because it is below the Spot price (all the launch specifications have produced launchSpecUnusable events). A launch specification might become valid if the Spot price changes.
            • launchSpecTemporarilyBlacklisted - The configuration is not valid and several attempts to launch instances have failed. For more information, see the description of the event.
            • launchSpecUnusable - The price in a launch specification is not valid because it is below the Spot price.
            • registerWithLoadBalancersFailed - An attempt to register instances with load balancers failed. For more information, see the description of the event.
          • InstanceId (string) --

            The ID of the instance. This information is available only for instanceChange events.

        • EventType (string) --

          The event type.

          • error - An error with the Spot Fleet request.
          • fleetRequestChange - A change in the status or configuration of the Spot Fleet request.
          • instanceChange - An instance was launched or terminated.
          • Information - An informational event.
        • Timestamp (datetime) --

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

    • LastEvaluatedTime (datetime) --

      The last date and time for the events, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z). All records up to this time were retrieved.

      If nextToken indicates that there are more results, this value is not present.

    • NextToken (string) --

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

    • SpotFleetRequestId (string) --

      The ID of the Spot Fleet request.

    • StartTime (datetime) --

      The starting date and time for the events, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

Examples

This example returns the history for the specified Spot fleet starting at the specified time.

response = client.describe_spot_fleet_request_history(
    SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    StartTime=datetime(2015, 5, 26, 0, 0, 0, 1, 146, 0),
)

print(response)

Expected Output:

{
    'HistoryRecords': [
        {
            'EventInformation': {
                'EventSubType': 'submitted',
            },
            'EventType': 'fleetRequestChange',
            'Timestamp': datetime(2015, 5, 26, 23, 17, 20, 1, 146, 0),
        },
        {
            'EventInformation': {
                'EventSubType': 'active',
            },
            'EventType': 'fleetRequestChange',
            'Timestamp': datetime(2015, 5, 26, 23, 17, 20, 1, 146, 0),
        },
        {
            'EventInformation': {
                'EventSubType': 'launched',
                'InstanceId': 'i-1234567890abcdef0',
            },
            'EventType': 'instanceChange',
            'Timestamp': datetime(2015, 5, 26, 23, 21, 21, 1, 146, 0),
        },
        {
            'EventInformation': {
                'EventSubType': 'launched',
                'InstanceId': 'i-1234567890abcdef1',
            },
            'EventType': 'instanceChange',
            'Timestamp': datetime(2015, 5, 26, 23, 21, 21, 1, 146, 0),
        },
    ],
    'NextToken': 'CpHNsscimcV5oH7bSbub03CI2Qms5+ypNpNm+53MNlR0YcXAkp0xFlfKf91yVxSExmbtma3awYxMFzNA663ZskT0AHtJ6TCb2Z8bQC2EnZgyELbymtWPfpZ1ZbauVg+P+TfGlWxWWB/Vr5dk5d4LfdgA/DRAHUrYgxzrEXAMPLE=',
    'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    'StartTime': datetime(2015, 5, 26, 0, 0, 0, 1, 146, 0),
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_spot_fleet_requests(**kwargs)

Describes your Spot Fleet requests.

Spot Fleet requests are deleted 48 hours after they are canceled and their instances are terminated.

See also: AWS API Documentation

Request Syntax

response = client.describe_spot_fleet_requests(
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    SpotFleetRequestIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
  • SpotFleetRequestIds (list) --

    The IDs of the Spot Fleet requests.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'SpotFleetRequestConfigs': [
        {
            'ActivityStatus': 'error'|'pending_fulfillment'|'pending_termination'|'fulfilled',
            'CreateTime': datetime(2015, 1, 1),
            'SpotFleetRequestConfig': {
                'AllocationStrategy': 'lowestPrice'|'diversified'|'capacityOptimized'|'capacityOptimizedPrioritized',
                'OnDemandAllocationStrategy': 'lowestPrice'|'prioritized',
                'SpotMaintenanceStrategies': {
                    'CapacityRebalance': {
                        'ReplacementStrategy': 'launch'|'launch-before-terminate',
                        'TerminationDelay': 123
                    }
                },
                'ClientToken': 'string',
                'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
                'FulfilledCapacity': 123.0,
                'OnDemandFulfilledCapacity': 123.0,
                'IamFleetRole': 'string',
                'LaunchSpecifications': [
                    {
                        'SecurityGroups': [
                            {
                                'GroupName': 'string',
                                'GroupId': 'string'
                            },
                        ],
                        'AddressingType': 'string',
                        'BlockDeviceMappings': [
                            {
                                'DeviceName': 'string',
                                'VirtualName': 'string',
                                'Ebs': {
                                    'DeleteOnTermination': True|False,
                                    'Iops': 123,
                                    'SnapshotId': 'string',
                                    'VolumeSize': 123,
                                    'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                                    'KmsKeyId': 'string',
                                    'Throughput': 123,
                                    'OutpostArn': 'string',
                                    'Encrypted': True|False
                                },
                                'NoDevice': 'string'
                            },
                        ],
                        'EbsOptimized': True|False,
                        'IamInstanceProfile': {
                            'Arn': 'string',
                            'Name': 'string'
                        },
                        'ImageId': 'string',
                        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                        'KernelId': 'string',
                        'KeyName': 'string',
                        'Monitoring': {
                            'Enabled': True|False
                        },
                        'NetworkInterfaces': [
                            {
                                'AssociatePublicIpAddress': True|False,
                                'DeleteOnTermination': True|False,
                                'Description': 'string',
                                'DeviceIndex': 123,
                                'Groups': [
                                    'string',
                                ],
                                'Ipv6AddressCount': 123,
                                'Ipv6Addresses': [
                                    {
                                        'Ipv6Address': 'string'
                                    },
                                ],
                                'NetworkInterfaceId': 'string',
                                'PrivateIpAddress': 'string',
                                'PrivateIpAddresses': [
                                    {
                                        'Primary': True|False,
                                        'PrivateIpAddress': 'string'
                                    },
                                ],
                                'SecondaryPrivateIpAddressCount': 123,
                                'SubnetId': 'string',
                                'AssociateCarrierIpAddress': True|False,
                                'InterfaceType': 'string',
                                'NetworkCardIndex': 123,
                                'Ipv4Prefixes': [
                                    {
                                        'Ipv4Prefix': 'string'
                                    },
                                ],
                                'Ipv4PrefixCount': 123,
                                'Ipv6Prefixes': [
                                    {
                                        'Ipv6Prefix': 'string'
                                    },
                                ],
                                'Ipv6PrefixCount': 123
                            },
                        ],
                        'Placement': {
                            'AvailabilityZone': 'string',
                            'GroupName': 'string',
                            'Tenancy': 'default'|'dedicated'|'host'
                        },
                        'RamdiskId': 'string',
                        'SpotPrice': 'string',
                        'SubnetId': 'string',
                        'UserData': 'string',
                        'WeightedCapacity': 123.0,
                        'TagSpecifications': [
                            {
                                'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                                'Tags': [
                                    {
                                        'Key': 'string',
                                        'Value': 'string'
                                    },
                                ]
                            },
                        ],
                        'InstanceRequirements': {
                            'VCpuCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'MemoryMiB': {
                                'Min': 123,
                                'Max': 123
                            },
                            'CpuManufacturers': [
                                'intel'|'amd'|'amazon-web-services',
                            ],
                            'MemoryGiBPerVCpu': {
                                'Min': 123.0,
                                'Max': 123.0
                            },
                            'ExcludedInstanceTypes': [
                                'string',
                            ],
                            'InstanceGenerations': [
                                'current'|'previous',
                            ],
                            'SpotMaxPricePercentageOverLowestPrice': 123,
                            'OnDemandMaxPricePercentageOverLowestPrice': 123,
                            'BareMetal': 'included'|'required'|'excluded',
                            'BurstablePerformance': 'included'|'required'|'excluded',
                            'RequireHibernateSupport': True|False,
                            'NetworkInterfaceCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'LocalStorage': 'included'|'required'|'excluded',
                            'LocalStorageTypes': [
                                'hdd'|'ssd',
                            ],
                            'TotalLocalStorageGB': {
                                'Min': 123.0,
                                'Max': 123.0
                            },
                            'BaselineEbsBandwidthMbps': {
                                'Min': 123,
                                'Max': 123
                            },
                            'AcceleratorTypes': [
                                'gpu'|'fpga'|'inference',
                            ],
                            'AcceleratorCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'AcceleratorManufacturers': [
                                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                            ],
                            'AcceleratorNames': [
                                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                            ],
                            'AcceleratorTotalMemoryMiB': {
                                'Min': 123,
                                'Max': 123
                            }
                        }
                    },
                ],
                'LaunchTemplateConfigs': [
                    {
                        'LaunchTemplateSpecification': {
                            'LaunchTemplateId': 'string',
                            'LaunchTemplateName': 'string',
                            'Version': 'string'
                        },
                        'Overrides': [
                            {
                                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                                'SpotPrice': 'string',
                                'SubnetId': 'string',
                                'AvailabilityZone': 'string',
                                'WeightedCapacity': 123.0,
                                'Priority': 123.0,
                                'InstanceRequirements': {
                                    'VCpuCount': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'MemoryMiB': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'CpuManufacturers': [
                                        'intel'|'amd'|'amazon-web-services',
                                    ],
                                    'MemoryGiBPerVCpu': {
                                        'Min': 123.0,
                                        'Max': 123.0
                                    },
                                    'ExcludedInstanceTypes': [
                                        'string',
                                    ],
                                    'InstanceGenerations': [
                                        'current'|'previous',
                                    ],
                                    'SpotMaxPricePercentageOverLowestPrice': 123,
                                    'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                    'BareMetal': 'included'|'required'|'excluded',
                                    'BurstablePerformance': 'included'|'required'|'excluded',
                                    'RequireHibernateSupport': True|False,
                                    'NetworkInterfaceCount': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'LocalStorage': 'included'|'required'|'excluded',
                                    'LocalStorageTypes': [
                                        'hdd'|'ssd',
                                    ],
                                    'TotalLocalStorageGB': {
                                        'Min': 123.0,
                                        'Max': 123.0
                                    },
                                    'BaselineEbsBandwidthMbps': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'AcceleratorTypes': [
                                        'gpu'|'fpga'|'inference',
                                    ],
                                    'AcceleratorCount': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'AcceleratorManufacturers': [
                                        'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                    ],
                                    'AcceleratorNames': [
                                        'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                    ],
                                    'AcceleratorTotalMemoryMiB': {
                                        'Min': 123,
                                        'Max': 123
                                    }
                                }
                            },
                        ]
                    },
                ],
                'SpotPrice': 'string',
                'TargetCapacity': 123,
                'OnDemandTargetCapacity': 123,
                'OnDemandMaxTotalPrice': 'string',
                'SpotMaxTotalPrice': 'string',
                'TerminateInstancesWithExpiration': True|False,
                'Type': 'request'|'maintain'|'instant',
                'ValidFrom': datetime(2015, 1, 1),
                'ValidUntil': datetime(2015, 1, 1),
                'ReplaceUnhealthyInstances': True|False,
                'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate',
                'LoadBalancersConfig': {
                    'ClassicLoadBalancersConfig': {
                        'ClassicLoadBalancers': [
                            {
                                'Name': 'string'
                            },
                        ]
                    },
                    'TargetGroupsConfig': {
                        'TargetGroups': [
                            {
                                'Arn': 'string'
                            },
                        ]
                    }
                },
                'InstancePoolsToUseCount': 123,
                'Context': 'string',
                'TargetCapacityUnitType': 'vcpu'|'memory-mib'|'units',
                'TagSpecifications': [
                    {
                        'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                        'Tags': [
                            {
                                'Key': 'string',
                                'Value': 'string'
                            },
                        ]
                    },
                ]
            },
            'SpotFleetRequestId': 'string',
            'SpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotFleetRequests.

    • NextToken (string) --

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

    • SpotFleetRequestConfigs (list) --

      Information about the configuration of your Spot Fleet.

      • (dict) --

        Describes a Spot Fleet request.

        • ActivityStatus (string) --

          The progress of the Spot Fleet request. If there is an error, the status is error . After all requests are placed, the status is pending_fulfillment . If the size of the fleet is equal to or greater than its target capacity, the status is fulfilled . If the size of the fleet is decreased, the status is pending_termination while Spot Instances are terminating.

        • CreateTime (datetime) --

          The creation date and time of the request.

        • SpotFleetRequestConfig (dict) --

          The configuration of the Spot Fleet request.

          • AllocationStrategy (string) --

            Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet request.

            If the allocation strategy is lowestPrice , Spot Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.

            If the allocation strategy is diversified , Spot Fleet launches instances from all the Spot Instance pools that you specify.

            If the allocation strategy is capacityOptimized (recommended), Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacityOptimizedPrioritized . Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides . You can assign the same priority to different LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized is supported only if your Spot Fleet uses a launch template. Note that if the OnDemandAllocationStrategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity.

          • OnDemandAllocationStrategy (string) --

            The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice , Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized , Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice .

          • SpotMaintenanceStrategies (dict) --

            The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.

            • CapacityRebalance (dict) --

              The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see Capacity rebalancing in the Amazon EC2 User Guide for Linux Instances .

              • ReplacementStrategy (string) --

                The replacement strategy to use. Only available for fleets of type maintain .

                launch - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

                launch-before-terminate - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay ), terminates the instances that received a rebalance notification.

              • TerminationDelay (integer) --

                The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

                Required when ReplacementStrategy is set to launch-before-terminate .

                Not valid when ReplacementStrategy is set to launch .

                Valid values: Minimum value of 120 seconds. Maximum value of 7200 seconds.

          • ClientToken (string) --

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

          • ExcessCapacityTerminationPolicy (string) --

            Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.

          • FulfilledCapacity (float) --

            The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.

          • OnDemandFulfilledCapacity (float) --

            The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.

          • IamFleetRole (string) --

            The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide for Linux Instances . Spot Fleet can 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) --

            The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications , you can't specify LaunchTemplateConfigs . If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs .

            • (dict) --

              Describes the launch specification for one or more Spot Instances. If you include On-Demand capacity in your fleet request or want to specify an EFA network device, you can't use SpotFleetLaunchSpecification ; you must use LaunchTemplateConfig .

              Note

              We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide for Linux Instances .

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

              • AddressingType (string) --

                Deprecated.

              • BlockDeviceMappings (list) --

                One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.

                • (dict) --

                  Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

                  • DeviceName (string) --

                    The device name (for example, /dev/sdh or xvdh ).

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

                    NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

                    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.

                  • Ebs (dict) --

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

                    • DeleteOnTermination (boolean) --

                      Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

                    • Iops (integer) --

                      The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                      The following are the supported values for each volume type:

                      • gp3 : 3,000-16,000 IOPS
                      • io1 : 100-64,000 IOPS
                      • io2 : 100-64,000 IOPS

                      For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

                      This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

                    • SnapshotId (string) --

                      The ID of the snapshot.

                    • VolumeSize (integer) --

                      The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                      The following are the supported volumes sizes for each volume type:

                      • gp2 and gp3 :1-16,384
                      • io1 and io2 : 4-16,384
                      • st1 and sc1 : 125-16,384
                      • standard : 1-1,024
                    • VolumeType (string) --

                      The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

                    • KmsKeyId (string) --

                      Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                      This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

                    • Throughput (integer) --

                      The throughput that the volume supports, in MiB/s.

                      This parameter is valid only for gp3 volumes.

                      Valid Range: Minimum value of 125. Maximum value of 1000.

                    • OutpostArn (string) --

                      The ARN of the Outpost on which the snapshot is stored.

                      This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

                    • Encrypted (boolean) --

                      Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

                      In no case can you remove encryption from an encrypted volume.

                      Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

                      This parameter is not returned by DescribeImageAttribute .

                  • NoDevice (string) --

                    To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

              • 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

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

              • ImageId (string) --

                The ID of the AMI.

              • InstanceType (string) --

                The instance type.

              • KernelId (string) --

                The ID of the kernel.

              • KeyName (string) --

                The name of the key pair.

              • Monitoring (dict) --

                Enable or disable monitoring for the instances.

                • Enabled (boolean) --

                  Enables monitoring for the instance.

                  Default: false

              • NetworkInterfaces (list) --

                One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

                Note

                SpotFleetLaunchSpecification currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig .

                • (dict) --

                  Describes a network interface.

                  • AssociatePublicIpAddress (boolean) --

                    Indicates whether to assign a public IPv4 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 .

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

                  • Description (string) --

                    The description of the network interface. Applies only if creating a network interface when launching an instance.

                  • DeviceIndex (integer) --

                    The position of the network interface in the attachment order. A primary network interface has a device index of 0.

                    If you specify a network interface when launching an instance, you must specify the device index.

                  • Groups (list) --

                    The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                    • (string) --
                  • Ipv6AddressCount (integer) --

                    A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

                  • Ipv6Addresses (list) --

                    One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                    • (dict) --

                      Describes an IPv6 address.

                      • Ipv6Address (string) --

                        The IPv6 address.

                  • NetworkInterfaceId (string) --

                    The ID of the network interface.

                    If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

                  • PrivateIpAddress (string) --

                    The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                  • PrivateIpAddresses (list) --

                    One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                    • (dict) --

                      Describes a secondary private IPv4 address for a network interface.

                      • Primary (boolean) --

                        Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                      • PrivateIpAddress (string) --

                        The private IPv4 addresses.

                  • SecondaryPrivateIpAddressCount (integer) --

                    The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                  • SubnetId (string) --

                    The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

                  • AssociateCarrierIpAddress (boolean) --

                    Indicates whether to assign a carrier IP address to the network interface.

                    You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

                  • InterfaceType (string) --

                    The type of network interface.

                    Valid values: interface | efa

                  • NetworkCardIndex (integer) --

                    The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

                    If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

                  • Ipv4Prefixes (list) --

                    One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

                  • Ipv4PrefixCount (integer) --

                    The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

                  • Ipv6Prefixes (list) --

                    One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

                    • (dict) --

                      Describes the IPv4 prefix option for a network interface.

                      • Ipv6Prefix (string) --

                        The IPv6 prefix.

                  • Ipv6PrefixCount (integer) --

                    The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

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

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

              • RamdiskId (string) --

                The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.

              • SpotPrice (string) --

                The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                Warning

                If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

              • SubnetId (string) --

                The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".

              • UserData (string) --

                The Base64-encoded user data that instances use when starting up.

              • 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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.

              • TagSpecifications (list) --

                The tags to apply during creation.

                • (dict) --

                  The tags for a Spot Fleet resource.

                  • ResourceType (string) --

                    The type of resource. Currently, the only resource type that is supported is instance . To tag the Spot Fleet request on creation, use the TagSpecifications parameter in ` SpotFleetRequestConfigData https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html`__ .

                  • Tags (list) --

                    The tags.

                    • (dict) --

                      Describes a tag.

                      • Key (string) --

                        The key of the tag.

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

                      • Value (string) --

                        The value of the tag.

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

              • InstanceRequirements (dict) --

                The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                Note

                If you specify InstanceRequirements , you can't specify InstanceTypes .

                • VCpuCount (dict) --

                  The minimum and maximum number of vCPUs.

                  • Min (integer) --

                    The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                  • Max (integer) --

                    The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                • MemoryMiB (dict) --

                  The minimum and maximum amount of memory, in MiB.

                  • Min (integer) --

                    The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                • CpuManufacturers (list) --

                  The CPU manufacturers to include.

                  • For instance types with Intel CPUs, specify intel .
                  • For instance types with AMD CPUs, specify amd .
                  • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                  Note

                  Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                  Default: Any manufacturer

                  • (string) --
                • MemoryGiBPerVCpu (dict) --

                  The minimum and maximum amount of memory per vCPU, in GiB.

                  Default: No minimum or maximum limits

                  • Min (float) --

                    The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                  • Max (float) --

                    The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                • ExcludedInstanceTypes (list) --

                  The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                  For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                  Default: No excluded instance types

                  • (string) --
                • InstanceGenerations (list) --

                  Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                  For current generation instance types, specify current .

                  For previous generation instance types, specify previous .

                  Default: Current and previous generation instance types

                  • (string) --
                • SpotMaxPricePercentageOverLowestPrice (integer) --

                  The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999 .

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                  Note

                  If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                  Default: 100

                • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                  The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999 .

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                  Note

                  If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                  Default: 20

                • BareMetal (string) --

                  Indicates whether bare metal instance types must be included, excluded, or required.

                  • To include bare metal instance types, specify included .
                  • To require only bare metal instance types, specify required .
                  • To exclude bare metal instance types, specify excluded .

                  Default: excluded

                • BurstablePerformance (string) --

                  Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                  • To include burstable performance instance types, specify included .
                  • To require only burstable performance instance types, specify required .
                  • To exclude burstable performance instance types, specify excluded .

                  Default: excluded

                • RequireHibernateSupport (boolean) --

                  Indicates whether instance types must support hibernation for On-Demand Instances.

                  This parameter is not supported for GetSpotPlacementScores .

                  Default: false

                • NetworkInterfaceCount (dict) --

                  The minimum and maximum number of network interfaces.

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                • LocalStorage (string) --

                  Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                  • To include instance types with instance store volumes, specify included .
                  • To require only instance types with instance store volumes, specify required .
                  • To exclude instance types with instance store volumes, specify excluded .

                  Default: included

                • LocalStorageTypes (list) --

                  The type of local storage that is required.

                  • For instance types with hard disk drive (HDD) storage, specify hdd .
                  • For instance types with solid state drive (SSD) storage, specify ssd .

                  Default: hdd and ssd

                  • (string) --
                • TotalLocalStorageGB (dict) --

                  The minimum and maximum amount of total local storage, in GB.

                  Default: No minimum or maximum limits

                  • Min (float) --

                    The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                  • Max (float) --

                    The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                • BaselineEbsBandwidthMbps (dict) --

                  The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                • AcceleratorTypes (list) --

                  The accelerator types that must be on the instance type.

                  • For instance types with GPU accelerators, specify gpu .
                  • For instance types with FPGA accelerators, specify fpga .
                  • For instance types with inference accelerators, specify inference .

                  Default: Any accelerator type

                  • (string) --
                • AcceleratorCount (dict) --

                  The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                  To exclude accelerator-enabled instance types, set Max to 0 .

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                • AcceleratorManufacturers (list) --

                  Indicates whether instance types must have accelerators by specific manufacturers.

                  • For instance types with NVIDIA devices, specify nvidia .
                  • For instance types with AMD devices, specify amd .
                  • For instance types with Amazon Web Services devices, specify amazon-web-services .
                  • For instance types with Xilinx devices, specify xilinx .

                  Default: Any manufacturer

                  • (string) --
                • AcceleratorNames (list) --

                  The accelerators that must be on the instance type.

                  • For instance types with NVIDIA A100 GPUs, specify a100 .
                  • For instance types with NVIDIA V100 GPUs, specify v100 .
                  • For instance types with NVIDIA K80 GPUs, specify k80 .
                  • For instance types with NVIDIA T4 GPUs, specify t4 .
                  • For instance types with NVIDIA M60 GPUs, specify m60 .
                  • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                  • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                  Default: Any accelerator

                  • (string) --
                • AcceleratorTotalMemoryMiB (dict) --

                  The minimum and maximum amount of total accelerator memory, in MiB.

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • LaunchTemplateConfigs (list) --

            The launch template and overrides. If you specify LaunchTemplateConfigs , you can't specify LaunchSpecifications . If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs .

            • (dict) --

              Describes a launch template and overrides.

              • LaunchTemplateSpecification (dict) --

                The launch template.

                • LaunchTemplateId (string) --

                  The ID of the launch template.

                  You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

                • LaunchTemplateName (string) --

                  The name of the launch template.

                  You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

                • Version (string) --

                  The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                  If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                  If the value is $Default , Amazon EC2 uses the default version of the launch template.

              • Overrides (list) --

                Any parameters that you specify override the same parameters in the launch template.

                • (dict) --

                  Describes overrides for a launch template.

                  • InstanceType (string) --

                    The instance type.

                  • SpotPrice (string) --

                    The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                    Warning

                    If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                  • SubnetId (string) --

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

                  • AvailabilityZone (string) --

                    The Availability Zone in which to launch the instances.

                  • WeightedCapacity (float) --

                    The number of units provided by the specified instance type.

                  • Priority (float) --

                    The priority for the launch template override. The highest priority is launched first.

                    If OnDemandAllocationStrategy is set to prioritized , Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                    If the Spot AllocationStrategy is set to capacityOptimizedPrioritized , Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                    Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

                  • InstanceRequirements (dict) --

                    The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.

                    Note

                    If you specify InstanceRequirements , you can't specify InstanceTypes .

                    • VCpuCount (dict) --

                      The minimum and maximum number of vCPUs.

                      • Min (integer) --

                        The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                      • Max (integer) --

                        The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                    • MemoryMiB (dict) --

                      The minimum and maximum amount of memory, in MiB.

                      • Min (integer) --

                        The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                    • CpuManufacturers (list) --

                      The CPU manufacturers to include.

                      • For instance types with Intel CPUs, specify intel .
                      • For instance types with AMD CPUs, specify amd .
                      • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                      Note

                      Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                      Default: Any manufacturer

                      • (string) --
                    • MemoryGiBPerVCpu (dict) --

                      The minimum and maximum amount of memory per vCPU, in GiB.

                      Default: No minimum or maximum limits

                      • Min (float) --

                        The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                      • Max (float) --

                        The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                    • ExcludedInstanceTypes (list) --

                      The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                      For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                      Default: No excluded instance types

                      • (string) --
                    • InstanceGenerations (list) --

                      Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                      For current generation instance types, specify current .

                      For previous generation instance types, specify previous .

                      Default: Current and previous generation instance types

                      • (string) --
                    • SpotMaxPricePercentageOverLowestPrice (integer) --

                      The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                      To turn off price protection, specify a high value, such as 999999 .

                      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                      Note

                      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                      Default: 100

                    • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                      The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                      To turn off price protection, specify a high value, such as 999999 .

                      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                      Note

                      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                      Default: 20

                    • BareMetal (string) --

                      Indicates whether bare metal instance types must be included, excluded, or required.

                      • To include bare metal instance types, specify included .
                      • To require only bare metal instance types, specify required .
                      • To exclude bare metal instance types, specify excluded .

                      Default: excluded

                    • BurstablePerformance (string) --

                      Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                      • To include burstable performance instance types, specify included .
                      • To require only burstable performance instance types, specify required .
                      • To exclude burstable performance instance types, specify excluded .

                      Default: excluded

                    • RequireHibernateSupport (boolean) --

                      Indicates whether instance types must support hibernation for On-Demand Instances.

                      This parameter is not supported for GetSpotPlacementScores .

                      Default: false

                    • NetworkInterfaceCount (dict) --

                      The minimum and maximum number of network interfaces.

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                    • LocalStorage (string) --

                      Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                      • To include instance types with instance store volumes, specify included .
                      • To require only instance types with instance store volumes, specify required .
                      • To exclude instance types with instance store volumes, specify excluded .

                      Default: included

                    • LocalStorageTypes (list) --

                      The type of local storage that is required.

                      • For instance types with hard disk drive (HDD) storage, specify hdd .
                      • For instance types with solid state drive (SSD) storage, specify ssd .

                      Default: hdd and ssd

                      • (string) --
                    • TotalLocalStorageGB (dict) --

                      The minimum and maximum amount of total local storage, in GB.

                      Default: No minimum or maximum limits

                      • Min (float) --

                        The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                      • Max (float) --

                        The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                    • BaselineEbsBandwidthMbps (dict) --

                      The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                    • AcceleratorTypes (list) --

                      The accelerator types that must be on the instance type.

                      • For instance types with GPU accelerators, specify gpu .
                      • For instance types with FPGA accelerators, specify fpga .
                      • For instance types with inference accelerators, specify inference .

                      Default: Any accelerator type

                      • (string) --
                    • AcceleratorCount (dict) --

                      The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                      To exclude accelerator-enabled instance types, set Max to 0 .

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                    • AcceleratorManufacturers (list) --

                      Indicates whether instance types must have accelerators by specific manufacturers.

                      • For instance types with NVIDIA devices, specify nvidia .
                      • For instance types with AMD devices, specify amd .
                      • For instance types with Amazon Web Services devices, specify amazon-web-services .
                      • For instance types with Xilinx devices, specify xilinx .

                      Default: Any manufacturer

                      • (string) --
                    • AcceleratorNames (list) --

                      The accelerators that must be on the instance type.

                      • For instance types with NVIDIA A100 GPUs, specify a100 .
                      • For instance types with NVIDIA V100 GPUs, specify v100 .
                      • For instance types with NVIDIA K80 GPUs, specify k80 .
                      • For instance types with NVIDIA T4 GPUs, specify t4 .
                      • For instance types with NVIDIA M60 GPUs, specify m60 .
                      • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                      • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                      Default: Any accelerator

                      • (string) --
                    • AcceleratorTotalMemoryMiB (dict) --

                      The minimum and maximum amount of total accelerator memory, in MiB.

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • SpotPrice (string) --

            The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

          • TargetCapacity (integer) --

            The number of units to request for the Spot Fleet. 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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

          • OnDemandTargetCapacity (integer) --

            The number of On-Demand 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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

          • OnDemandMaxTotalPrice (string) --

            The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice parameter, the spotMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

          • SpotMaxTotalPrice (string) --

            The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotdMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

          • TerminateInstancesWithExpiration (boolean) --

            Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.

          • Type (string) --

            The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request , the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain , the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain . instant is listed but is not used by Spot Fleet.

          • ValidFrom (datetime) --

            The start date and time of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). By default, Amazon EC2 starts fulfilling the request immediately.

          • ValidUntil (datetime) --

            The end date and time of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.

          • ReplaceUnhealthyInstances (boolean) --

            Indicates whether Spot Fleet should replace unhealthy instances.

          • InstanceInterruptionBehavior (string) --

            The behavior when a Spot Instance is interrupted. The default is terminate .

          • LoadBalancersConfig (dict) --

            One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.

            With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.

            • ClassicLoadBalancersConfig (dict) --

              The Classic Load Balancers.

              • ClassicLoadBalancers (list) --

                One or more Classic Load Balancers.

                • (dict) --

                  Describes a Classic Load Balancer.

                  • Name (string) --

                    The name of the load balancer.

            • TargetGroupsConfig (dict) --

              The target groups.

              • TargetGroups (list) --

                One or more target groups.

                • (dict) --

                  Describes a load balancer target group.

                  • Arn (string) --

                    The Amazon Resource Name (ARN) of the target group.

          • InstancePoolsToUseCount (integer) --

            The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price . Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

            Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

          • Context (string) --

            Reserved.

          • TargetCapacityUnitType (string) --

            The unit for the target capacity.

            Default: units (translates to number of instances)

          • TagSpecifications (list) --

            The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType must be spot-fleet-request , otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs ) or in the ` SpotFleetTagSpecification https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html`__ (valid only if you use LaunchSpecifications ). For information about tagging after launch, see Tagging Your Resources .

            • (dict) --

              The tags to apply to a resource when the resource is being created.

              Note

              The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

              • ResourceType (string) --

                The type of resource to tag on creation.

              • Tags (list) --

                The tags to apply 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 256 Unicode characters.

        • SpotFleetRequestId (string) --

          The ID of the Spot Fleet request.

        • SpotFleetRequestState (string) --

          The state of the Spot Fleet request.

        • Tags (list) --

          The tags for a Spot Fleet 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 256 Unicode characters.

Examples

This example describes the specified Spot fleet request.

response = client.describe_spot_fleet_requests(
    SpotFleetRequestIds=[
        'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    ],
)

print(response)

Expected Output:

{
    'SpotFleetRequestConfigs': [
        {
            'SpotFleetRequestConfig': {
                'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
                'LaunchSpecifications': [
                    {
                        'EbsOptimized': False,
                        'ImageId': 'ami-1a2b3c4d',
                        'InstanceType': 'cc2.8xlarge',
                        'NetworkInterfaces': [
                            {
                                'AssociatePublicIpAddress': True,
                                'DeleteOnTermination': False,
                                'DeviceIndex': 0,
                                'SecondaryPrivateIpAddressCount': 0,
                                'SubnetId': 'subnet-a61dafcf',
                            },
                        ],
                    },
                    {
                        'EbsOptimized': False,
                        'ImageId': 'ami-1a2b3c4d',
                        'InstanceType': 'r3.8xlarge',
                        'NetworkInterfaces': [
                            {
                                'AssociatePublicIpAddress': True,
                                'DeleteOnTermination': False,
                                'DeviceIndex': 0,
                                'SecondaryPrivateIpAddressCount': 0,
                                'SubnetId': 'subnet-a61dafcf',
                            },
                        ],
                    },
                ],
                'SpotPrice': '0.05',
                'TargetCapacity': 20,
            },
            'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
            'SpotFleetRequestState': 'active',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_spot_instance_requests(**kwargs)

Describes the specified Spot Instance requests.

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 .

We recommend that you set MaxResults to a value between 5 and 1000 to limit the number of results returned. This paginates the output, which makes the list more manageable and returns the results faster. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeSpotInstanceRequests request to retrieve the remaining results.

Spot Instance requests are deleted four hours after they are canceled and their instances are terminated.

See also: AWS API Documentation

Request Syntax

response = client.describe_spot_instance_requests(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    SpotInstanceRequestIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    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 EBS volume is deleted on instance termination.
    • launch.block-device-mapping.device-name - The device name for the volume in the block device mapping (for example, /dev/sdh or xvdh ).
    • launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS volume.
    • launch.block-device-mapping.volume-size - The size of the EBS volume, in GiB.
    • launch.block-device-mapping.volume-type - The type of EBS volume: gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic.
    • launch.group-id - The ID of the security group for the instance.
    • launch.group-name - The name of 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 detailed monitoring is enabled for the Spot Instance.
    • launch.ramdisk-id - The RAM disk ID.
    • launched-availability-zone - The Availability Zone in which the request is launched.
    • network-interface.addresses.primary - Indicates whether the IP address is the primary private IP address.
    • network-interface.delete-on-termination - Indicates whether the network interface is deleted when the instance is terminated.
    • network-interface.description - A description of the network interface.
    • network-interface.device-index - The index of the device for the network interface attachment on the instance.
    • network-interface.group-id - The ID of the security group associated with the network interface.
    • network-interface.network-interface-id - The ID of the network interface.
    • network-interface.private-ip-address - The primary private IP address of the network interface.
    • network-interface.subnet-id - The ID of the subnet for the instance.
    • 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 request status information can help you track your Amazon EC2 Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances .
    • 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • type - The type of Spot Instance request (one-time | persistent ).
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotInstanceRequestIds (list) --

    One or more Spot Instance request IDs.

    • (string) --
  • NextToken (string) -- The token to request the next set of results. This value is null when there are no more results to return.
  • MaxResults (integer) -- The maximum number of results to return in a single call. Specify a value between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.
Return type

dict

Returns

Response Syntax

{
    'SpotInstanceRequests': [
        {
            'ActualBlockHourlyPrice': 'string',
            'AvailabilityZoneGroup': 'string',
            'BlockDurationMinutes': 123,
            'CreateTime': datetime(2015, 1, 1),
            'Fault': {
                'Code': 'string',
                'Message': 'string'
            },
            'InstanceId': 'string',
            'LaunchGroup': 'string',
            'LaunchSpecification': {
                'UserData': 'string',
                'SecurityGroups': [
                    {
                        'GroupName': 'string',
                        'GroupId': 'string'
                    },
                ],
                'AddressingType': 'string',
                'BlockDeviceMappings': [
                    {
                        'DeviceName': 'string',
                        'VirtualName': 'string',
                        'Ebs': {
                            'DeleteOnTermination': True|False,
                            'Iops': 123,
                            'SnapshotId': 'string',
                            'VolumeSize': 123,
                            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                            'KmsKeyId': 'string',
                            'Throughput': 123,
                            'OutpostArn': 'string',
                            'Encrypted': True|False
                        },
                        'NoDevice': 'string'
                    },
                ],
                'EbsOptimized': True|False,
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Name': 'string'
                },
                'ImageId': 'string',
                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                'KernelId': 'string',
                'KeyName': 'string',
                'NetworkInterfaces': [
                    {
                        'AssociatePublicIpAddress': True|False,
                        'DeleteOnTermination': True|False,
                        'Description': 'string',
                        'DeviceIndex': 123,
                        'Groups': [
                            'string',
                        ],
                        'Ipv6AddressCount': 123,
                        'Ipv6Addresses': [
                            {
                                'Ipv6Address': 'string'
                            },
                        ],
                        'NetworkInterfaceId': 'string',
                        'PrivateIpAddress': 'string',
                        'PrivateIpAddresses': [
                            {
                                'Primary': True|False,
                                'PrivateIpAddress': 'string'
                            },
                        ],
                        'SecondaryPrivateIpAddressCount': 123,
                        'SubnetId': 'string',
                        'AssociateCarrierIpAddress': True|False,
                        'InterfaceType': 'string',
                        'NetworkCardIndex': 123,
                        'Ipv4Prefixes': [
                            {
                                'Ipv4Prefix': 'string'
                            },
                        ],
                        'Ipv4PrefixCount': 123,
                        'Ipv6Prefixes': [
                            {
                                'Ipv6Prefix': 'string'
                            },
                        ],
                        'Ipv6PrefixCount': 123
                    },
                ],
                'Placement': {
                    'AvailabilityZone': 'string',
                    'GroupName': 'string',
                    'Tenancy': 'default'|'dedicated'|'host'
                },
                'RamdiskId': 'string',
                'SubnetId': 'string',
                'Monitoring': {
                    'Enabled': True|False
                }
            },
            'LaunchedAvailabilityZone': 'string',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'SpotInstanceRequestId': 'string',
            'SpotPrice': 'string',
            'State': 'open'|'active'|'closed'|'cancelled'|'failed',
            'Status': {
                'Code': 'string',
                'Message': 'string',
                'UpdateTime': datetime(2015, 1, 1)
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Type': 'one-time'|'persistent',
            'ValidFrom': datetime(2015, 1, 1),
            'ValidUntil': datetime(2015, 1, 1),
            'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotInstanceRequests.

    • SpotInstanceRequests (list) --

      One or more Spot Instance requests.

      • (dict) --

        Describes a Spot Instance request.

        • ActualBlockHourlyPrice (string) --

          Deprecated.

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

        • BlockDurationMinutes (integer) --

          Deprecated.

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

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

        • InstanceId (string) --

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

        • LaunchGroup (string) --

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

        • LaunchSpecification (dict) --

          Additional information for launching instances.

          • UserData (string) --

            The Base64-encoded user data for the instance.

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

          • AddressingType (string) --

            Deprecated.

          • BlockDeviceMappings (list) --

            One or more block device mapping entries.

            • (dict) --

              Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

              • DeviceName (string) --

                The device name (for example, /dev/sdh or xvdh ).

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

                NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

                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.

              • Ebs (dict) --

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

                • DeleteOnTermination (boolean) --

                  Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

                • Iops (integer) --

                  The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                  The following are the supported values for each volume type:

                  • gp3 : 3,000-16,000 IOPS
                  • io1 : 100-64,000 IOPS
                  • io2 : 100-64,000 IOPS

                  For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

                  This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

                • SnapshotId (string) --

                  The ID of the snapshot.

                • VolumeSize (integer) --

                  The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                  The following are the supported volumes sizes for each volume type:

                  • gp2 and gp3 :1-16,384
                  • io1 and io2 : 4-16,384
                  • st1 and sc1 : 125-16,384
                  • standard : 1-1,024
                • VolumeType (string) --

                  The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

                • KmsKeyId (string) --

                  Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                  This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

                • Throughput (integer) --

                  The throughput that the volume supports, in MiB/s.

                  This parameter is valid only for gp3 volumes.

                  Valid Range: Minimum value of 125. Maximum value of 1000.

                • OutpostArn (string) --

                  The ARN of the Outpost on which the snapshot is stored.

                  This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

                • Encrypted (boolean) --

                  Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

                  In no case can you remove encryption from an encrypted volume.

                  Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

                  This parameter is not returned by DescribeImageAttribute .

              • NoDevice (string) --

                To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

          • 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

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

          • ImageId (string) --

            The ID of the AMI.

          • InstanceType (string) --

            The instance type. Only one instance type can be specified.

          • KernelId (string) --

            The ID of the kernel.

          • KeyName (string) --

            The name of the key pair.

          • NetworkInterfaces (list) --

            One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

            • (dict) --

              Describes a network interface.

              • AssociatePublicIpAddress (boolean) --

                Indicates whether to assign a public IPv4 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 .

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

              • Description (string) --

                The description of the network interface. Applies only if creating a network interface when launching an instance.

              • DeviceIndex (integer) --

                The position of the network interface in the attachment order. A primary network interface has a device index of 0.

                If you specify a network interface when launching an instance, you must specify the device index.

              • Groups (list) --

                The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                • (string) --
              • Ipv6AddressCount (integer) --

                A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

              • Ipv6Addresses (list) --

                One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                • (dict) --

                  Describes an IPv6 address.

                  • Ipv6Address (string) --

                    The IPv6 address.

              • NetworkInterfaceId (string) --

                The ID of the network interface.

                If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

              • PrivateIpAddress (string) --

                The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • PrivateIpAddresses (list) --

                One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                • (dict) --

                  Describes a secondary private IPv4 address for a network interface.

                  • Primary (boolean) --

                    Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                  • PrivateIpAddress (string) --

                    The private IPv4 addresses.

              • SecondaryPrivateIpAddressCount (integer) --

                The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • SubnetId (string) --

                The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

              • AssociateCarrierIpAddress (boolean) --

                Indicates whether to assign a carrier IP address to the network interface.

                You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

              • InterfaceType (string) --

                The type of network interface.

                Valid values: interface | efa

              • NetworkCardIndex (integer) --

                The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

                If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

              • Ipv4Prefixes (list) --

                One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

              • Ipv4PrefixCount (integer) --

                The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

              • Ipv6Prefixes (list) --

                One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

                • (dict) --

                  Describes the IPv4 prefix option for a network interface.

                  • Ipv6Prefix (string) --

                    The IPv6 prefix.

              • Ipv6PrefixCount (integer) --

                The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

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

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

          • RamdiskId (string) --

            The ID of the RAM disk.

          • SubnetId (string) --

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

          • Monitoring (dict) --

            Describes the monitoring of an instance.

            • Enabled (boolean) --

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • LaunchedAvailabilityZone (string) --

          The Availability Zone in which the request is launched.

        • ProductDescription (string) --

          The product description associated with the Spot Instance.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • SpotPrice (string) --

          The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • State (string) --

          The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances .

        • 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 request status codes in the Amazon EC2 User Guide for Linux Instances .

          • Message (string) --

            The description for the status code.

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

        • 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 256 Unicode characters.

        • Type (string) --

          The Spot Instance request type.

        • 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 (YYYY -MM -DD T*HH* :MM :SS Z).

          • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.
          • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.
        • InstanceInterruptionBehavior (string) --

          The behavior when a Spot Instance is interrupted.

    • NextToken (string) --

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

Examples

This example describes the specified Spot Instance request.

response = client.describe_spot_instance_requests(
    SpotInstanceRequestIds=[
        'sir-08b93456',
    ],
)

print(response)

Expected Output:

{
    'SpotInstanceRequests': [
        {
            'CreateTime': datetime(2014, 4, 30, 18, 14, 55, 2, 120, 0),
            'InstanceId': 'i-1234567890abcdef0',
            'LaunchSpecification': {
                'BlockDeviceMappings': [
                    {
                        'DeviceName': '/dev/sda1',
                        'Ebs': {
                            'DeleteOnTermination': True,
                            'VolumeSize': 8,
                            'VolumeType': 'standard',
                        },
                    },
                ],
                'EbsOptimized': False,
                'ImageId': 'ami-7aba833f',
                'InstanceType': 'm1.small',
                'KeyName': 'my-key-pair',
                'SecurityGroups': [
                    {
                        'GroupId': 'sg-e38f24a7',
                        'GroupName': 'my-security-group',
                    },
                ],
            },
            'LaunchedAvailabilityZone': 'us-west-1b',
            'ProductDescription': 'Linux/UNIX',
            'SpotInstanceRequestId': 'sir-08b93456',
            'SpotPrice': '0.010000',
            'State': 'active',
            'Status': {
                'Code': 'fulfilled',
                'Message': 'Your Spot request is fulfilled.',
                'UpdateTime': datetime(2014, 4, 30, 18, 16, 21, 2, 120, 0),
            },
            'Type': 'one-time',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_spot_price_history(**kwargs)

Describes the Spot price history. For more information, see Spot Instance pricing history in the Amazon EC2 User Guide for Linux Instances .

When you specify a start and end time, the operation returns the prices of the instance types within that time range. It also returns the last price change before the start time, which is the effective price as of the start time.

See also: AWS API Documentation

Request Syntax

response = client.describe_spot_price_history(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    AvailabilityZone='string',
    DryRun=True|False,
    EndTime=datetime(2015, 1, 1),
    InstanceTypes=[
        'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    ],
    MaxResults=123,
    NextToken='string',
    ProductDescriptions=[
        'string',
    ],
    StartTime=datetime(2015, 1, 1)
)
Parameters
  • Filters (list) --

    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 | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • AvailabilityZone (string) -- Filters the results by the specified Availability Zone.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EndTime (datetime) -- 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).
  • InstanceTypes (list) --

    Filters the results by the specified instance types.

    • (string) --
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
  • ProductDescriptions (list) --

    Filters the results by the specified basic product descriptions.

    • (string) --
  • StartTime (datetime) -- 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).
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'SpotPriceHistory': [
        {
            'AvailabilityZone': 'string',
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'SpotPrice': 'string',
            'Timestamp': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotPriceHistory.

    • NextToken (string) --

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

    • SpotPriceHistory (list) --

      The historical Spot prices.

      • (dict) --

        The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

        Warning

        If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • AvailabilityZone (string) --

          The Availability Zone.

        • InstanceType (string) --

          The instance type.

        • ProductDescription (string) --

          A general description of the AMI.

        • SpotPrice (string) --

          The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • Timestamp (datetime) --

          The date and time the request was created, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

Examples

This example returns the Spot Price history for m1.xlarge, Linux/UNIX (Amazon VPC) instances for a particular day in January.

response = client.describe_spot_price_history(
    EndTime=datetime(2014, 1, 6, 8, 9, 10, 0, 6, -1),
    InstanceTypes=[
        'm1.xlarge',
    ],
    ProductDescriptions=[
        'Linux/UNIX (Amazon VPC)',
    ],
    StartTime=datetime(2014, 1, 6, 7, 8, 9, 0, 6, -1),
)

print(response)

Expected Output:

{
    'SpotPriceHistory': [
        {
            'AvailabilityZone': 'us-west-1a',
            'InstanceType': 'm1.xlarge',
            'ProductDescription': 'Linux/UNIX (Amazon VPC)',
            'SpotPrice': '0.080000',
            'Timestamp': datetime(2014, 1, 6, 4, 32, 53, 0, 6, 0),
        },
        {
            'AvailabilityZone': 'us-west-1c',
            'InstanceType': 'm1.xlarge',
            'ProductDescription': 'Linux/UNIX (Amazon VPC)',
            'SpotPrice': '0.080000',
            'Timestamp': datetime(2014, 1, 5, 11, 28, 26, 6, 5, 0),
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_stale_security_groups(**kwargs)

[VPC only] Describes the stale security group rules for security groups in a specified VPC. Rules are stale when they reference a deleted security group in the same VPC or in a peer VPC, or if they reference a security group in a peer VPC for which the VPC peering connection has been deleted.

See also: AWS API Documentation

Request Syntax

response = client.describe_stale_security_groups(
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.
  • NextToken (string) -- The token for the next set of items to return. (You received this token from a prior call.)
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'StaleSecurityGroupSet': [
        {
            'Description': 'string',
            'GroupId': 'string',
            'GroupName': 'string',
            'StaleIpPermissions': [
                {
                    'FromPort': 123,
                    'IpProtocol': 'string',
                    'IpRanges': [
                        'string',
                    ],
                    'PrefixListIds': [
                        'string',
                    ],
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'Description': 'string',
                            'GroupId': 'string',
                            'GroupName': 'string',
                            'PeeringStatus': 'string',
                            'UserId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string'
                        },
                    ]
                },
            ],
            'StaleIpPermissionsEgress': [
                {
                    'FromPort': 123,
                    'IpProtocol': 'string',
                    'IpRanges': [
                        'string',
                    ],
                    'PrefixListIds': [
                        'string',
                    ],
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'Description': 'string',
                            'GroupId': 'string',
                            'GroupName': 'string',
                            'PeeringStatus': 'string',
                            'UserId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string'
                        },
                    ]
                },
            ],
            'VpcId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

    • StaleSecurityGroupSet (list) --

      Information about the stale security groups.

      • (dict) --

        Describes a stale security group (a security group that contains stale rules).

        • Description (string) --

          The description of the security group.

        • GroupId (string) --

          The ID of the security group.

        • GroupName (string) --

          The name of the security group.

        • StaleIpPermissions (list) --

          Information about the stale inbound rules in the security group.

          • (dict) --

            Describes a stale rule in a security group.

            • FromPort (integer) --

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

            • IpProtocol (string) --

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

            • IpRanges (list) --

              The IP ranges. Not applicable for stale security group rules.

              • (string) --
            • PrefixListIds (list) --

              The prefix list IDs. Not applicable for stale security group rules.

              • (string) --
            • ToPort (integer) --

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

            • UserIdGroupPairs (list) --

              The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

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

        • StaleIpPermissionsEgress (list) --

          Information about the stale outbound rules in the security group.

          • (dict) --

            Describes a stale rule in a security group.

            • FromPort (integer) --

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

            • IpProtocol (string) --

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

            • IpRanges (list) --

              The IP ranges. Not applicable for stale security group rules.

              • (string) --
            • PrefixListIds (list) --

              The prefix list IDs. Not applicable for stale security group rules.

              • (string) --
            • ToPort (integer) --

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

            • UserIdGroupPairs (list) --

              The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

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

        • VpcId (string) --

          The ID of the VPC for the security group.

describe_store_image_tasks(**kwargs)

Describes the progress of the AMI store tasks. You can describe the store tasks for specified AMIs. If you don't specify the AMIs, you get a paginated list of store tasks from the last 31 days.

For each AMI task, the response indicates if the task is InProgress , Completed , or Failed . For tasks InProgress , the response shows the estimated progress as a percentage.

Tasks are listed in reverse chronological order. Currently, only tasks from the past 31 days can be viewed.

To use this API, you must have the required permissions. For more information, see Permissions for storing and restoring AMIs using Amazon S3 in the Amazon Elastic Compute Cloud User Guide .

For more information, see Store and restore an AMI using Amazon S3 in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_store_image_tasks(
    ImageIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • ImageIds (list) --

    The AMI IDs for which to show progress. Up to 20 AMI IDs can be included in a request.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • task-state - Returns tasks in a certain state (InProgress | Completed | Failed )
    • bucket - Returns task information for tasks that targeted a specific bucket. For the filter value, specify the bucket name.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 1 and 200. You cannot specify this parameter and the ImageIDs parameter in the same call.
Return type

dict

Returns

Response Syntax

{
    'StoreImageTaskResults': [
        {
            'AmiId': 'string',
            'TaskStartTime': datetime(2015, 1, 1),
            'Bucket': 'string',
            'S3objectKey': 'string',
            'ProgressPercentage': 123,
            'StoreTaskState': 'string',
            'StoreTaskFailureReason': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • StoreImageTaskResults (list) --

      The information about the AMI store tasks.

      • (dict) --

        The information about the AMI store task, including the progress of the task.

        • AmiId (string) --

          The ID of the AMI that is being stored.

        • TaskStartTime (datetime) --

          The time the task started.

        • Bucket (string) --

          The name of the Amazon S3 bucket that contains the stored AMI object.

        • S3objectKey (string) --

          The name of the stored AMI object in the bucket.

        • ProgressPercentage (integer) --

          The progress of the task as a percentage.

        • StoreTaskState (string) --

          The state of the store task (InProgress , Completed , or Failed ).

        • StoreTaskFailureReason (string) --

          If the tasks fails, the reason for the failure is returned. If the task succeeds, null is returned.

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

describe_subnets(**kwargs)

Describes one or more of your subnets.

For more information, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_subnets(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SubnetIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • availability-zone - The Availability Zone for the subnet. You can also use availabilityZone as the filter name.
    • availability-zone-id - The ID of the Availability Zone for the subnet. You can also use availabilityZoneId as the filter name.
    • available-ip-address-count - The number of IPv4 addresses in the subnet that are available.
    • cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.
    • default-for-az - Indicates whether this is the default subnet for the Availability Zone (true | false ). You can also use defaultForAz as the filter name.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the subnet.
    • ipv6-native - Indicates whether this is an IPv6 only subnet (true | false ).
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the subnet.
    • state - The state of the subnet (pending | available ).
    • subnet-arn - The Amazon Resource Name (ARN) of the subnet.
    • subnet-id - The ID of the subnet.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the subnet.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • SubnetIds (list) --

    One or more subnet IDs.

    Default: Describes all your subnets.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'Subnets': [
        {
            'AvailabilityZone': 'string',
            'AvailabilityZoneId': 'string',
            'AvailableIpAddressCount': 123,
            'CidrBlock': 'string',
            'DefaultForAz': True|False,
            'EnableLniAtDeviceIndex': 123,
            'MapPublicIpOnLaunch': True|False,
            'MapCustomerOwnedIpOnLaunch': True|False,
            'CustomerOwnedIpv4Pool': 'string',
            'State': 'pending'|'available',
            'SubnetId': 'string',
            'VpcId': 'string',
            'OwnerId': 'string',
            'AssignIpv6AddressOnCreation': True|False,
            'Ipv6CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'Ipv6CidrBlock': 'string',
                    'Ipv6CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'SubnetArn': 'string',
            'OutpostArn': 'string',
            'EnableDns64': True|False,
            'Ipv6Native': True|False,
            'PrivateDnsNameOptionsOnLaunch': {
                'HostnameType': 'ip-name'|'resource-name',
                'EnableResourceNameDnsARecord': True|False,
                'EnableResourceNameDnsAAAARecord': True|False
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Subnets (list) --

      Information about one or more subnets.

      • (dict) --

        Describes a subnet.

        • AvailabilityZone (string) --

          The Availability Zone of the subnet.

        • AvailabilityZoneId (string) --

          The AZ ID of the subnet.

        • AvailableIpAddressCount (integer) --

          The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

        • CidrBlock (string) --

          The IPv4 CIDR block assigned to the subnet.

        • DefaultForAz (boolean) --

          Indicates whether this is the default subnet for the Availability Zone.

        • EnableLniAtDeviceIndex (integer) --

          Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).

        • MapPublicIpOnLaunch (boolean) --

          Indicates whether instances launched in this subnet receive a public IPv4 address.

        • MapCustomerOwnedIpOnLaunch (boolean) --

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives a customer-owned IPv4 address.

        • CustomerOwnedIpv4Pool (string) --

          The customer-owned IPv4 address pool associated with the subnet.

        • State (string) --

          The current state of the subnet.

        • SubnetId (string) --

          The ID of the subnet.

        • VpcId (string) --

          The ID of the VPC the subnet is in.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the subnet.

        • AssignIpv6AddressOnCreation (boolean) --

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives an IPv6 address.

        • Ipv6CidrBlockAssociationSet (list) --

          Information about the IPv6 CIDR blocks associated with the subnet.

          • (dict) --

            Describes an association between a subnet and an IPv6 CIDR block.

            • AssociationId (string) --

              The ID of the association.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

            • Ipv6CidrBlockState (dict) --

              The state of the CIDR block.

              • State (string) --

                The state of a CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

        • Tags (list) --

          Any tags assigned to the subnet.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • SubnetArn (string) --

          The Amazon Resource Name (ARN) of the subnet.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • EnableDns64 (boolean) --

          Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

        • Ipv6Native (boolean) --

          Indicates whether this is an IPv6 only subnet.

        • PrivateDnsNameOptionsOnLaunch (dict) --

          The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.

          • HostnameType (string) --

            The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

          • EnableResourceNameDnsARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

          • EnableResourceNameDnsAAAARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.

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

Examples

This example describes the subnets for the specified VPC.

response = client.describe_subnets(
    Filters=[
        {
            'Name': 'vpc-id',
            'Values': [
                'vpc-a01106c2',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'Subnets': [
        {
            'AvailabilityZone': 'us-east-1c',
            'AvailableIpAddressCount': 251,
            'CidrBlock': '10.0.1.0/24',
            'DefaultForAz': False,
            'MapPublicIpOnLaunch': False,
            'State': 'available',
            'SubnetId': 'subnet-9d4a7b6c',
            'VpcId': 'vpc-a01106c2',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_tags(**kwargs)

Describes the specified tags for your EC2 resources.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_tags(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • key - The tag key.
    • resource-id - The ID of the resource.
    • resource-type - The resource type (customer-gateway | dedicated-host | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | instance | internet-gateway | key-pair | launch-template | natgateway | network-acl | network-interface | placement-group | reserved-instances | route-table | security-group | snapshot | spot-instances-request | subnet | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway ).
    • tag :<key> - The key/value combination of the tag. For example, specify "tag:Owner" for the filter name and "TeamA" for the filter value to find resources with the tag "Owner=TeamA".
    • value - The tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. This value can be between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'Tags': [
        {
            'Key': 'string',
            'ResourceId': 'string',
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

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

    • Tags (list) --

      The tags.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The tag key.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The resource type.

        • Value (string) --

          The tag value.

Examples

This example describes the tags for the specified instance.

response = client.describe_tags(
    Filters=[
        {
            'Name': 'resource-id',
            'Values': [
                'i-1234567890abcdef8',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'Tags': [
        {
            'Key': 'Stack',
            'ResourceId': 'i-1234567890abcdef8',
            'ResourceType': 'instance',
            'Value': 'test',
        },
        {
            'Key': 'Name',
            'ResourceId': 'i-1234567890abcdef8',
            'ResourceType': 'instance',
            'Value': 'Beta Server',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_traffic_mirror_filters(**kwargs)

Describes one or more Traffic Mirror filters.

See also: AWS API Documentation

Request Syntax

response = client.describe_traffic_mirror_filters(
    TrafficMirrorFilterIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • TrafficMirrorFilterIds (list) --

    The ID of the Traffic Mirror filter.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters. The possible values are:

    • description : The Traffic Mirror filter description.
    • traffic-mirror-filter-id : The ID of the Traffic Mirror filter.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilters': [
        {
            'TrafficMirrorFilterId': 'string',
            'IngressFilterRules': [
                {
                    'TrafficMirrorFilterRuleId': 'string',
                    'TrafficMirrorFilterId': 'string',
                    'TrafficDirection': 'ingress'|'egress',
                    'RuleNumber': 123,
                    'RuleAction': 'accept'|'reject',
                    'Protocol': 123,
                    'DestinationPortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'SourcePortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'DestinationCidrBlock': 'string',
                    'SourceCidrBlock': 'string',
                    'Description': 'string'
                },
            ],
            'EgressFilterRules': [
                {
                    'TrafficMirrorFilterRuleId': 'string',
                    'TrafficMirrorFilterId': 'string',
                    'TrafficDirection': 'ingress'|'egress',
                    'RuleNumber': 123,
                    'RuleAction': 'accept'|'reject',
                    'Protocol': 123,
                    'DestinationPortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'SourcePortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'DestinationCidrBlock': 'string',
                    'SourceCidrBlock': 'string',
                    'Description': 'string'
                },
            ],
            'NetworkServices': [
                'amazon-dns',
            ],
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorFilters (list) --

      Information about one or more Traffic Mirror filters.

      • (dict) --

        Describes the Traffic Mirror filter.

        • TrafficMirrorFilterId (string) --

          The ID of the Traffic Mirror filter.

        • IngressFilterRules (list) --

          Information about the ingress rules that are associated with the Traffic Mirror filter.

          • (dict) --

            Describes the Traffic Mirror rule.

            • TrafficMirrorFilterRuleId (string) --

              The ID of the Traffic Mirror rule.

            • TrafficMirrorFilterId (string) --

              The ID of the Traffic Mirror filter that the rule is associated with.

            • TrafficDirection (string) --

              The traffic direction assigned to the Traffic Mirror rule.

            • RuleNumber (integer) --

              The rule number of the Traffic Mirror rule.

            • RuleAction (string) --

              The action assigned to the Traffic Mirror rule.

            • Protocol (integer) --

              The protocol assigned to the Traffic Mirror rule.

            • DestinationPortRange (dict) --

              The destination port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • SourcePortRange (dict) --

              The source port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • DestinationCidrBlock (string) --

              The destination CIDR block assigned to the Traffic Mirror rule.

            • SourceCidrBlock (string) --

              The source CIDR block assigned to the Traffic Mirror rule.

            • Description (string) --

              The description of the Traffic Mirror rule.

        • EgressFilterRules (list) --

          Information about the egress rules that are associated with the Traffic Mirror filter.

          • (dict) --

            Describes the Traffic Mirror rule.

            • TrafficMirrorFilterRuleId (string) --

              The ID of the Traffic Mirror rule.

            • TrafficMirrorFilterId (string) --

              The ID of the Traffic Mirror filter that the rule is associated with.

            • TrafficDirection (string) --

              The traffic direction assigned to the Traffic Mirror rule.

            • RuleNumber (integer) --

              The rule number of the Traffic Mirror rule.

            • RuleAction (string) --

              The action assigned to the Traffic Mirror rule.

            • Protocol (integer) --

              The protocol assigned to the Traffic Mirror rule.

            • DestinationPortRange (dict) --

              The destination port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • SourcePortRange (dict) --

              The source port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • DestinationCidrBlock (string) --

              The destination CIDR block assigned to the Traffic Mirror rule.

            • SourceCidrBlock (string) --

              The source CIDR block assigned to the Traffic Mirror rule.

            • Description (string) --

              The description of the Traffic Mirror rule.

        • NetworkServices (list) --

          The network service traffic that is associated with the Traffic Mirror filter.

          • (string) --
        • Description (string) --

          The description of the Traffic Mirror filter.

        • Tags (list) --

          The tags assigned to the Traffic Mirror filter.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

    • NextToken (string) --

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

describe_traffic_mirror_sessions(**kwargs)

Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

See also: AWS API Documentation

Request Syntax

response = client.describe_traffic_mirror_sessions(
    TrafficMirrorSessionIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • TrafficMirrorSessionIds (list) --

    The ID of the Traffic Mirror session.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters. The possible values are:

    • description : The Traffic Mirror session description.
    • network-interface-id : The ID of the Traffic Mirror session network interface.
    • owner-id : The ID of the account that owns the Traffic Mirror session.
    • packet-length : The assigned number of packets to mirror.
    • session-number : The assigned session number.
    • traffic-mirror-filter-id : The ID of the Traffic Mirror filter.
    • traffic-mirror-session-id : The ID of the Traffic Mirror session.
    • traffic-mirror-target-id : The ID of the Traffic Mirror target.
    • virtual-network-id : The virtual network ID of the Traffic Mirror session.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorSessions': [
        {
            'TrafficMirrorSessionId': 'string',
            'TrafficMirrorTargetId': 'string',
            'TrafficMirrorFilterId': 'string',
            'NetworkInterfaceId': 'string',
            'OwnerId': 'string',
            'PacketLength': 123,
            'SessionNumber': 123,
            'VirtualNetworkId': 123,
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorSessions (list) --

      Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

      • (dict) --

        Describes a Traffic Mirror session.

        • TrafficMirrorSessionId (string) --

          The ID for the Traffic Mirror session.

        • TrafficMirrorTargetId (string) --

          The ID of the Traffic Mirror target.

        • TrafficMirrorFilterId (string) --

          The ID of the Traffic Mirror filter.

        • NetworkInterfaceId (string) --

          The ID of the Traffic Mirror session's network interface.

        • OwnerId (string) --

          The ID of the account that owns the Traffic Mirror session.

        • PacketLength (integer) --

          The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet

        • SessionNumber (integer) --

          The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

          Valid values are 1-32766.

        • VirtualNetworkId (integer) --

          The virtual network ID associated with the Traffic Mirror session.

        • Description (string) --

          The description of the Traffic Mirror session.

        • Tags (list) --

          The tags assigned to the Traffic Mirror session.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

    • NextToken (string) --

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

describe_traffic_mirror_targets(**kwargs)

Information about one or more Traffic Mirror targets.

See also: AWS API Documentation

Request Syntax

response = client.describe_traffic_mirror_targets(
    TrafficMirrorTargetIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • TrafficMirrorTargetIds (list) --

    The ID of the Traffic Mirror targets.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters. The possible values are:

    • description : The Traffic Mirror target description.
    • network-interface-id : The ID of the Traffic Mirror session network interface.
    • network-load-balancer-arn : The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session.
    • owner-id : The ID of the account that owns the Traffic Mirror session.
    • traffic-mirror-target-id : The ID of the Traffic Mirror target.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorTargets': [
        {
            'TrafficMirrorTargetId': 'string',
            'NetworkInterfaceId': 'string',
            'NetworkLoadBalancerArn': 'string',
            'Type': 'network-interface'|'network-load-balancer'|'gateway-load-balancer-endpoint',
            'Description': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'GatewayLoadBalancerEndpointId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TrafficMirrorTargets (list) --

      Information about one or more Traffic Mirror targets.

      • (dict) --

        Describes a Traffic Mirror target.

        • TrafficMirrorTargetId (string) --

          The ID of the Traffic Mirror target.

        • NetworkInterfaceId (string) --

          The network interface ID that is attached to the target.

        • NetworkLoadBalancerArn (string) --

          The Amazon Resource Name (ARN) of the Network Load Balancer.

        • Type (string) --

          The type of Traffic Mirror target.

        • Description (string) --

          Information about the Traffic Mirror target.

        • OwnerId (string) --

          The ID of the account that owns the Traffic Mirror target.

        • Tags (list) --

          The tags assigned to the Traffic Mirror target.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • GatewayLoadBalancerEndpointId (string) --

          The ID of the Gateway Load Balancer endpoint.

    • NextToken (string) --

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

describe_transit_gateway_attachments(**kwargs)

Describes one or more attachments between resources and transit gateways. By default, all attachments are described. Alternatively, you can filter the results by attachment ID, attachment state, resource ID, or resource owner.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_attachments(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    The IDs of the attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • association.state - The state of the association (associating | associated | disassociating ).
    • association.transit-gateway-route-table-id - The ID of the route table for the transit gateway.
    • resource-id - The ID of the resource.
    • resource-owner-id - The ID of the Amazon Web Services account that owns the resource.
    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect .
    • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting .
    • transit-gateway-attachment-id - The ID of the attachment.
    • transit-gateway-id - The ID of the transit gateway.
    • transit-gateway-owner-id - The ID of the Amazon Web Services account that owns the transit gateway.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayAttachments': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransitGatewayId': 'string',
            'TransitGatewayOwnerId': 'string',
            'ResourceOwnerId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceId': 'string',
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'Association': {
                'TransitGatewayRouteTableId': 'string',
                'State': 'associating'|'associated'|'disassociating'|'disassociated'
            },
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayAttachments (list) --

      Information about the attachments.

      • (dict) --

        Describes an attachment between a resource and a transit gateway.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • TransitGatewayOwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • ResourceOwnerId (string) --

          The ID of the Amazon Web Services account that owns the resource.

        • ResourceType (string) --

          The resource type. Note that the tgw-peering resource type has been deprecated.

        • ResourceId (string) --

          The ID of the resource.

        • State (string) --

          The attachment state. Note that the initiating state has been deprecated.

        • Association (dict) --

          The association.

          • TransitGatewayRouteTableId (string) --

            The ID of the route table for the transit gateway.

          • State (string) --

            The state of the association.

        • CreationTime (datetime) --

          The creation time.

        • Tags (list) --

          The tags for the attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_transit_gateway_connect_peers(**kwargs)

Describes one or more Connect peers.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_connect_peers(
    TransitGatewayConnectPeerIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayConnectPeerIds (list) --

    The IDs of the Connect peers.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • state - The state of the Connect peer (pending | available | deleting | deleted ).
    • transit-gateway-attachment-id - The ID of the attachment.
    • transit-gateway-connect-peer-id - The ID of the Connect peer.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnectPeers': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransitGatewayConnectPeerId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'ConnectPeerConfiguration': {
                'TransitGatewayAddress': 'string',
                'PeerAddress': 'string',
                'InsideCidrBlocks': [
                    'string',
                ],
                'Protocol': 'gre',
                'BgpConfigurations': [
                    {
                        'TransitGatewayAsn': 123,
                        'PeerAsn': 123,
                        'TransitGatewayAddress': 'string',
                        'PeerAddress': 'string',
                        'BgpStatus': 'up'|'down'
                    },
                ]
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayConnectPeers (list) --

      Information about the Connect peers.

      • (dict) --

        Describes a transit gateway Connect peer.

        • TransitGatewayAttachmentId (string) --

          The ID of the Connect attachment.

        • TransitGatewayConnectPeerId (string) --

          The ID of the Connect peer.

        • State (string) --

          The state of the Connect peer.

        • CreationTime (datetime) --

          The creation time.

        • ConnectPeerConfiguration (dict) --

          The Connect peer details.

          • TransitGatewayAddress (string) --

            The Connect peer IP address on the transit gateway side of the tunnel.

          • PeerAddress (string) --

            The Connect peer IP address on the appliance side of the tunnel.

          • InsideCidrBlocks (list) --

            The range of interior BGP peer IP addresses.

            • (string) --
          • Protocol (string) --

            The tunnel protocol.

          • BgpConfigurations (list) --

            The BGP configuration details.

            • (dict) --

              The BGP configuration information.

              • TransitGatewayAsn (integer) --

                The transit gateway Autonomous System Number (ASN).

              • PeerAsn (integer) --

                The peer Autonomous System Number (ASN).

              • TransitGatewayAddress (string) --

                The interior BGP peer IP address for the transit gateway.

              • PeerAddress (string) --

                The interior BGP peer IP address for the appliance.

              • BgpStatus (string) --

                The BGP status.

        • Tags (list) --

          The tags for the Connect peer.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_transit_gateway_connects(**kwargs)

Describes one or more Connect attachments.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_connects(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    The IDs of the attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • options.protocol - The tunnel protocol (gre ).
    • state - The state of the attachment (initiating | initiatingRequest | pendingAcceptance | rollingBack | pending | available | modifying | deleting | deleted | failed | rejected | rejecting | failing ).
    • transit-gateway-attachment-id - The ID of the Connect attachment.
    • transit-gateway-id - The ID of the transit gateway.
    • transport-transit-gateway-attachment-id - The ID of the transit gateway attachment from which the Connect attachment was created.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnects': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransportTransitGatewayAttachmentId': 'string',
            'TransitGatewayId': 'string',
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'CreationTime': datetime(2015, 1, 1),
            'Options': {
                'Protocol': 'gre'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayConnects (list) --

      Information about the Connect attachments.

      • (dict) --

        Describes a transit gateway Connect attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the Connect attachment.

        • TransportTransitGatewayAttachmentId (string) --

          The ID of the attachment from which the Connect attachment was created.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • State (string) --

          The state of the attachment.

        • CreationTime (datetime) --

          The creation time.

        • Options (dict) --

          The Connect attachment options.

          • Protocol (string) --

            The tunnel protocol.

        • Tags (list) --

          The tags for the attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_transit_gateway_multicast_domains(**kwargs)

Describes one or more transit gateway multicast domains.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_multicast_domains(
    TransitGatewayMulticastDomainIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainIds (list) --

    The ID of the transit gateway multicast domain.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • state - The state of the transit gateway multicast domain. Valid values are pending | available | deleting | deleted .
    • transit-gateway-id - The ID of the transit gateway.
    • transit-gateway-multicast-domain-id - The ID of the transit gateway multicast domain.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayMulticastDomains': [
        {
            'TransitGatewayMulticastDomainId': 'string',
            'TransitGatewayId': 'string',
            'TransitGatewayMulticastDomainArn': 'string',
            'OwnerId': 'string',
            'Options': {
                'Igmpv2Support': 'enable'|'disable',
                'StaticSourcesSupport': 'enable'|'disable',
                'AutoAcceptSharedAssociations': 'enable'|'disable'
            },
            'State': 'pending'|'available'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayMulticastDomains (list) --

      Information about the transit gateway multicast domains.

      • (dict) --

        Describes the transit gateway multicast domain.

        • TransitGatewayMulticastDomainId (string) --

          The ID of the transit gateway multicast domain.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • TransitGatewayMulticastDomainArn (string) --

          The Amazon Resource Name (ARN) of the transit gateway multicast domain.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain.

        • Options (dict) --

          The options for the transit gateway multicast domain.

          • Igmpv2Support (string) --

            Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.

          • StaticSourcesSupport (string) --

            Indicates whether support for statically configuring transit gateway multicast group sources is turned on.

          • AutoAcceptSharedAssociations (string) --

            Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.

        • State (string) --

          The state of the transit gateway multicast domain.

        • CreationTime (datetime) --

          The time the transit gateway multicast domain was created.

        • Tags (list) --

          The tags for the transit gateway multicast domain.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_transit_gateway_peering_attachments(**kwargs)

Describes your transit gateway peering attachments.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_peering_attachments(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    One or more IDs of the transit gateway peering attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • transit-gateway-attachment-id - The ID of the transit gateway attachment.
    • local-owner-id - The ID of your Amazon Web Services account.
    • remote-owner-id - The ID of the Amazon Web Services account in the remote Region that owns the transit gateway.
    • state - The state of the peering attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • transit-gateway-id - The ID of the transit gateway.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPeeringAttachments': [
        {
            'TransitGatewayAttachmentId': 'string',
            'AccepterTransitGatewayAttachmentId': 'string',
            'RequesterTgwInfo': {
                'TransitGatewayId': 'string',
                'CoreNetworkId': 'string',
                'OwnerId': 'string',
                'Region': 'string'
            },
            'AccepterTgwInfo': {
                'TransitGatewayId': 'string',
                'CoreNetworkId': 'string',
                'OwnerId': 'string',
                'Region': 'string'
            },
            'Options': {
                'DynamicRouting': 'enable'|'disable'
            },
            'Status': {
                'Code': 'string',
                'Message': 'string'
            },
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayPeeringAttachments (list) --

      The transit gateway peering attachments.

      • (dict) --

        Describes the transit gateway peering attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway peering attachment.

        • AccepterTransitGatewayAttachmentId (string) --

          The ID of the accepter transit gateway attachment.

        • RequesterTgwInfo (dict) --

          Information about the requester transit gateway.

          • TransitGatewayId (string) --

            The ID of the transit gateway.

          • CoreNetworkId (string) --

            The ID of the core network where the transit gateway peer is located.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region (string) --

            The Region of the transit gateway.

        • AccepterTgwInfo (dict) --

          Information about the accepter transit gateway.

          • TransitGatewayId (string) --

            The ID of the transit gateway.

          • CoreNetworkId (string) --

            The ID of the core network where the transit gateway peer is located.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region (string) --

            The Region of the transit gateway.

        • Options (dict) --

          Details about the transit gateway peering attachment.

          • DynamicRouting (string) --

            Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.

        • Status (dict) --

          The status of the transit gateway peering attachment.

          • Code (string) --

            The status code.

          • Message (string) --

            The status message, if applicable.

        • State (string) --

          The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

        • CreationTime (datetime) --

          The time the transit gateway peering attachment was created.

        • Tags (list) --

          The tags for the transit gateway peering attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_transit_gateway_policy_tables(**kwargs)

Describes one or more transit gateway route policy tables.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_policy_tables(
    TransitGatewayPolicyTableIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayPolicyTableIds (list) --

    The IDs of the transit gateway policy tables.

    • (string) --
  • Filters (list) --

    The filters associated with the transit gateway policy table.

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPolicyTables': [
        {
            'TransitGatewayPolicyTableId': 'string',
            'TransitGatewayId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayPolicyTables (list) --

      Describes the transit gateway policy tables.

      • (dict) --

        Describes a transit gateway policy table.

        • TransitGatewayPolicyTableId (string) --

          The ID of the transit gateway policy table.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • State (string) --

          The state of the transit gateway policy table

        • CreationTime (datetime) --

          The timestamp when the transit gateway policy table was created.

        • Tags (list) --

          he key-value pairs associated with the transit gateway policy table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

    • NextToken (string) --

      The token for the next page of results.

describe_transit_gateway_route_table_announcements(**kwargs)

Describes one or more transit gateway route table advertisements.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_route_table_announcements(
    TransitGatewayRouteTableAnnouncementIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableAnnouncementIds (list) --

    The IDs of the transit gateway route tables that are being advertised.

    • (string) --
  • Filters (list) --

    The filters associated with the transit gateway policy table.

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTableAnnouncements': [
        {
            'TransitGatewayRouteTableAnnouncementId': 'string',
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'PeerTransitGatewayId': 'string',
            'PeerCoreNetworkId': 'string',
            'PeeringAttachmentId': 'string',
            'AnnouncementDirection': 'outgoing'|'incoming',
            'TransitGatewayRouteTableId': 'string',
            'State': 'available'|'pending'|'failing'|'failed'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayRouteTableAnnouncements (list) --

      Describes the transit gateway route table announcement.

      • (dict) --

        Describes a transit gateway route table announcement.

        • TransitGatewayRouteTableAnnouncementId (string) --

          The ID of the transit gateway route table announcement.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network for the transit gateway route table announcement.

        • PeerTransitGatewayId (string) --

          The ID of the peer transit gateway.

        • PeerCoreNetworkId (string) --

          The ID of the core network ID for the peer.

        • PeeringAttachmentId (string) --

          The ID of the peering attachment.

        • AnnouncementDirection (string) --

          The direction for the route table announcement.

        • TransitGatewayRouteTableId (string) --

          The ID of the transit gateway route table.

        • State (string) --

          The state of the transit gateway announcement.

        • CreationTime (datetime) --

          The timestamp when the transit gateway route table announcement was created.

        • Tags (list) --

          The key-value pairs associated with the route table announcement.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

    • NextToken (string) --

      The token for the next page of results.

describe_transit_gateway_route_tables(**kwargs)

Describes one or more transit gateway route tables. By default, all transit gateway route tables are described. Alternatively, you can filter the results.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_route_tables(
    TransitGatewayRouteTableIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableIds (list) --

    The IDs of the transit gateway route tables.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • default-association-route-table - Indicates whether this is the default association route table for the transit gateway (true | false ).
    • default-propagation-route-table - Indicates whether this is the default propagation route table for the transit gateway (true | false ).
    • state - The state of the route table (available | deleting | deleted | pending ).
    • transit-gateway-id - The ID of the transit gateway.
    • transit-gateway-route-table-id - The ID of the transit gateway route table.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTables': [
        {
            'TransitGatewayRouteTableId': 'string',
            'TransitGatewayId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'DefaultAssociationRouteTable': True|False,
            'DefaultPropagationRouteTable': True|False,
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayRouteTables (list) --

      Information about the transit gateway route tables.

      • (dict) --

        Describes a transit gateway route table.

        • TransitGatewayRouteTableId (string) --

          The ID of the transit gateway route table.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • State (string) --

          The state of the transit gateway route table.

        • DefaultAssociationRouteTable (boolean) --

          Indicates whether this is the default association route table for the transit gateway.

        • DefaultPropagationRouteTable (boolean) --

          Indicates whether this is the default propagation route table for the transit gateway.

        • CreationTime (datetime) --

          The creation time.

        • Tags (list) --

          Any tags assigned to the route table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_transit_gateway_vpc_attachments(**kwargs)

Describes one or more VPC attachments. By default, all VPC attachments are described. Alternatively, you can filter the results.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateway_vpc_attachments(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    The IDs of the attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting .
    • transit-gateway-attachment-id - The ID of the attachment.
    • transit-gateway-id - The ID of the transit gateway.
    • vpc-id - The ID of the VPC.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayVpcAttachments': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransitGatewayId': 'string',
            'VpcId': 'string',
            'VpcOwnerId': 'string',
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'SubnetIds': [
                'string',
            ],
            'CreationTime': datetime(2015, 1, 1),
            'Options': {
                'DnsSupport': 'enable'|'disable',
                'Ipv6Support': 'enable'|'disable',
                'ApplianceModeSupport': 'enable'|'disable'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayVpcAttachments (list) --

      Information about the VPC attachments.

      • (dict) --

        Describes a VPC attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • VpcId (string) --

          The ID of the VPC.

        • VpcOwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • State (string) --

          The state of the VPC attachment. Note that the initiating state has been deprecated.

        • SubnetIds (list) --

          The IDs of the subnets.

          • (string) --
        • CreationTime (datetime) --

          The creation time.

        • Options (dict) --

          The VPC attachment options.

          • DnsSupport (string) --

            Indicates whether DNS support is enabled.

          • Ipv6Support (string) --

            Indicates whether IPv6 support is disabled.

          • ApplianceModeSupport (string) --

            Indicates whether appliance mode support is enabled.

        • Tags (list) --

          The tags for the VPC attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_transit_gateways(**kwargs)

Describes one or more transit gateways. By default, all transit gateways are described. Alternatively, you can filter the results.

See also: AWS API Documentation

Request Syntax

response = client.describe_transit_gateways(
    TransitGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayIds (list) --

    The IDs of the transit gateways.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • options.propagation-default-route-table-id - The ID of the default propagation route table.
    • options.amazon-side-asn - The private ASN for the Amazon side of a BGP session.
    • options.association-default-route-table-id - The ID of the default association route table.
    • options.auto-accept-shared-attachments - Indicates whether there is automatic acceptance of attachment requests (enable | disable ).
    • options.default-route-table-association - Indicates whether resource attachments are automatically associated with the default association route table (enable | disable ).
    • options.default-route-table-propagation - Indicates whether resource attachments automatically propagate routes to the default propagation route table (enable | disable ).
    • options.dns-support - Indicates whether DNS support is enabled (enable | disable ).
    • options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol support is enabled (enable | disable ).
    • owner-id - The ID of the Amazon Web Services account that owns the transit gateway.
    • state - The state of the transit gateway (available | deleted | deleting | modifying | pending ).
    • transit-gateway-id - The ID of the transit gateway.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGateways': [
        {
            'TransitGatewayId': 'string',
            'TransitGatewayArn': 'string',
            'State': 'pending'|'available'|'modifying'|'deleting'|'deleted',
            'OwnerId': 'string',
            'Description': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'Options': {
                'AmazonSideAsn': 123,
                'TransitGatewayCidrBlocks': [
                    'string',
                ],
                'AutoAcceptSharedAttachments': 'enable'|'disable',
                'DefaultRouteTableAssociation': 'enable'|'disable',
                'AssociationDefaultRouteTableId': 'string',
                'DefaultRouteTablePropagation': 'enable'|'disable',
                'PropagationDefaultRouteTableId': 'string',
                'VpnEcmpSupport': 'enable'|'disable',
                'DnsSupport': 'enable'|'disable',
                'MulticastSupport': 'enable'|'disable'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGateways (list) --

      Information about the transit gateways.

      • (dict) --

        Describes a transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • TransitGatewayArn (string) --

          The Amazon Resource Name (ARN) of the transit gateway.

        • State (string) --

          The state of the transit gateway.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Description (string) --

          The description of the transit gateway.

        • CreationTime (datetime) --

          The creation time.

        • Options (dict) --

          The transit gateway options.

          • AmazonSideAsn (integer) --

            A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

          • TransitGatewayCidrBlocks (list) --

            The transit gateway CIDR blocks.

            • (string) --
          • AutoAcceptSharedAttachments (string) --

            Indicates whether attachment requests are automatically accepted.

          • DefaultRouteTableAssociation (string) --

            Indicates whether resource attachments are automatically associated with the default association route table.

          • AssociationDefaultRouteTableId (string) --

            The ID of the default association route table.

          • DefaultRouteTablePropagation (string) --

            Indicates whether resource attachments automatically propagate routes to the default propagation route table.

          • PropagationDefaultRouteTableId (string) --

            The ID of the default propagation route table.

          • VpnEcmpSupport (string) --

            Indicates whether Equal Cost Multipath Protocol support is enabled.

          • DnsSupport (string) --

            Indicates whether DNS support is enabled.

          • MulticastSupport (string) --

            Indicates whether multicast is enabled on the transit gateway

        • Tags (list) --

          The tags for the transit gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_trunk_interface_associations(**kwargs)

Note

This API action is currently in limited preview only . If you are interested in using this feature, contact your account manager.

Describes one or more network interface trunk associations.

See also: AWS API Documentation

Request Syntax

response = client.describe_trunk_interface_associations(
    AssociationIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • AssociationIds (list) --

    The IDs of the associations.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • gre-key - The ID of a trunk interface association.
    • interface-protocol - The interface protocol. Valid values are VLAN and GRE .
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'InterfaceAssociations': [
        {
            'AssociationId': 'string',
            'BranchInterfaceId': 'string',
            'TrunkInterfaceId': 'string',
            'InterfaceProtocol': 'VLAN'|'GRE',
            'VlanId': 123,
            'GreKey': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InterfaceAssociations (list) --

      Information about the trunk associations.

      • (dict) --

        Note

        Currently available in limited preview only . If you are interested in using this feature, contact your account manager.

        Information about an association between a branch network interface with a trunk network interface.

        • AssociationId (string) --

          The ID of the association.

        • BranchInterfaceId (string) --

          The ID of the branch network interface.

        • TrunkInterfaceId (string) --

          The ID of the trunk network interface.

        • InterfaceProtocol (string) --

          The interface protocol. Valid values are VLAN and GRE .

        • VlanId (integer) --

          The ID of the VLAN when you use the VLAN protocol.

        • GreKey (integer) --

          The application key when you use the GRE protocol.

        • Tags (list) --

          The tags for the trunk interface association.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_volume_attribute(**kwargs)

Describes the specified attribute of the specified volume. You can specify only one attribute at a time.

For more information about EBS volumes, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_volume_attribute(
    Attribute='autoEnableIO'|'productCodes',
    VolumeId='string',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute of the volume. This parameter is required.

  • VolumeId (string) --

    [REQUIRED]

    The ID of the volume.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AutoEnableIO': {
        'Value': True|False
    },
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'VolumeId': 'string'
}

Response Structure

  • (dict) --

    • AutoEnableIO (dict) --

      The state of autoEnableIO attribute.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • ProductCodes (list) --

      A list of product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • VolumeId (string) --

      The ID of the volume.

Examples

This example describes the autoEnableIo attribute of the volume with the ID vol-049df61146c4d7901.

response = client.describe_volume_attribute(
    Attribute='autoEnableIO',
    VolumeId='vol-049df61146c4d7901',
)

print(response)

Expected Output:

{
    'AutoEnableIO': {
        'Value': False,
    },
    'VolumeId': 'vol-049df61146c4d7901',
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_volume_status(**kwargs)

Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.

The DescribeVolumeStatus operation provides the following information about the specified volumes:

Status : Reflects the current status of the volume. The possible values are ok , impaired , warning , or insufficient-data . If all checks pass, the overall status of the volume is ok . If the check fails, the overall status is impaired . If the status is insufficient-data , then the checks might still be taking place on your volume at the time. We recommend that you retry the request. For more information about volume status, see Monitor the status of your volumes in the Amazon Elastic Compute Cloud User Guide .

Events : Reflect the cause of a volume status and might require you to take action. For example, if your volume returns an impaired status, then the volume event might be potential-data-inconsistency . This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and might have inconsistent data.

Actions : Reflect the actions you might have to take in response to an event. For example, if the status of the volume is impaired and the volume event shows potential-data-inconsistency , then the action shows enable-volume-io . This means that you may want to enable the I/O operations for the volume by calling the EnableVolumeIO action and then check the volume for data consistency.

Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the error state (for example, when a volume is incapable of accepting I/O.)

See also: AWS API Documentation

Request Syntax

response = client.describe_volume_status(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    VolumeIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • action.code - The action code for the event (for example, enable-volume-io ).
    • action.description - A description of the action.
    • action.event-id - The event ID associated with the action.
    • availability-zone - The Availability Zone of the instance.
    • event.description - A description of the event.
    • event.event-id - The event ID.
    • event.event-type - The event type (for io-enabled : passed | failed ; for io-performance : io-performance:degraded | io-performance:severely-degraded | io-performance:stalled ).
    • event.not-after - The latest end time for the event.
    • event.not-before - The earliest start time for the event.
    • volume-status.details-name - The cause for volume-status.status (io-enabled | io-performance ).
    • volume-status.details-status - The status of volume-status.details-name (for io-enabled : passed | failed ; for io-performance : normal | degraded | severely-degraded | stalled ).
    • volume-status.status - The status of the volume (ok | impaired | warning | insufficient-data ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumeStatus in paginated output. When this parameter is used, the request only returns MaxResults results in a single page along with a NextToken response element. 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 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeVolumeStatus returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value to include in a future DescribeVolumeStatus request. When the results of the request exceed MaxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
  • VolumeIds (list) --

    The IDs of the volumes.

    Default: Describes all your volumes.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'VolumeStatuses': [
        {
            'Actions': [
                {
                    'Code': 'string',
                    'Description': 'string',
                    'EventId': 'string',
                    'EventType': 'string'
                },
            ],
            'AvailabilityZone': 'string',
            'OutpostArn': 'string',
            'Events': [
                {
                    'Description': 'string',
                    'EventId': 'string',
                    'EventType': 'string',
                    'NotAfter': datetime(2015, 1, 1),
                    'NotBefore': datetime(2015, 1, 1),
                    'InstanceId': 'string'
                },
            ],
            'VolumeId': 'string',
            'VolumeStatus': {
                'Details': [
                    {
                        'Name': 'io-enabled'|'io-performance',
                        'Status': 'string'
                    },
                ],
                'Status': 'ok'|'impaired'|'insufficient-data'
            },
            'AttachmentStatuses': [
                {
                    'IoPerformance': 'string',
                    'InstanceId': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

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

    • VolumeStatuses (list) --

      Information about the status of the volumes.

      • (dict) --

        Describes the volume status.

        • Actions (list) --

          The details of the operation.

          • (dict) --

            Describes a volume status operation code.

            • Code (string) --

              The code identifying the operation, for example, enable-volume-io .

            • Description (string) --

              A description of the operation.

            • EventId (string) --

              The ID of the event associated with this operation.

            • EventType (string) --

              The event type associated with this operation.

        • AvailabilityZone (string) --

          The Availability Zone of the volume.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • Events (list) --

          A list of events associated with the volume.

          • (dict) --

            Describes a volume status event.

            • Description (string) --

              A description of the event.

            • EventId (string) --

              The ID of this event.

            • EventType (string) --

              The type of this event.

            • NotAfter (datetime) --

              The latest end time of the event.

            • NotBefore (datetime) --

              The earliest start time of the event.

            • InstanceId (string) --

              The ID of the instance associated with the event.

        • VolumeId (string) --

          The volume ID.

        • VolumeStatus (dict) --

          The volume status.

          • Details (list) --

            The details of the volume status.

            • (dict) --

              Describes a volume status.

              • Name (string) --

                The name of the volume status.

              • Status (string) --

                The intended status of the volume status.

          • Status (string) --

            The status of the volume.

        • AttachmentStatuses (list) --

          Information about the instances to which the volume is attached.

          • (dict) --

            Information about the instances to which the volume is attached.

            • IoPerformance (string) --

              The maximum IOPS supported by the attached instance.

            • InstanceId (string) --

              The ID of the attached instance.

Examples

This example describes the status for the volume vol-1234567890abcdef0.

response = client.describe_volume_status(
    VolumeIds=[
        'vol-1234567890abcdef0',
    ],
)

print(response)

Expected Output:

{
    'VolumeStatuses': [
        {
            'Actions': [
            ],
            'AvailabilityZone': 'us-east-1a',
            'Events': [
            ],
            'VolumeId': 'vol-1234567890abcdef0',
            'VolumeStatus': {
                'Details': [
                    {
                        'Name': 'io-enabled',
                        'Status': 'passed',
                    },
                    {
                        'Name': 'io-performance',
                        'Status': 'not-applicable',
                    },
                ],
                'Status': 'ok',
            },
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the status for all volumes that are impaired. In this example output, there are no impaired volumes.

response = client.describe_volume_status(
    Filters=[
        {
            'Name': 'volume-status.status',
            'Values': [
                'impaired',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'VolumeStatuses': [
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_volumes(**kwargs)

Describes the specified EBS volumes or all of your EBS volumes.

If you are describing a long list of volumes, we recommend that you paginate the output to make the list more manageable. The MaxResults parameter sets the maximum number of results returned in a single page. If the list of results exceeds your MaxResults value, then that number of results is returned along with a NextToken value that can be passed to a subsequent DescribeVolumes request to retrieve the remaining results.

For more information about EBS volumes, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_volumes(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • attachment.attach-time - The time stamp when the attachment initiated.
    • attachment.delete-on-termination - Whether the volume is deleted on instance termination.
    • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1 ).
    • attachment.instance-id - The ID of the instance the volume is attached to.
    • attachment.status - The attachment state (attaching | attached | detaching ).
    • availability-zone - The Availability Zone in which the volume was created.
    • create-time - The time stamp when the volume was created.
    • encrypted - Indicates whether the volume is encrypted (true | false )
    • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false )
    • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false ).
    • size - The size of the volume, in GiB.
    • snapshot-id - The snapshot from which the volume was created.
    • status - The state of the volume (creating | available | in-use | deleting | deleted | error ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The volume ID.
    • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1 | standard )
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VolumeIds (list) --

    The volume IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
Return type

dict

Returns

Response Syntax

{
    'Volumes': [
        {
            'Attachments': [
                {
                    'AttachTime': datetime(2015, 1, 1),
                    'Device': 'string',
                    'InstanceId': 'string',
                    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
                    'VolumeId': 'string',
                    'DeleteOnTermination': True|False
                },
            ],
            'AvailabilityZone': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'Encrypted': True|False,
            'KmsKeyId': 'string',
            'OutpostArn': 'string',
            'Size': 123,
            'SnapshotId': 'string',
            'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
            'VolumeId': 'string',
            'Iops': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
            'FastRestored': True|False,
            'MultiAttachEnabled': True|False,
            'Throughput': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Volumes (list) --

      Information about the volumes.

      • (dict) --

        Describes a volume.

        • Attachments (list) --

          Information about the volume attachments.

          • (dict) --

            Describes volume attachment details.

            • AttachTime (datetime) --

              The time stamp when the attachment initiated.

            • Device (string) --

              The device name.

            • InstanceId (string) --

              The ID of the instance.

            • State (string) --

              The attachment state of the volume.

            • VolumeId (string) --

              The ID of the volume.

            • DeleteOnTermination (boolean) --

              Indicates whether the EBS volume is deleted on instance termination.

        • AvailabilityZone (string) --

          The Availability Zone for the volume.

        • CreateTime (datetime) --

          The time stamp when volume creation was initiated.

        • Encrypted (boolean) --

          Indicates whether the volume is encrypted.

        • KmsKeyId (string) --

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • Size (integer) --

          The size of the volume, in GiBs.

        • SnapshotId (string) --

          The snapshot from which the volume was created, if applicable.

        • State (string) --

          The volume state.

        • VolumeId (string) --

          The ID of the volume.

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

        • Tags (list) --

          Any tags assigned to the volume.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VolumeType (string) --

          The volume type.

        • FastRestored (boolean) --

          Indicates whether the volume was created using fast snapshot restore.

        • MultiAttachEnabled (boolean) --

          Indicates whether Amazon EBS Multi-Attach is enabled.

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

    • NextToken (string) --

      The NextToken value to include in a future DescribeVolumes request. When the results of a DescribeVolumes request exceed MaxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Examples

This example describes all of your volumes in the default region.

response = client.describe_volumes(
)

print(response)

Expected Output:

{
    'NextToken': '',
    'Volumes': [
        {
            'Attachments': [
                {
                    'AttachTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
                    'DeleteOnTermination': True,
                    'Device': '/dev/sda1',
                    'InstanceId': 'i-1234567890abcdef0',
                    'State': 'attached',
                    'VolumeId': 'vol-049df61146c4d7901',
                },
            ],
            'AvailabilityZone': 'us-east-1a',
            'CreateTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
            'Size': 8,
            'SnapshotId': 'snap-1234567890abcdef0',
            'State': 'in-use',
            'VolumeId': 'vol-049df61146c4d7901',
            'VolumeType': 'standard',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes all volumes that are both attached to the instance with the ID i-1234567890abcdef0 and set to delete when the instance terminates.

response = client.describe_volumes(
    Filters=[
        {
            'Name': 'attachment.instance-id',
            'Values': [
                'i-1234567890abcdef0',
            ],
        },
        {
            'Name': 'attachment.delete-on-termination',
            'Values': [
                'true',
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'Volumes': [
        {
            'Attachments': [
                {
                    'AttachTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
                    'DeleteOnTermination': True,
                    'Device': '/dev/sda1',
                    'InstanceId': 'i-1234567890abcdef0',
                    'State': 'attached',
                    'VolumeId': 'vol-049df61146c4d7901',
                },
            ],
            'AvailabilityZone': 'us-east-1a',
            'CreateTime': datetime(2013, 12, 18, 22, 35, 0, 2, 352, 0),
            'Size': 8,
            'SnapshotId': 'snap-1234567890abcdef0',
            'State': 'in-use',
            'VolumeId': 'vol-049df61146c4d7901',
            'VolumeType': 'standard',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_volumes_modifications(**kwargs)

Describes the most recent volume modification request for the specified EBS volumes.

If a volume has never been modified, some information in the output will be null. If a volume has been modified more than once, the output includes only the most recent modification request.

You can also use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch Events User Guide . For more information, see Monitor the progress of volume modifications in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_volumes_modifications(
    DryRun=True|False,
    VolumeIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VolumeIds (list) --

    The IDs of the volumes.

    • (string) --
  • Filters (list) --

    The filters.

    • modification-state - The current modification state (modifying | optimizing | completed | failed).
    • original-iops - The original IOPS rate of the volume.
    • original-size - The original size of the volume, in GiB.
    • original-volume-type - The original volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).
    • originalMultiAttachEnabled - Indicates whether Multi-Attach support was enabled (true | false).
    • start-time - The modification start time.
    • target-iops - The target IOPS rate of the volume.
    • target-size - The target size of the volume, in GiB.
    • target-volume-type - The target volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).
    • targetMultiAttachEnabled - Indicates whether Multi-Attach support is to be enabled (true | false).
    • volume-id - The ID of the volume.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NextToken (string) -- The nextToken value returned by a previous paginated request.
  • MaxResults (integer) -- The maximum number of results (up to a limit of 500) to be returned in a paginated request.
Return type

dict

Returns

Response Syntax

{
    'VolumesModifications': [
        {
            'VolumeId': 'string',
            'ModificationState': 'modifying'|'optimizing'|'completed'|'failed',
            'StatusMessage': 'string',
            'TargetSize': 123,
            'TargetIops': 123,
            'TargetVolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
            'TargetThroughput': 123,
            'TargetMultiAttachEnabled': True|False,
            'OriginalSize': 123,
            'OriginalIops': 123,
            'OriginalVolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
            'OriginalThroughput': 123,
            'OriginalMultiAttachEnabled': True|False,
            'Progress': 123,
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • VolumesModifications (list) --

      Information about the volume modifications.

      • (dict) --

        Describes the modification status of an EBS volume.

        If the volume has never been modified, some element values will be null.

        • VolumeId (string) --

          The ID of the volume.

        • ModificationState (string) --

          The current modification state. The modification state is null for unmodified volumes.

        • StatusMessage (string) --

          A status message about the modification progress or failure.

        • TargetSize (integer) --

          The target size of the volume, in GiB.

        • TargetIops (integer) --

          The target IOPS rate of the volume.

        • TargetVolumeType (string) --

          The target EBS volume type of the volume.

        • TargetThroughput (integer) --

          The target throughput of the volume, in MiB/s.

        • TargetMultiAttachEnabled (boolean) --

          The target setting for Amazon EBS Multi-Attach.

        • OriginalSize (integer) --

          The original size of the volume, in GiB.

        • OriginalIops (integer) --

          The original IOPS rate of the volume.

        • OriginalVolumeType (string) --

          The original EBS volume type of the volume.

        • OriginalThroughput (integer) --

          The original throughput of the volume, in MiB/s.

        • OriginalMultiAttachEnabled (boolean) --

          The original setting for Amazon EBS Multi-Attach.

        • Progress (integer) --

          The modification progress, from 0 to 100 percent complete.

        • StartTime (datetime) --

          The modification start time.

        • EndTime (datetime) --

          The modification completion or failure time.

    • NextToken (string) --

      Token for pagination, null if there are no more results

describe_vpc_attribute(**kwargs)

Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_attribute(
    Attribute='enableDnsSupport'|'enableDnsHostnames',
    VpcId='string',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The VPC attribute.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpcId': 'string',
    'EnableDnsHostnames': {
        'Value': True|False
    },
    'EnableDnsSupport': {
        'Value': True|False
    }
}

Response Structure

  • (dict) --

    • VpcId (string) --

      The ID of the VPC.

    • EnableDnsHostnames (dict) --

      Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true , instances in the VPC get DNS hostnames; otherwise, they do not.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • EnableDnsSupport (dict) --

      Indicates whether DNS resolution is enabled for the VPC. If this attribute is true , the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

Examples

This example describes the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.

response = client.describe_vpc_attribute(
    Attribute='enableDnsSupport',
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'EnableDnsSupport': {
        'Value': True,
    },
    'VpcId': 'vpc-a01106c2',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example describes the enableDnsHostnames attribute. This attribute indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.

response = client.describe_vpc_attribute(
    Attribute='enableDnsHostnames',
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'EnableDnsHostnames': {
        'Value': True,
    },
    'VpcId': 'vpc-a01106c2',
    'ResponseMetadata': {
        '...': '...',
    },
}

Describes the ClassicLink status of one or more VPCs.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_classic_link(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    VpcIds=[
        'string',
    ]
)
Parameters
  • Filters (list) --

    One or more filters.

    • is-classic-link-enabled - Whether the VPC is enabled for ClassicLink (true | false ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcIds (list) --

    One or more VPCs for which you want to describe the ClassicLink status.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Vpcs': [
        {
            'ClassicLinkEnabled': True|False,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Vpcs (list) --

      The ClassicLink status of one or more VPCs.

      • (dict) --

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        Describes whether a VPC is enabled for ClassicLink.

        • ClassicLinkEnabled (boolean) --

          Indicates whether the VPC is enabled for ClassicLink.

        • Tags (list) --

          Any tags assigned to the VPC.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VpcId (string) --

          The ID of the VPC.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Describes the ClassicLink DNS support status of one or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_classic_link_dns_support(
    MaxResults=123,
    NextToken='string',
    VpcIds=[
        'string',
    ]
)
Parameters
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • VpcIds (list) --

    One or more VPC IDs.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'Vpcs': [
        {
            'ClassicLinkDnsSupported': True|False,
            'VpcId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

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

    • Vpcs (list) --

      Information about the ClassicLink DNS support status of the VPCs.

      • (dict) --

        Describes the ClassicLink DNS support status of a VPC.

        • ClassicLinkDnsSupported (boolean) --

          Indicates whether ClassicLink DNS support is enabled for the VPC.

        • VpcId (string) --

          The ID of the VPC.

describe_vpc_endpoint_connection_notifications(**kwargs)

Describes the connection notifications for VPC endpoints and VPC endpoint services.

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_endpoint_connection_notifications(
    DryRun=True|False,
    ConnectionNotificationId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ConnectionNotificationId (string) -- The ID of the notification.
  • Filters (list) --

    One or more filters.

    • connection-notification-arn - The ARN of the SNS topic for the notification.
    • connection-notification-id - The ID of the notification.
    • connection-notification-state - The state of the notification (Enabled | Disabled ).
    • connection-notification-type - The type of notification (Topic ).
    • service-id - The ID of the endpoint service.
    • vpc-endpoint-id - The ID of the VPC endpoint.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value.
  • NextToken (string) -- The token to request the next page of results.
Return type

dict

Returns

Response Syntax

{
    'ConnectionNotificationSet': [
        {
            'ConnectionNotificationId': 'string',
            'ServiceId': 'string',
            'VpcEndpointId': 'string',
            'ConnectionNotificationType': 'Topic',
            'ConnectionNotificationArn': 'string',
            'ConnectionEvents': [
                'string',
            ],
            'ConnectionNotificationState': 'Enabled'|'Disabled'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ConnectionNotificationSet (list) --

      One or more notifications.

      • (dict) --

        Describes a connection notification for a VPC endpoint or VPC endpoint service.

        • ConnectionNotificationId (string) --

          The ID of the notification.

        • ServiceId (string) --

          The ID of the endpoint service.

        • VpcEndpointId (string) --

          The ID of the VPC endpoint.

        • ConnectionNotificationType (string) --

          The type of notification.

        • ConnectionNotificationArn (string) --

          The ARN of the SNS topic for the notification.

        • ConnectionEvents (list) --

          The events for the notification. Valid values are Accept , Connect , Delete , and Reject .

          • (string) --
        • ConnectionNotificationState (string) --

          The state of the notification.

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

describe_vpc_endpoint_connections(**kwargs)

Describes the VPC endpoint connections to your VPC endpoint services, including any endpoints that are pending your acceptance.

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_endpoint_connections(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • ip-address-type - The IP address type (ipv4 | ipv6 ).
    • service-id - The ID of the service.
    • vpc-endpoint-owner - The ID of the Amazon Web Services account ID that owns the endpoint.
    • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed ).
    • vpc-endpoint-id - The ID of the endpoint.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'VpcEndpointConnections': [
        {
            'ServiceId': 'string',
            'VpcEndpointId': 'string',
            'VpcEndpointOwner': 'string',
            'VpcEndpointState': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired',
            'CreationTimestamp': datetime(2015, 1, 1),
            'DnsEntries': [
                {
                    'DnsName': 'string',
                    'HostedZoneId': 'string'
                },
            ],
            'NetworkLoadBalancerArns': [
                'string',
            ],
            'GatewayLoadBalancerArns': [
                'string',
            ],
            'IpAddressType': 'ipv4'|'dualstack'|'ipv6'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • VpcEndpointConnections (list) --

      Information about one or more VPC endpoint connections.

      • (dict) --

        Describes a VPC endpoint connection to a service.

        • ServiceId (string) --

          The ID of the service to which the endpoint is connected.

        • VpcEndpointId (string) --

          The ID of the VPC endpoint.

        • VpcEndpointOwner (string) --

          The ID of the Amazon Web Services account that owns the VPC endpoint.

        • VpcEndpointState (string) --

          The state of the VPC endpoint.

        • CreationTimestamp (datetime) --

          The date and time that the VPC endpoint was created.

        • DnsEntries (list) --

          The DNS entries for the VPC endpoint.

          • (dict) --

            Describes a DNS entry.

            • DnsName (string) --

              The DNS name.

            • HostedZoneId (string) --

              The ID of the private hosted zone.

        • NetworkLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the network load balancers for the service.

          • (string) --
        • GatewayLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

          • (string) --
        • IpAddressType (string) --

          The IP address type for the endpoint.

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

describe_vpc_endpoint_service_configurations(**kwargs)

Describes the VPC endpoint service configurations in your account (your services).

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_endpoint_service_configurations(
    DryRun=True|False,
    ServiceIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceIds (list) --

    The IDs of one or more services.

    • (string) --
  • Filters (list) --

    One or more filters.

    • service-name - The name of the service.
    • service-id - The ID of the service.
    • service-state - The state of the service (Pending | Available | Deleting | Deleted | Failed ).
    • supported-ip-address-types - The IP address type (ipv4 | ipv6 ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'ServiceConfigurations': [
        {
            'ServiceType': [
                {
                    'ServiceType': 'Interface'|'Gateway'|'GatewayLoadBalancer'
                },
            ],
            'ServiceId': 'string',
            'ServiceName': 'string',
            'ServiceState': 'Pending'|'Available'|'Deleting'|'Deleted'|'Failed',
            'AvailabilityZones': [
                'string',
            ],
            'AcceptanceRequired': True|False,
            'ManagesVpcEndpoints': True|False,
            'NetworkLoadBalancerArns': [
                'string',
            ],
            'GatewayLoadBalancerArns': [
                'string',
            ],
            'SupportedIpAddressTypes': [
                'ipv4'|'ipv6',
            ],
            'BaseEndpointDnsNames': [
                'string',
            ],
            'PrivateDnsName': 'string',
            'PrivateDnsNameConfiguration': {
                'State': 'pendingVerification'|'verified'|'failed',
                'Type': 'string',
                'Value': 'string',
                'Name': 'string'
            },
            'PayerResponsibility': 'ServiceOwner',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ServiceConfigurations (list) --

      Information about one or more services.

      • (dict) --

        Describes a service configuration for a VPC endpoint service.

        • ServiceType (list) --

          The type of service.

          • (dict) --

            Describes the type of service for a VPC endpoint.

            • ServiceType (string) --

              The type of service.

        • ServiceId (string) --

          The ID of the service.

        • ServiceName (string) --

          The name of the service.

        • ServiceState (string) --

          The service state.

        • AvailabilityZones (list) --

          The Availability Zones in which the service is available.

          • (string) --
        • AcceptanceRequired (boolean) --

          Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.

        • ManagesVpcEndpoints (boolean) --

          Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

        • NetworkLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.

          • (string) --
        • GatewayLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

          • (string) --
        • SupportedIpAddressTypes (list) --

          The supported IP address types.

          • (string) --
        • BaseEndpointDnsNames (list) --

          The DNS names for the service.

          • (string) --
        • PrivateDnsName (string) --

          The private DNS name for the service.

        • PrivateDnsNameConfiguration (dict) --

          Information about the endpoint service private DNS name configuration.

          • State (string) --

            The verification state of the VPC endpoint service.

            >Consumers of the endpoint service can use the private name only when the state is verified .

          • Type (string) --

            The endpoint service verification type, for example TXT.

          • Value (string) --

            The value the service provider adds to the private DNS name domain record before verification.

          • Name (string) --

            The name of the record subdomain the service provider needs to create. The service provider adds the value text to the name .

        • PayerResponsibility (string) --

          The payer responsibility.

        • Tags (list) --

          Any tags assigned to the service.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

describe_vpc_endpoint_service_permissions(**kwargs)

Describes the principals (service consumers) that are permitted to discover your VPC endpoint service.

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_endpoint_service_permissions(
    DryRun=True|False,
    ServiceId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the service.

  • Filters (list) --

    One or more filters.

    • principal - The ARN of the principal.
    • principal-type - The principal type (All | Service | OrganizationUnit | Account | User | Role ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results of the initial request can be seen by sending another request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.
  • NextToken (string) -- The token to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'AllowedPrincipals': [
        {
            'PrincipalType': 'All'|'Service'|'OrganizationUnit'|'Account'|'User'|'Role',
            'Principal': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AllowedPrincipals (list) --

      Information about one or more allowed principals.

      • (dict) --

        Describes a principal.

        • PrincipalType (string) --

          The type of principal.

        • Principal (string) --

          The Amazon Resource Name (ARN) of the principal.

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

describe_vpc_endpoint_services(**kwargs)

Describes available services to which you can create a VPC endpoint.

When the service provider and the consumer have different accounts in multiple Availability Zones, and the consumer views the VPC endpoint service information, the response only includes the common Availability Zones. For example, when the service provider account uses us-east-1a and us-east-1c and the consumer uses us-east-1a and us-east-1b , the response includes the VPC endpoint services in the common Availability Zone, us-east-1a .

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_endpoint_services(
    DryRun=True|False,
    ServiceNames=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceNames (list) --

    One or more service names.

    • (string) --
  • Filters (list) --

    One or more filters.

    • service-name - The name of the service.
    • service-type - The type of service (Interface | Gateway ).
    • supported-ip-address-types - The IP address type (ipv4 | ipv6 ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) --

    The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

    Constraint: If the value is greater than 1,000, we return only 1,000 items.

  • NextToken (string) -- The token for the next set of items to return. (You received this token from a prior call.)
Return type

dict

Returns

Response Syntax

{
    'ServiceNames': [
        'string',
    ],
    'ServiceDetails': [
        {
            'ServiceName': 'string',
            'ServiceId': 'string',
            'ServiceType': [
                {
                    'ServiceType': 'Interface'|'Gateway'|'GatewayLoadBalancer'
                },
            ],
            'AvailabilityZones': [
                'string',
            ],
            'Owner': 'string',
            'BaseEndpointDnsNames': [
                'string',
            ],
            'PrivateDnsName': 'string',
            'PrivateDnsNames': [
                {
                    'PrivateDnsName': 'string'
                },
            ],
            'VpcEndpointPolicySupported': True|False,
            'AcceptanceRequired': True|False,
            'ManagesVpcEndpoints': True|False,
            'PayerResponsibility': 'ServiceOwner',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'PrivateDnsNameVerificationState': 'pendingVerification'|'verified'|'failed',
            'SupportedIpAddressTypes': [
                'ipv4'|'ipv6',
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeVpcEndpointServices.

    • ServiceNames (list) --

      A list of supported services.

      • (string) --
    • ServiceDetails (list) --

      Information about the service.

      • (dict) --

        Describes a VPC endpoint service.

        • ServiceName (string) --

          The name of the service.

        • ServiceId (string) --

          The ID of the endpoint service.

        • ServiceType (list) --

          The type of service.

          • (dict) --

            Describes the type of service for a VPC endpoint.

            • ServiceType (string) --

              The type of service.

        • AvailabilityZones (list) --

          The Availability Zones in which the service is available.

          • (string) --
        • Owner (string) --

          The Amazon Web Services account ID of the service owner.

        • BaseEndpointDnsNames (list) --

          The DNS names for the service.

          • (string) --
        • PrivateDnsName (string) --

          The private DNS name for the service.

        • PrivateDnsNames (list) --

          The private DNS names assigned to the VPC endpoint service.

          • (dict) --

            Information about the Private DNS name for interface endpoints.

            • PrivateDnsName (string) --

              The private DNS name assigned to the VPC endpoint service.

        • VpcEndpointPolicySupported (boolean) --

          Indicates whether the service supports endpoint policies.

        • AcceptanceRequired (boolean) --

          Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.

        • ManagesVpcEndpoints (boolean) --

          Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

        • PayerResponsibility (string) --

          The payer responsibility.

        • Tags (list) --

          Any tags assigned to the service.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • PrivateDnsNameVerificationState (string) --

          The verification state of the VPC endpoint service.

          Consumers of the endpoint service cannot use the private name when the state is not verified .

        • SupportedIpAddressTypes (list) --

          The supported IP address types.

          • (string) --
    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

describe_vpc_endpoints(**kwargs)

Describes one or more of your VPC endpoints.

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_endpoints(
    DryRun=True|False,
    VpcEndpointIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointIds (list) --

    One or more endpoint IDs.

    • (string) --
  • Filters (list) --

    One or more filters.

    • ip-address-type - The IP address type (ipv4 | ipv6 ).
    • service-name - The name of the service.
    • vpc-id - The ID of the VPC in which the endpoint resides.
    • vpc-endpoint-id - The ID of the endpoint.
    • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed ).
    • vpc-endpoint-type - The type of VPC endpoint (Interface | Gateway | GatewayLoadBalancer ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) --

    The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

    Constraint: If the value is greater than 1,000, we return only 1,000 items.

  • NextToken (string) -- The token for the next set of items to return. (You received this token from a prior call.)
Return type

dict

Returns

Response Syntax

{
    'VpcEndpoints': [
        {
            'VpcEndpointId': 'string',
            'VpcEndpointType': 'Interface'|'Gateway'|'GatewayLoadBalancer',
            'VpcId': 'string',
            'ServiceName': 'string',
            'State': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired',
            'PolicyDocument': 'string',
            'RouteTableIds': [
                'string',
            ],
            'SubnetIds': [
                'string',
            ],
            'Groups': [
                {
                    'GroupId': 'string',
                    'GroupName': 'string'
                },
            ],
            'IpAddressType': 'ipv4'|'dualstack'|'ipv6',
            'DnsOptions': {
                'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined'
            },
            'PrivateDnsEnabled': True|False,
            'RequesterManaged': True|False,
            'NetworkInterfaceIds': [
                'string',
            ],
            'DnsEntries': [
                {
                    'DnsName': 'string',
                    'HostedZoneId': 'string'
                },
            ],
            'CreationTimestamp': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'OwnerId': 'string',
            'LastError': {
                'Message': 'string',
                'Code': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeVpcEndpoints.

    • VpcEndpoints (list) --

      Information about the endpoints.

      • (dict) --

        Describes a VPC endpoint.

        • VpcEndpointId (string) --

          The ID of the endpoint.

        • VpcEndpointType (string) --

          The type of endpoint.

        • VpcId (string) --

          The ID of the VPC to which the endpoint is associated.

        • ServiceName (string) --

          The name of the service to which the endpoint is associated.

        • State (string) --

          The state of the endpoint.

        • PolicyDocument (string) --

          The policy document associated with the endpoint, if applicable.

        • RouteTableIds (list) --

          (Gateway endpoint) One or more route tables associated with the endpoint.

          • (string) --
        • SubnetIds (list) --

          (Interface endpoint) The subnets for the endpoint.

          • (string) --
        • Groups (list) --

          (Interface endpoint) Information about the security groups that are associated with the network interface.

          • (dict) --

            Describes a security group.

            • GroupId (string) --

              The ID of the security group.

            • GroupName (string) --

              The name of the security group.

        • IpAddressType (string) --

          The IP address type for the endpoint.

        • DnsOptions (dict) --

          The DNS options for the endpoint.

          • DnsRecordIpType (string) --

            The DNS records created for the endpoint.

        • PrivateDnsEnabled (boolean) --

          (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.

        • RequesterManaged (boolean) --

          Indicates whether the endpoint is being managed by its service.

        • NetworkInterfaceIds (list) --

          (Interface endpoint) One or more network interfaces for the endpoint.

          • (string) --
        • DnsEntries (list) --

          (Interface endpoint) The DNS entries for the endpoint.

          • (dict) --

            Describes a DNS entry.

            • DnsName (string) --

              The DNS name.

            • HostedZoneId (string) --

              The ID of the private hosted zone.

        • CreationTimestamp (datetime) --

          The date and time that the endpoint was created.

        • Tags (list) --

          Any tags assigned to the endpoint.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the endpoint.

        • LastError (dict) --

          The last error that occurred for endpoint.

          • Message (string) --

            The error message for the VPC endpoint error.

          • Code (string) --

            The error code for the VPC endpoint error.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

describe_vpc_peering_connections(**kwargs)

Describes one or more of your VPC peering connections.

See also: AWS API Documentation

Request Syntax

response = client.describe_vpc_peering_connections(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    VpcPeeringConnectionIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.
    • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.
    • accepter-vpc-info.vpc-id - The ID of the accepter VPC.
    • expiration-time - The expiration date and time for the VPC peering connection.
    • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.
    • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.
    • requester-vpc-info.vpc-id - The ID of the requester VPC.
    • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected ).
    • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-peering-connection-id - The ID of the VPC peering connection.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionIds (list) --

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'VpcPeeringConnections': [
        {
            'AccepterVpcInfo': {
                'CidrBlock': 'string',
                'Ipv6CidrBlockSet': [
                    {
                        'Ipv6CidrBlock': 'string'
                    },
                ],
                'CidrBlockSet': [
                    {
                        'CidrBlock': 'string'
                    },
                ],
                'OwnerId': 'string',
                'PeeringOptions': {
                    'AllowDnsResolutionFromRemoteVpc': True|False,
                    'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                    'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                },
                'VpcId': 'string',
                'Region': 'string'
            },
            'ExpirationTime': datetime(2015, 1, 1),
            'RequesterVpcInfo': {
                'CidrBlock': 'string',
                'Ipv6CidrBlockSet': [
                    {
                        'Ipv6CidrBlock': 'string'
                    },
                ],
                'CidrBlockSet': [
                    {
                        'CidrBlock': 'string'
                    },
                ],
                'OwnerId': 'string',
                'PeeringOptions': {
                    'AllowDnsResolutionFromRemoteVpc': True|False,
                    'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                    'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                },
                'VpcId': 'string',
                'Region': 'string'
            },
            'Status': {
                'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
                'Message': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcPeeringConnectionId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • VpcPeeringConnections (list) --

      Information about the VPC peering connections.

      • (dict) --

        Describes a VPC peering connection.

        • AccepterVpcInfo (dict) --

          Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock (string) --

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet (list) --

            The IPv6 CIDR block for the VPC.

            • (dict) --

              Describes an IPv6 CIDR block.

              • Ipv6CidrBlock (string) --

                The IPv6 CIDR block.

          • CidrBlockSet (list) --

            Information about the IPv4 CIDR blocks for the VPC.

            • (dict) --

              Describes an IPv4 CIDR block.

              • CidrBlock (string) --

                The IPv4 CIDR block.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions (dict) --

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc (boolean) --

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

          • VpcId (string) --

            The ID of the VPC.

          • Region (string) --

            The Region in which the VPC is located.

        • ExpirationTime (datetime) --

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo (dict) --

          Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock (string) --

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet (list) --

            The IPv6 CIDR block for the VPC.

            • (dict) --

              Describes an IPv6 CIDR block.

              • Ipv6CidrBlock (string) --

                The IPv6 CIDR block.

          • CidrBlockSet (list) --

            Information about the IPv4 CIDR blocks for the VPC.

            • (dict) --

              Describes an IPv4 CIDR block.

              • CidrBlock (string) --

                The IPv4 CIDR block.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions (dict) --

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc (boolean) --

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

          • VpcId (string) --

            The ID of the VPC.

          • Region (string) --

            The Region in which the VPC is located.

        • Status (dict) --

          The status of the VPC peering connection.

          • Code (string) --

            The status of the VPC peering connection.

          • Message (string) --

            A message that provides more information about the status, if applicable.

        • 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 256 Unicode characters.

        • VpcPeeringConnectionId (string) --

          The ID of the VPC peering connection.

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

describe_vpcs(**kwargs)

Describes one or more of your VPCs.

See also: AWS API Documentation

Request Syntax

response = client.describe_vpcs(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpcIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28 ).
    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
    • dhcp-options-id - The ID of a set of DHCP options.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.
    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
    • is-default - Indicates whether the VPC is the default VPC.
    • owner-id - The ID of the Amazon Web Services account that owns the VPC.
    • state - The state of the VPC (pending | available ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpcIds (list) --

    One or more VPC IDs.

    Default: Describes all your VPCs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'Vpcs': [
        {
            'CidrBlock': 'string',
            'DhcpOptionsId': 'string',
            'State': 'pending'|'available',
            'VpcId': 'string',
            'OwnerId': 'string',
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'Ipv6CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'Ipv6CidrBlock': 'string',
                    'Ipv6CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    },
                    'NetworkBorderGroup': 'string',
                    'Ipv6Pool': 'string'
                },
            ],
            'CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'CidrBlock': 'string',
                    'CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'IsDefault': True|False,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Vpcs (list) --

      Information about one or more VPCs.

      • (dict) --

        Describes a VPC.

        • CidrBlock (string) --

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId (string) --

          The ID of the set of DHCP options you've associated with the VPC.

        • State (string) --

          The current state of the VPC.

        • VpcId (string) --

          The ID of the VPC.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • InstanceTenancy (string) --

          The allowed tenancy of instances launched into the VPC.

        • Ipv6CidrBlockAssociationSet (list) --

          Information about the IPv6 CIDR blocks associated with the VPC.

          • (dict) --

            Describes an IPv6 CIDR block associated with a VPC.

            • AssociationId (string) --

              The association ID for the IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

            • Ipv6CidrBlockState (dict) --

              Information about the state of the CIDR block.

              • State (string) --

                The state of the CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

            • NetworkBorderGroup (string) --

              The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1 .

            • Ipv6Pool (string) --

              The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

        • CidrBlockAssociationSet (list) --

          Information about the IPv4 CIDR blocks associated with the VPC.

          • (dict) --

            Describes an IPv4 CIDR block associated with a VPC.

            • AssociationId (string) --

              The association ID for the IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

            • CidrBlockState (dict) --

              Information about the state of the CIDR block.

              • State (string) --

                The state of the CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

        • IsDefault (boolean) --

          Indicates whether the VPC is the default VPC.

        • Tags (list) --

          Any tags assigned to the VPC.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

Examples

This example describes the specified VPC.

response = client.describe_vpcs(
    VpcIds=[
        'vpc-a01106c2',
    ],
)

print(response)

Expected Output:

{
    'Vpcs': [
        {
            'CidrBlock': '10.0.0.0/16',
            'DhcpOptionsId': 'dopt-7a8b9c2d',
            'InstanceTenancy': 'default',
            'IsDefault': False,
            'State': 'available',
            'Tags': [
                {
                    'Key': 'Name',
                    'Value': 'MyVPC',
                },
            ],
            'VpcId': 'vpc-a01106c2',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
describe_vpn_connections(**kwargs)

Describes one or more of your VPN connections.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_vpn_connections(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpnConnectionIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Filters (list) --

    One or more filters.

    • customer-gateway-configuration - The configuration information for the customer gateway.
    • customer-gateway-id - The ID of a customer gateway associated with the VPN connection.
    • state - The state of the VPN connection (pending | available | deleting | deleted ).
    • option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).
    • route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.
    • bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • type - The type of VPN connection. Currently the only supported type is ipsec.1 .
    • vpn-connection-id - The ID of the VPN connection.
    • vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.
    • transit-gateway-id - The ID of a transit gateway associated with the VPN connection.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpnConnectionIds (list) --

    One or more VPN connection IDs.

    Default: Describes your VPN connections.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnConnections': [
        {
            'CustomerGatewayConfiguration': 'string',
            'CustomerGatewayId': 'string',
            'Category': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'Type': 'ipsec.1',
            'VpnConnectionId': 'string',
            'VpnGatewayId': 'string',
            'TransitGatewayId': 'string',
            'CoreNetworkArn': 'string',
            'CoreNetworkAttachmentArn': 'string',
            'GatewayAssociationState': 'associated'|'not-associated'|'associating'|'disassociating',
            'Options': {
                'EnableAcceleration': True|False,
                'StaticRoutesOnly': True|False,
                'LocalIpv4NetworkCidr': 'string',
                'RemoteIpv4NetworkCidr': 'string',
                'LocalIpv6NetworkCidr': 'string',
                'RemoteIpv6NetworkCidr': 'string',
                'OutsideIpAddressType': 'string',
                'TransportTransitGatewayAttachmentId': 'string',
                'TunnelInsideIpVersion': 'ipv4'|'ipv6',
                'TunnelOptions': [
                    {
                        'OutsideIpAddress': 'string',
                        'TunnelInsideCidr': 'string',
                        'TunnelInsideIpv6Cidr': 'string',
                        'PreSharedKey': 'string',
                        'Phase1LifetimeSeconds': 123,
                        'Phase2LifetimeSeconds': 123,
                        'RekeyMarginTimeSeconds': 123,
                        'RekeyFuzzPercentage': 123,
                        'ReplayWindowSize': 123,
                        'DpdTimeoutSeconds': 123,
                        'DpdTimeoutAction': 'string',
                        'Phase1EncryptionAlgorithms': [
                            {
                                'Value': 'string'
                            },
                        ],
                        'Phase2EncryptionAlgorithms': [
                            {
                                'Value': 'string'
                            },
                        ],
                        'Phase1IntegrityAlgorithms': [
                            {
                                'Value': 'string'
                            },
                        ],
                        'Phase2IntegrityAlgorithms': [
                            {
                                'Value': 'string'
                            },
                        ],
                        'Phase1DHGroupNumbers': [
                            {
                                'Value': 123
                            },
                        ],
                        'Phase2DHGroupNumbers': [
                            {
                                'Value': 123
                            },
                        ],
                        'IkeVersions': [
                            {
                                'Value': 'string'
                            },
                        ],
                        'StartupAction': 'string'
                    },
                ]
            },
            'Routes': [
                {
                    'DestinationCidrBlock': 'string',
                    'Source': 'Static',
                    'State': 'pending'|'available'|'deleting'|'deleted'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VgwTelemetry': [
                {
                    'AcceptedRouteCount': 123,
                    'LastStatusChange': datetime(2015, 1, 1),
                    'OutsideIpAddress': 'string',
                    'Status': 'UP'|'DOWN',
                    'StatusMessage': 'string',
                    'CertificateArn': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeVpnConnections.

    • VpnConnections (list) --

      Information about one or more VPN connections.

      • (dict) --

        Describes a VPN connection.

        • CustomerGatewayConfiguration (string) --

          The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.

        • CustomerGatewayId (string) --

          The ID of the customer gateway at your end of the VPN connection.

        • Category (string) --

          The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

        • State (string) --

          The current state of the VPN connection.

        • Type (string) --

          The type of VPN connection.

        • VpnConnectionId (string) --

          The ID of the VPN connection.

        • VpnGatewayId (string) --

          The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

        • TransitGatewayId (string) --

          The ID of the transit gateway associated with the VPN connection.

        • CoreNetworkArn (string) --

          The ARN of the core network.

        • CoreNetworkAttachmentArn (string) --

          The ARN of the core network attachment.

        • GatewayAssociationState (string) --

          The current state of the gateway association.

        • Options (dict) --

          The VPN connection options.

          • EnableAcceleration (boolean) --

            Indicates whether acceleration is enabled for the VPN connection.

          • StaticRoutesOnly (boolean) --

            Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

          • LocalIpv4NetworkCidr (string) --

            The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv4NetworkCidr (string) --

            The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

          • LocalIpv6NetworkCidr (string) --

            The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

          • RemoteIpv6NetworkCidr (string) --

            The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

          • OutsideIpAddressType (string) --

            The type of IPv4 address assigned to the outside interface of the customer gateway.

            Valid values: PrivateIpv4 | PublicIpv4

            Default: PublicIpv4

          • TransportTransitGatewayAttachmentId (string) --

            The transit gateway attachment ID in use for the VPN tunnel.

          • TunnelInsideIpVersion (string) --

            Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

          • TunnelOptions (list) --

            Indicates the VPN tunnel options.

            • (dict) --

              The VPN tunnel options.

              • OutsideIpAddress (string) --

                The external IP address of the VPN tunnel.

              • TunnelInsideCidr (string) --

                The range of inside IPv4 addresses for the tunnel.

              • TunnelInsideIpv6Cidr (string) --

                The range of inside IPv6 addresses for the tunnel.

              • PreSharedKey (string) --

                The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

              • Phase1LifetimeSeconds (integer) --

                The lifetime for phase 1 of the IKE negotiation, in seconds.

              • Phase2LifetimeSeconds (integer) --

                The lifetime for phase 2 of the IKE negotiation, in seconds.

              • RekeyMarginTimeSeconds (integer) --

                The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

              • RekeyFuzzPercentage (integer) --

                The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

              • ReplayWindowSize (integer) --

                The number of packets in an IKE replay window.

              • DpdTimeoutSeconds (integer) --

                The number of seconds after which a DPD timeout occurs.

              • DpdTimeoutAction (string) --

                The action to take after a DPD timeout occurs.

              • Phase1EncryptionAlgorithms (list) --

                The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

                • (dict) --

                  The encryption algorithm for phase 1 IKE negotiations.

                  • Value (string) --

                    The value for the encryption algorithm.

              • Phase2EncryptionAlgorithms (list) --

                The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

                • (dict) --

                  The encryption algorithm for phase 2 IKE negotiations.

                  • Value (string) --

                    The encryption algorithm.

              • Phase1IntegrityAlgorithms (list) --

                The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

                • (dict) --

                  The integrity algorithm for phase 1 IKE negotiations.

                  • Value (string) --

                    The value for the integrity algorithm.

              • Phase2IntegrityAlgorithms (list) --

                The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

                • (dict) --

                  The integrity algorithm for phase 2 IKE negotiations.

                  • Value (string) --

                    The integrity algorithm.

              • Phase1DHGroupNumbers (list) --

                The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

                • (dict) --

                  The Diffie-Hellmann group number for phase 1 IKE negotiations.

                  • Value (integer) --

                    The Diffie-Hellmann group number.

              • Phase2DHGroupNumbers (list) --

                The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

                • (dict) --

                  The Diffie-Hellmann group number for phase 2 IKE negotiations.

                  • Value (integer) --

                    The Diffie-Hellmann group number.

              • IkeVersions (list) --

                The IKE versions that are permitted for the VPN tunnel.

                • (dict) --

                  The internet key exchange (IKE) version permitted for the VPN tunnel.

                  • Value (string) --

                    The IKE version.

              • StartupAction (string) --

                The action to take when the establishing the VPN tunnels for a VPN connection.

        • Routes (list) --

          The static routes associated with the VPN connection.

          • (dict) --

            Describes a static route for a VPN connection.

            • DestinationCidrBlock (string) --

              The CIDR block associated with the local subnet of the customer data center.

            • Source (string) --

              Indicates how the routes were provided.

            • State (string) --

              The current state of the static route.

        • Tags (list) --

          Any tags assigned to the VPN connection.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • VgwTelemetry (list) --

          Information about the VPN tunnel.

          • (dict) --

            Describes telemetry for a VPN tunnel.

            • AcceptedRouteCount (integer) --

              The number of accepted routes.

            • LastStatusChange (datetime) --

              The date and time of the last change in status.

            • OutsideIpAddress (string) --

              The Internet-routable IP address of the virtual private gateway's outside interface.

            • Status (string) --

              The status of the VPN tunnel.

            • StatusMessage (string) --

              If an error occurs, a description of the error.

            • CertificateArn (string) --

              The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

describe_vpn_gateways(**kwargs)

Describes one or more of your virtual private gateways.

For more information, see Amazon Web Services Site-to-Site VPN in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.describe_vpn_gateways(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpnGatewayIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Filters (list) --

    One or more filters.

    • amazon-side-asn - The Autonomous System Number (ASN) for the Amazon side of the gateway.
    • attachment.state - The current state of the attachment between the gateway and the VPC (attaching | attached | detaching | detached ).
    • attachment.vpc-id - The ID of an attached VPC.
    • availability-zone - The Availability Zone for the virtual private gateway (if applicable).
    • state - The state of the virtual private gateway (pending | available | deleting | deleted ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • type - The type of virtual private gateway. Currently the only supported type is ipsec.1 .
    • vpn-gateway-id - The ID of the virtual private gateway.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpnGatewayIds (list) --

    One or more virtual private gateway IDs.

    Default: Describes all your virtual private gateways.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnGateways': [
        {
            'AvailabilityZone': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'Type': 'ipsec.1',
            'VpcAttachments': [
                {
                    'State': 'attaching'|'attached'|'detaching'|'detached',
                    'VpcId': 'string'
                },
            ],
            'VpnGatewayId': 'string',
            'AmazonSideAsn': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeVpnGateways.

    • VpnGateways (list) --

      Information about one or more virtual private gateways.

      • (dict) --

        Describes a virtual private gateway.

        • AvailabilityZone (string) --

          The Availability Zone where the virtual private gateway was created, if applicable. This field may be empty or not returned.

        • State (string) --

          The current state of the virtual private gateway.

        • Type (string) --

          The type of VPN connection the virtual private gateway supports.

        • VpcAttachments (list) --

          Any VPCs attached to the virtual private gateway.

          • (dict) --

            Describes an attachment between a virtual private gateway and a VPC.

            • State (string) --

              The current state of the attachment.

            • VpcId (string) --

              The ID of the VPC.

        • VpnGatewayId (string) --

          The ID of the virtual private gateway.

        • AmazonSideAsn (integer) --

          The private Autonomous System Number (ASN) for the Amazon side of a BGP session.

        • Tags (list) --

          Any tags assigned to the virtual private gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

See also: AWS API Documentation

Request Syntax

response = client.detach_classic_link_vpc(
    DryRun=True|False,
    InstanceId='string',
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance to unlink from the VPC.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC to which the instance is linked.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

detach_internet_gateway(**kwargs)

Detaches an internet gateway from a VPC, disabling connectivity between the internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

See also: AWS API Documentation

Request Syntax

response = client.detach_internet_gateway(
    DryRun=True|False,
    InternetGatewayId='string',
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayId (string) --

    [REQUIRED]

    The ID of the internet gateway.

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Returns

None

Examples

This example detaches the specified Internet gateway from the specified VPC.

response = client.detach_internet_gateway(
    InternetGatewayId='igw-c0a643a9',
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
detach_network_interface(**kwargs)

Detaches a network interface from an instance.

See also: AWS API Documentation

Request Syntax

response = client.detach_network_interface(
    AttachmentId='string',
    DryRun=True|False,
    Force=True|False
)
Parameters
  • AttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Specifies whether to force a detachment.

    Note

    • Use the Force parameter only as a last resort to detach a network interface from a failed instance.
    • If you use the Force parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance.
    • If you force the detachment of a network interface, the instance metadata might not get updated. This means that the attributes associated with the detached network interface might still be visible. The instance metadata will get updated when you stop and start the instance.
Returns

None

Examples

This example detaches the specified network interface from its attached instance.

response = client.detach_network_interface(
    AttachmentId='eni-attach-66c4350a',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
detach_volume(**kwargs)

Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

For more information, see Detach an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.detach_volume(
    Device='string',
    Force=True|False,
    InstanceId='string',
    VolumeId='string',
    DryRun=True|False
)
Parameters
  • Device (string) -- The device name.
  • Force (boolean) -- Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
  • InstanceId (string) -- The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.
  • VolumeId (string) --

    [REQUIRED]

    The ID of the volume.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AttachTime': datetime(2015, 1, 1),
    'Device': 'string',
    'InstanceId': 'string',
    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
    'VolumeId': 'string',
    'DeleteOnTermination': True|False
}

Response Structure

  • (dict) --

    Describes volume attachment details.

    • AttachTime (datetime) --

      The time stamp when the attachment initiated.

    • Device (string) --

      The device name.

    • InstanceId (string) --

      The ID of the instance.

    • State (string) --

      The attachment state of the volume.

    • VolumeId (string) --

      The ID of the volume.

    • DeleteOnTermination (boolean) --

      Indicates whether the EBS volume is deleted on instance termination.

Examples

This example detaches the volume (vol-049df61146c4d7901) from the instance it is attached to.

response = client.detach_volume(
    VolumeId='vol-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'AttachTime': datetime(2014, 2, 27, 19, 23, 6, 3, 58, 0),
    'Device': '/dev/sdb',
    'InstanceId': 'i-1234567890abcdef0',
    'State': 'detaching',
    'VolumeId': 'vol-049df61146c4d7901',
    'ResponseMetadata': {
        '...': '...',
    },
}
detach_vpn_gateway(**kwargs)

Detaches a virtual private gateway from a VPC. You do this if you're planning to turn off the VPC and not use it anymore. You can confirm a virtual private gateway has been completely detached from a VPC by describing the virtual private gateway (any attachments to the virtual private gateway are also described).

You must wait for the attachment's state to switch to detached before you can delete the VPC or attach a different VPC to the virtual private gateway.

See also: AWS API Documentation

Request Syntax

response = client.detach_vpn_gateway(
    VpcId='string',
    VpnGatewayId='string',
    DryRun=True|False
)
Parameters
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • VpnGatewayId (string) --

    [REQUIRED]

    The ID of the virtual private gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

disable_ebs_encryption_by_default(**kwargs)

Disables EBS encryption by default for your account in the current Region.

After you disable encryption by default, you can still create encrypted volumes by enabling encryption when you create each volume.

Disabling encryption by default does not change the encryption status of your existing volumes.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disable_ebs_encryption_by_default(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'EbsEncryptionByDefault': True|False
}

Response Structure

  • (dict) --
    • EbsEncryptionByDefault (boolean) --

      The updated status of encryption by default.

disable_fast_launch(**kwargs)

Discontinue faster launching for a Windows AMI, and clean up existing pre-provisioned snapshots. When you disable faster launching, the AMI uses the standard launch process for each instance. All pre-provisioned snapshots must be removed before you can enable faster launching again.

Note

To change these settings, you must own the AMI.

See also: AWS API Documentation

Request Syntax

response = client.disable_fast_launch(
    ImageId='string',
    Force=True|False,
    DryRun=True|False
)
Parameters
  • ImageId (string) --

    [REQUIRED]

    The ID of the image for which you’re turning off faster launching, and removing pre-provisioned snapshots.

  • Force (boolean) -- Forces the image settings to turn off faster launching for your Windows AMI. This parameter overrides any errors that are encountered while cleaning up resources in your account.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ImageId': 'string',
    'ResourceType': 'snapshot',
    'SnapshotConfiguration': {
        'TargetResourceCount': 123
    },
    'LaunchTemplate': {
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'Version': 'string'
    },
    'MaxParallelLaunches': 123,
    'OwnerId': 'string',
    'State': 'enabling'|'enabling-failed'|'enabled'|'enabled-failed'|'disabling'|'disabling-failed',
    'StateTransitionReason': 'string',
    'StateTransitionTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ImageId (string) --

      The ID of the image for which faster-launching has been turned off.

    • ResourceType (string) --

      The pre-provisioning resource type that must be cleaned after turning off faster launching for the Windows AMI. Supported values include: snapshot .

    • SnapshotConfiguration (dict) --

      Parameters that were used for faster launching for the Windows AMI before faster launching was turned off. This informs the clean-up process.

      • TargetResourceCount (integer) --

        The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.

    • LaunchTemplate (dict) --

      The launch template that was used to launch Windows instances from pre-provisioned snapshots.

      • LaunchTemplateId (string) --

        The ID of the launch template for faster launching of the associated Windows AMI.

      • LaunchTemplateName (string) --

        The name of the launch template for faster launching of the associated Windows AMI.

      • Version (string) --

        The version of the launch template for faster launching of the associated Windows AMI.

    • MaxParallelLaunches (integer) --

      The maximum number of parallel instances to launch for creating resources.

    • OwnerId (string) --

      The owner of the Windows AMI for which faster launching was turned off.

    • State (string) --

      The current state of faster launching for the specified Windows AMI.

    • StateTransitionReason (string) --

      The reason that the state changed for faster launching for the Windows AMI.

    • StateTransitionTime (datetime) --

      The time that the state changed for faster launching for the Windows AMI.

disable_fast_snapshot_restores(**kwargs)

Disables fast snapshot restores for the specified snapshots in the specified Availability Zones.

See also: AWS API Documentation

Request Syntax

response = client.disable_fast_snapshot_restores(
    AvailabilityZones=[
        'string',
    ],
    SourceSnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • AvailabilityZones (list) --

    [REQUIRED]

    One or more Availability Zones. For example, us-east-2a .

    • (string) --
  • SourceSnapshotIds (list) --

    [REQUIRED]

    The IDs of one or more snapshots. For example, snap-1234567890abcdef0 .

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Successful': [
        {
            'SnapshotId': 'string',
            'AvailabilityZone': 'string',
            'State': 'enabling'|'optimizing'|'enabled'|'disabling'|'disabled',
            'StateTransitionReason': 'string',
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'EnablingTime': datetime(2015, 1, 1),
            'OptimizingTime': datetime(2015, 1, 1),
            'EnabledTime': datetime(2015, 1, 1),
            'DisablingTime': datetime(2015, 1, 1),
            'DisabledTime': datetime(2015, 1, 1)
        },
    ],
    'Unsuccessful': [
        {
            'SnapshotId': 'string',
            'FastSnapshotRestoreStateErrors': [
                {
                    'AvailabilityZone': 'string',
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Successful (list) --

      Information about the snapshots for which fast snapshot restores were successfully disabled.

      • (dict) --

        Describes fast snapshot restores that were successfully disabled.

        • SnapshotId (string) --

          The ID of the snapshot.

        • AvailabilityZone (string) --

          The Availability Zone.

        • State (string) --

          The state of fast snapshot restores for the snapshot.

        • StateTransitionReason (string) --

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling .
          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing , enabled , or disabled .
        • OwnerId (string) --

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime (datetime) --

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime (datetime) --

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime (datetime) --

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime (datetime) --

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime (datetime) --

          The time at which fast snapshot restores entered the disabled state.

    • Unsuccessful (list) --

      Information about the snapshots for which fast snapshot restores could not be disabled.

      • (dict) --

        Contains information about the errors that occurred when disabling fast snapshot restores.

        • SnapshotId (string) --

          The ID of the snapshot.

        • FastSnapshotRestoreStateErrors (list) --

          The errors.

          • (dict) --

            Contains information about an error that occurred when disabling fast snapshot restores.

            • AvailabilityZone (string) --

              The Availability Zone.

            • Error (dict) --

              The error.

              • Code (string) --

                The error code.

              • Message (string) --

                The error message.

disable_image_deprecation(**kwargs)

Cancels the deprecation of the specified AMI.

For more information, see Deprecate an AMI in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disable_image_deprecation(
    ImageId='string',
    DryRun=True|False
)
Parameters
  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

disable_ipam_organization_admin_account(**kwargs)

Disable the IPAM account. For more information, see Enable integration with Organizations in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disable_ipam_organization_admin_account(
    DryRun=True|False,
    DelegatedAdminAccountId='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • DelegatedAdminAccountId (string) --

    [REQUIRED]

    The Organizations member account ID that you want to disable as IPAM account.

Return type

dict

Returns

Response Syntax

{
    'Success': True|False
}

Response Structure

  • (dict) --

    • Success (boolean) --

      The result of disabling the IPAM account.

disable_serial_console_access(**kwargs)

Disables access to the EC2 serial console of all instances for your account. By default, access to the EC2 serial console is disabled for your account. For more information, see Manage account access to the EC2 serial console in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disable_serial_console_access(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'SerialConsoleAccessEnabled': True|False
}

Response Structure

  • (dict) --
    • SerialConsoleAccessEnabled (boolean) --

      If true , access to the EC2 serial console of all instances is enabled for your account. If false , access to the EC2 serial console of all instances is disabled for your account.

disable_transit_gateway_route_table_propagation(**kwargs)

Disables the specified resource attachment from propagating routes to the specified propagation route table.

See also: AWS API Documentation

Request Syntax

response = client.disable_transit_gateway_route_table_propagation(
    TransitGatewayRouteTableId='string',
    TransitGatewayAttachmentId='string',
    DryRun=True|False,
    TransitGatewayRouteTableAnnouncementId='string'
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the propagation route table.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TransitGatewayRouteTableAnnouncementId (string) -- The ID of the route table announcement.
Return type

dict

Returns

Response Syntax

{
    'Propagation': {
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'TransitGatewayRouteTableId': 'string',
        'State': 'enabling'|'enabled'|'disabling'|'disabled',
        'TransitGatewayRouteTableAnnouncementId': 'string'
    }
}

Response Structure

  • (dict) --

    • Propagation (dict) --

      Information about route propagation.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The resource type. Note that the tgw-peering resource type has been deprecated.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • State (string) --

        The state.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

disable_vgw_route_propagation(**kwargs)

Disables a virtual private gateway (VGW) from propagating routes to a specified route table of a VPC.

See also: AWS API Documentation

Request Syntax

response = client.disable_vgw_route_propagation(
    GatewayId='string',
    RouteTableId='string',
    DryRun=True|False
)
Parameters
  • GatewayId (string) --

    [REQUIRED]

    The ID of the virtual private gateway.

  • RouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example disables the specified virtual private gateway from propagating static routes to the specified route table.

response = client.disable_vgw_route_propagation(
    GatewayId='vgw-9a4cacf3',
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disable_vpc_classic_link(
    DryRun=True|False,
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

Disables ClassicLink DNS support for a VPC. If disabled, DNS hostnames resolve to public IP addresses when addressed between a linked EC2-Classic instance and instances in the VPC to which it's linked. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide .

You must specify a VPC ID in the request.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disable_vpc_classic_link_dns_support(
    VpcId='string'
)
Parameters
VpcId (string) -- The ID of the VPC.
Return type
dict
Returns
Response Syntax
{
    'Return': True|False
}

Response Structure

  • (dict) --
    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

disassociate_address(**kwargs)

Disassociates an Elastic IP address from the instance or network interface it's associated with.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_address(
    AssociationId='string',
    PublicIp='string',
    DryRun=True|False
)
Parameters
  • AssociationId (string) -- [EC2-VPC] The association ID. Required for EC2-VPC.
  • PublicIp (string) -- [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example disassociates an Elastic IP address from an instance in a VPC.

response = client.disassociate_address(
    AssociationId='eipassoc-2bebb745',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example disassociates an Elastic IP address from an instance in EC2-Classic.

response = client.disassociate_address(
    PublicIp='198.51.100.0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
disassociate_client_vpn_target_network(**kwargs)

Disassociates a target network from the specified Client VPN endpoint. When you disassociate the last target network from a Client VPN, the following happens:

  • The route that was automatically added for the VPC is deleted
  • All active client connections are terminated
  • New client connections are disallowed
  • The Client VPN endpoint's status changes to pending-associate

See also: AWS API Documentation

Request Syntax

response = client.disassociate_client_vpn_target_network(
    ClientVpnEndpointId='string',
    AssociationId='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint from which to disassociate the target network.

  • AssociationId (string) --

    [REQUIRED]

    The ID of the target network association.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AssociationId': 'string',
    'Status': {
        'Code': 'associating'|'associated'|'association-failed'|'disassociating'|'disassociated',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • AssociationId (string) --

      The ID of the target network association.

    • Status (dict) --

      The current state of the target network association.

      • Code (string) --

        The state of the target network association.

      • Message (string) --

        A message about the status of the target network association, if applicable.

disassociate_enclave_certificate_iam_role(**kwargs)

Disassociates an IAM role from an Certificate Manager (ACM) certificate. Disassociating an IAM role from an ACM certificate removes the Amazon S3 object that contains the certificate, certificate chain, and encrypted private key from the Amazon S3 bucket. It also revokes the IAM role's permission to use the KMS key used to encrypt the private key. This effectively revokes the role's permission to use the certificate.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_enclave_certificate_iam_role(
    CertificateArn='string',
    RoleArn='string',
    DryRun=True|False
)
Parameters
  • CertificateArn (string) -- The ARN of the ACM certificate from which to disassociate the IAM role.
  • RoleArn (string) -- The ARN of the IAM role to disassociate.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

disassociate_iam_instance_profile(**kwargs)

Disassociates an IAM instance profile from a running or stopped instance.

Use DescribeIamInstanceProfileAssociations to get the association ID.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_iam_instance_profile(
    AssociationId='string'
)
Parameters
AssociationId (string) --

[REQUIRED]

The ID of the IAM instance profile association.

Return type
dict
Returns
Response Syntax
{
    'IamInstanceProfileAssociation': {
        'AssociationId': 'string',
        'InstanceId': 'string',
        'IamInstanceProfile': {
            'Arn': 'string',
            'Id': 'string'
        },
        'State': 'associating'|'associated'|'disassociating'|'disassociated',
        'Timestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --
    • IamInstanceProfileAssociation (dict) --

      Information about the IAM instance profile association.

      • AssociationId (string) --

        The ID of the association.

      • InstanceId (string) --

        The ID of the instance.

      • IamInstanceProfile (dict) --

        The IAM instance profile.

        • Arn (string) --

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

        • Id (string) --

          The ID of the instance profile.

      • State (string) --

        The state of the association.

      • Timestamp (datetime) --

        The time the IAM instance profile was associated with the instance.

Examples

This example disassociates the specified IAM instance profile from an instance.

response = client.disassociate_iam_instance_profile(
    AssociationId='iip-assoc-05020b59952902f5f',
)

print(response)

Expected Output:

{
    'IamInstanceProfileAssociation': {
        'AssociationId': 'iip-assoc-05020b59952902f5f',
        'IamInstanceProfile': {
            'Arn': 'arn:aws:iam::123456789012:instance-profile/admin-role',
            'Id': 'AIPAI5IVIHMFFYY2DKV5Y',
        },
        'InstanceId': 'i-123456789abcde123',
        'State': 'disassociating',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
disassociate_instance_event_window(**kwargs)

Disassociates one or more targets from an event window.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disassociate_instance_event_window(
    DryRun=True|False,
    InstanceEventWindowId='string',
    AssociationTarget={
        'InstanceIds': [
            'string',
        ],
        'InstanceTags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'DedicatedHostIds': [
            'string',
        ]
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceEventWindowId (string) --

    [REQUIRED]

    The ID of the event window.

  • AssociationTarget (dict) --

    [REQUIRED]

    One or more targets to disassociate from the specified event window.

    • InstanceIds (list) --

      The IDs of the instances to disassociate from the event window.

      • (string) --
    • InstanceTags (list) --

      The instance tags to disassociate from the event window. Any instances associated with the tags will be disassociated from the event window.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

    • DedicatedHostIds (list) --

      The IDs of the Dedicated Hosts to disassociate from the event window.

      • (string) --
Return type

dict

Returns

Response Syntax

{
    'InstanceEventWindow': {
        'InstanceEventWindowId': 'string',
        'TimeRanges': [
            {
                'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'StartHour': 123,
                'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'EndHour': 123
            },
        ],
        'Name': 'string',
        'CronExpression': 'string',
        'AssociationTarget': {
            'InstanceIds': [
                'string',
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'DedicatedHostIds': [
                'string',
            ]
        },
        'State': 'creating'|'deleting'|'active'|'deleted',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • InstanceEventWindow (dict) --

      Information about the event window.

      • InstanceEventWindowId (string) --

        The ID of the event window.

      • TimeRanges (list) --

        One or more time ranges defined for the event window.

        • (dict) --

          The start day and time and the end day and time of the time range, in UTC.

          • StartWeekDay (string) --

            The day on which the time range begins.

          • StartHour (integer) --

            The hour when the time range begins.

          • EndWeekDay (string) --

            The day on which the time range ends.

          • EndHour (integer) --

            The hour when the time range ends.

      • Name (string) --

        The name of the event window.

      • CronExpression (string) --

        The cron expression defined for the event window.

      • AssociationTarget (dict) --

        One or more targets associated with the event window.

        • InstanceIds (list) --

          The IDs of the instances associated with the event window.

          • (string) --
        • Tags (list) --

          The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • DedicatedHostIds (list) --

          The IDs of the Dedicated Hosts associated with the event window.

          • (string) --
      • State (string) --

        The current state of the event window.

      • Tags (list) --

        The instance tags associated with the event window.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

disassociate_route_table(**kwargs)

Disassociates a subnet or gateway from a route table.

After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.disassociate_route_table(
    AssociationId='string',
    DryRun=True|False
)
Parameters
  • AssociationId (string) --

    [REQUIRED]

    The association ID representing the current association between the route table and subnet or gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example disassociates the specified route table from its associated subnet.

response = client.disassociate_route_table(
    AssociationId='rtbassoc-781d0d1a',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
disassociate_subnet_cidr_block(**kwargs)

Disassociates a CIDR block from a subnet. Currently, you can disassociate an IPv6 CIDR block only. You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_subnet_cidr_block(
    AssociationId='string'
)
Parameters
AssociationId (string) --

[REQUIRED]

The association ID for the CIDR block.

Return type
dict
Returns
Response Syntax
{
    'Ipv6CidrBlockAssociation': {
        'AssociationId': 'string',
        'Ipv6CidrBlock': 'string',
        'Ipv6CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        }
    },
    'SubnetId': 'string'
}

Response Structure

  • (dict) --
    • Ipv6CidrBlockAssociation (dict) --

      Information about the IPv6 CIDR block association.

      • AssociationId (string) --

        The ID of the association.

      • Ipv6CidrBlock (string) --

        The IPv6 CIDR block.

      • Ipv6CidrBlockState (dict) --

        The state of the CIDR block.

        • State (string) --

          The state of a CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

    • SubnetId (string) --

      The ID of the subnet.

disassociate_transit_gateway_multicast_domain(**kwargs)

Disassociates the specified subnets from the transit gateway multicast domain.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_transit_gateway_multicast_domain(
    TransitGatewayMulticastDomainId='string',
    TransitGatewayAttachmentId='string',
    SubnetIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • TransitGatewayAttachmentId (string) -- The ID of the attachment.
  • SubnetIds (list) --

    The IDs of the subnets;

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Associations': {
        'TransitGatewayMulticastDomainId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'ResourceOwnerId': 'string',
        'Subnets': [
            {
                'SubnetId': 'string',
                'State': 'pendingAcceptance'|'associating'|'associated'|'disassociating'|'disassociated'|'rejected'|'failed'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Associations (dict) --

      Information about the association.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The type of resource, for example a VPC attachment.

      • ResourceOwnerId (string) --

        The ID of the Amazon Web Services account that owns the resource.

      • Subnets (list) --

        The subnets associated with the multicast domain.

        • (dict) --

          Describes the subnet association with the transit gateway multicast domain.

          • SubnetId (string) --

            The ID of the subnet.

          • State (string) --

            The state of the subnet association.

disassociate_transit_gateway_policy_table(**kwargs)

Removes the association between an an attachment and a policy table.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_transit_gateway_policy_table(
    TransitGatewayPolicyTableId='string',
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayPolicyTableId (string) --

    [REQUIRED]

    The ID of the disassociated policy table.

  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the transit gateway attachment to disassociate from the policy table.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Association': {
        'TransitGatewayPolicyTableId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'State': 'associating'|'associated'|'disassociating'|'disassociated'
    }
}

Response Structure

  • (dict) --

    • Association (dict) --

      Returns details about the transit gateway policy table disassociation.

      • TransitGatewayPolicyTableId (string) --

        The ID of the transit gateway policy table.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway attachment.

      • ResourceId (string) --

        The resource ID of the transit gateway attachment.

      • ResourceType (string) --

        The resource type for the transit gateway policy table association.

      • State (string) --

        The state of the transit gateway policy table association.

disassociate_transit_gateway_route_table(**kwargs)

Disassociates a resource attachment from a transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_transit_gateway_route_table(
    TransitGatewayRouteTableId='string',
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Association': {
        'TransitGatewayRouteTableId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'State': 'associating'|'associated'|'disassociating'|'disassociated'
    }
}

Response Structure

  • (dict) --

    • Association (dict) --

      Information about the association.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The resource type. Note that the tgw-peering resource type has been deprecated.

      • State (string) --

        The state of the association.

disassociate_trunk_interface(**kwargs)

Note

This API action is currently in limited preview only . If you are interested in using this feature, contact your account manager.

Removes an association between a branch network interface with a trunk network interface.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_trunk_interface(
    AssociationId='string',
    ClientToken='string',
    DryRun=True|False
)
Parameters
  • AssociationId (string) --

    [REQUIRED]

    The ID of the association

  • ClientToken (string) --

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

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

    • ClientToken (string) --

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

disassociate_vpc_cidr_block(**kwargs)

Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must specify its association ID. You can get the association ID by using DescribeVpcs . You must detach or delete all gateways and resources that are associated with the CIDR block before you can disassociate it.

You cannot disassociate the CIDR block with which you originally created the VPC (the primary CIDR block).

See also: AWS API Documentation

Request Syntax

response = client.disassociate_vpc_cidr_block(
    AssociationId='string'
)
Parameters
AssociationId (string) --

[REQUIRED]

The association ID for the CIDR block.

Return type
dict
Returns
Response Syntax
{
    'Ipv6CidrBlockAssociation': {
        'AssociationId': 'string',
        'Ipv6CidrBlock': 'string',
        'Ipv6CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        },
        'NetworkBorderGroup': 'string',
        'Ipv6Pool': 'string'
    },
    'CidrBlockAssociation': {
        'AssociationId': 'string',
        'CidrBlock': 'string',
        'CidrBlockState': {
            'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
            'StatusMessage': 'string'
        }
    },
    'VpcId': 'string'
}

Response Structure

  • (dict) --
    • Ipv6CidrBlockAssociation (dict) --

      Information about the IPv6 CIDR block association.

      • AssociationId (string) --

        The association ID for the IPv6 CIDR block.

      • Ipv6CidrBlock (string) --

        The IPv6 CIDR block.

      • Ipv6CidrBlockState (dict) --

        Information about the state of the CIDR block.

        • State (string) --

          The state of the CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

      • NetworkBorderGroup (string) --

        The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1 .

      • Ipv6Pool (string) --

        The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

    • CidrBlockAssociation (dict) --

      Information about the IPv4 CIDR block association.

      • AssociationId (string) --

        The association ID for the IPv4 CIDR block.

      • CidrBlock (string) --

        The IPv4 CIDR block.

      • CidrBlockState (dict) --

        Information about the state of the CIDR block.

        • State (string) --

          The state of the CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

    • VpcId (string) --

      The ID of the VPC.

enable_ebs_encryption_by_default(**kwargs)

Enables EBS encryption by default for your account in the current Region.

After you enable encryption by default, the EBS volumes that you create are always encrypted, either using the default KMS key or the KMS key that you specified when you created each volume. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

You can specify the default KMS key for encryption by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId .

Enabling encryption by default has no effect on the encryption status of your existing volumes.

After you enable encryption by default, you can no longer launch instances using instance types that do not support encryption. For more information, see Supported instance types .

See also: AWS API Documentation

Request Syntax

response = client.enable_ebs_encryption_by_default(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'EbsEncryptionByDefault': True|False
}

Response Structure

  • (dict) --
    • EbsEncryptionByDefault (boolean) --

      The updated status of encryption by default.

enable_fast_launch(**kwargs)

When you enable faster launching for a Windows AMI, images are pre-provisioned, using snapshots to launch instances up to 65% faster. To create the optimized Windows image, Amazon EC2 launches an instance and runs through Sysprep steps, rebooting as required. Then it creates a set of reserved snapshots that are used for subsequent launches. The reserved snapshots are automatically replenished as they are used, depending on your settings for launch frequency.

Note

To change these settings, you must own the AMI.

See also: AWS API Documentation

Request Syntax

response = client.enable_fast_launch(
    ImageId='string',
    ResourceType='string',
    SnapshotConfiguration={
        'TargetResourceCount': 123
    },
    LaunchTemplate={
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'Version': 'string'
    },
    MaxParallelLaunches=123,
    DryRun=True|False
)
Parameters
  • ImageId (string) --

    [REQUIRED]

    The ID of the image for which you’re enabling faster launching.

  • ResourceType (string) -- The type of resource to use for pre-provisioning the Windows AMI for faster launching. Supported values include: snapshot , which is the default value.
  • SnapshotConfiguration (dict) --

    Configuration settings for creating and managing the snapshots that are used for pre-provisioning the Windows AMI for faster launching. The associated ResourceType must be snapshot .

    • TargetResourceCount (integer) --

      The number of pre-provisioned snapshots to keep on hand for a fast-launch enabled Windows AMI.

  • LaunchTemplate (dict) --

    The launch template to use when launching Windows instances from pre-provisioned snapshots. Launch template parameters can include either the name or ID of the launch template, but not both.

    • LaunchTemplateId (string) --

      The ID of the launch template to use for faster launching for a Windows AMI.

    • LaunchTemplateName (string) --

      The name of the launch template to use for faster launching for a Windows AMI.

    • Version (string) -- [REQUIRED]

      The version of the launch template to use for faster launching for a Windows AMI.

  • MaxParallelLaunches (integer) -- The maximum number of parallel instances to launch for creating resources. Value must be 6 or greater.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ImageId': 'string',
    'ResourceType': 'snapshot',
    'SnapshotConfiguration': {
        'TargetResourceCount': 123
    },
    'LaunchTemplate': {
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'Version': 'string'
    },
    'MaxParallelLaunches': 123,
    'OwnerId': 'string',
    'State': 'enabling'|'enabling-failed'|'enabled'|'enabled-failed'|'disabling'|'disabling-failed',
    'StateTransitionReason': 'string',
    'StateTransitionTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • ImageId (string) --

      The image ID that identifies the Windows AMI for which faster launching was enabled.

    • ResourceType (string) --

      The type of resource that was defined for pre-provisioning the Windows AMI for faster launching.

    • SnapshotConfiguration (dict) --

      The configuration settings that were defined for creating and managing the pre-provisioned snapshots for faster launching of the Windows AMI. This property is returned when the associated resourceType is snapshot .

      • TargetResourceCount (integer) --

        The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.

    • LaunchTemplate (dict) --

      The launch template that is used when launching Windows instances from pre-provisioned snapshots.

      • LaunchTemplateId (string) --

        The ID of the launch template for faster launching of the associated Windows AMI.

      • LaunchTemplateName (string) --

        The name of the launch template for faster launching of the associated Windows AMI.

      • Version (string) --

        The version of the launch template for faster launching of the associated Windows AMI.

    • MaxParallelLaunches (integer) --

      The maximum number of parallel instances to launch for creating resources.

    • OwnerId (string) --

      The owner ID for the Windows AMI for which faster launching was enabled.

    • State (string) --

      The current state of faster launching for the specified Windows AMI.

    • StateTransitionReason (string) --

      The reason that the state changed for faster launching for the Windows AMI.

    • StateTransitionTime (datetime) --

      The time that the state changed for faster launching for the Windows AMI.

enable_fast_snapshot_restores(**kwargs)

Enables fast snapshot restores for the specified snapshots in the specified Availability Zones.

You get the full benefit of fast snapshot restores after they enter the enabled state. To get the current state of fast snapshot restores, use DescribeFastSnapshotRestores . To disable fast snapshot restores, use DisableFastSnapshotRestores .

For more information, see Amazon EBS fast snapshot restore in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.enable_fast_snapshot_restores(
    AvailabilityZones=[
        'string',
    ],
    SourceSnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • AvailabilityZones (list) --

    [REQUIRED]

    One or more Availability Zones. For example, us-east-2a .

    • (string) --
  • SourceSnapshotIds (list) --

    [REQUIRED]

    The IDs of one or more snapshots. For example, snap-1234567890abcdef0 . You can specify a snapshot that was shared with you from another Amazon Web Services account.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Successful': [
        {
            'SnapshotId': 'string',
            'AvailabilityZone': 'string',
            'State': 'enabling'|'optimizing'|'enabled'|'disabling'|'disabled',
            'StateTransitionReason': 'string',
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'EnablingTime': datetime(2015, 1, 1),
            'OptimizingTime': datetime(2015, 1, 1),
            'EnabledTime': datetime(2015, 1, 1),
            'DisablingTime': datetime(2015, 1, 1),
            'DisabledTime': datetime(2015, 1, 1)
        },
    ],
    'Unsuccessful': [
        {
            'SnapshotId': 'string',
            'FastSnapshotRestoreStateErrors': [
                {
                    'AvailabilityZone': 'string',
                    'Error': {
                        'Code': 'string',
                        'Message': 'string'
                    }
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Successful (list) --

      Information about the snapshots for which fast snapshot restores were successfully enabled.

      • (dict) --

        Describes fast snapshot restores that were successfully enabled.

        • SnapshotId (string) --

          The ID of the snapshot.

        • AvailabilityZone (string) --

          The Availability Zone.

        • State (string) --

          The state of fast snapshot restores.

        • StateTransitionReason (string) --

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling .
          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing , enabled , or disabled .
        • OwnerId (string) --

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime (datetime) --

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime (datetime) --

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime (datetime) --

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime (datetime) --

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime (datetime) --

          The time at which fast snapshot restores entered the disabled state.

    • Unsuccessful (list) --

      Information about the snapshots for which fast snapshot restores could not be enabled.

      • (dict) --

        Contains information about the errors that occurred when enabling fast snapshot restores.

        • SnapshotId (string) --

          The ID of the snapshot.

        • FastSnapshotRestoreStateErrors (list) --

          The errors.

          • (dict) --

            Contains information about an error that occurred when enabling fast snapshot restores.

            • AvailabilityZone (string) --

              The Availability Zone.

            • Error (dict) --

              The error.

              • Code (string) --

                The error code.

              • Message (string) --

                The error message.

enable_image_deprecation(**kwargs)

Enables deprecation of the specified AMI at the specified date and time.

For more information, see Deprecate an AMI in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.enable_image_deprecation(
    ImageId='string',
    DeprecateAt=datetime(2015, 1, 1),
    DryRun=True|False
)
Parameters
  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI.

  • DeprecateAt (datetime) --

    [REQUIRED]

    The date and time to deprecate the AMI, in UTC, in the following format: YYYY -MM -DD T*HH* :MM :SS Z. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

    You can’t specify a date in the past. The upper limit for DeprecateAt is 10 years from now.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

enable_ipam_organization_admin_account(**kwargs)

Enable an Organizations member account as the IPAM admin account. You cannot select the Organizations management account as the IPAM admin account. For more information, see Enable integration with Organizations in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.enable_ipam_organization_admin_account(
    DryRun=True|False,
    DelegatedAdminAccountId='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • DelegatedAdminAccountId (string) --

    [REQUIRED]

    The Organizations member account ID that you want to enable as the IPAM account.

Return type

dict

Returns

Response Syntax

{
    'Success': True|False
}

Response Structure

  • (dict) --

    • Success (boolean) --

      The result of enabling the IPAM account.

enable_serial_console_access(**kwargs)

Enables access to the EC2 serial console of all instances for your account. By default, access to the EC2 serial console is disabled for your account. For more information, see Manage account access to the EC2 serial console in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.enable_serial_console_access(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'SerialConsoleAccessEnabled': True|False
}

Response Structure

  • (dict) --
    • SerialConsoleAccessEnabled (boolean) --

      If true , access to the EC2 serial console of all instances is enabled for your account. If false , access to the EC2 serial console of all instances is disabled for your account.

enable_transit_gateway_route_table_propagation(**kwargs)

Enables the specified attachment to propagate routes to the specified propagation route table.

See also: AWS API Documentation

Request Syntax

response = client.enable_transit_gateway_route_table_propagation(
    TransitGatewayRouteTableId='string',
    TransitGatewayAttachmentId='string',
    DryRun=True|False,
    TransitGatewayRouteTableAnnouncementId='string'
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the propagation route table.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TransitGatewayRouteTableAnnouncementId (string) -- The ID of the transit gateway route table announcement.
Return type

dict

Returns

Response Syntax

{
    'Propagation': {
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'TransitGatewayRouteTableId': 'string',
        'State': 'enabling'|'enabled'|'disabling'|'disabled',
        'TransitGatewayRouteTableAnnouncementId': 'string'
    }
}

Response Structure

  • (dict) --

    • Propagation (dict) --

      Information about route propagation.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The resource type. Note that the tgw-peering resource type has been deprecated.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • State (string) --

        The state.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

enable_vgw_route_propagation(**kwargs)

Enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.

See also: AWS API Documentation

Request Syntax

response = client.enable_vgw_route_propagation(
    GatewayId='string',
    RouteTableId='string',
    DryRun=True|False
)
Parameters
  • GatewayId (string) --

    [REQUIRED]

    The ID of the virtual private gateway that is attached to a VPC. The virtual private gateway must be attached to the same VPC that the routing tables are associated with.

  • RouteTableId (string) --

    [REQUIRED]

    The ID of the route table. The routing table must be associated with the same VPC that the virtual private gateway is attached to.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example enables the specified virtual private gateway to propagate static routes to the specified route table.

response = client.enable_vgw_route_propagation(
    GatewayId='vgw-9a4cacf3',
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
enable_volume_io(**kwargs)

Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.

See also: AWS API Documentation

Request Syntax

response = client.enable_volume_io(
    DryRun=True|False,
    VolumeId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VolumeId (string) --

    [REQUIRED]

    The ID of the volume.

Returns

None

Examples

This example enables I/O on volume vol-1234567890abcdef0.

response = client.enable_volume_io(
    VolumeId='vol-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC route tables have existing routes for address ranges within the 10.0.0.0/8 IP address range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 IP address ranges. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.enable_vpc_classic_link(
    DryRun=True|False,
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Enables a VPC to support DNS hostname resolution for ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance resolves to its private IP address when addressed from an instance in the VPC to which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves to its private IP address when addressed from a linked EC2-Classic instance. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide .

You must specify a VPC ID in the request.

See also: AWS API Documentation

Request Syntax

response = client.enable_vpc_classic_link_dns_support(
    VpcId='string'
)
Parameters
VpcId (string) -- The ID of the VPC.
Return type
dict
Returns
Response Syntax
{
    'Return': True|False
}

Response Structure

  • (dict) --
    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

export_client_vpn_client_certificate_revocation_list(**kwargs)

Downloads the client certificate revocation list for the specified Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.export_client_vpn_client_certificate_revocation_list(
    ClientVpnEndpointId='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CertificateRevocationList': 'string',
    'Status': {
        'Code': 'pending'|'active',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • CertificateRevocationList (string) --

      Information about the client certificate revocation list.

    • Status (dict) --

      The current state of the client certificate revocation list.

      • Code (string) --

        The state of the client certificate revocation list.

      • Message (string) --

        A message about the status of the client certificate revocation list, if applicable.

export_client_vpn_client_configuration(**kwargs)

Downloads the contents of the Client VPN endpoint configuration file for the specified Client VPN endpoint. The Client VPN endpoint configuration file includes the Client VPN endpoint and certificate information clients need to establish a connection with the Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.export_client_vpn_client_configuration(
    ClientVpnEndpointId='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ClientConfiguration': 'string'
}

Response Structure

  • (dict) --

    • ClientConfiguration (string) --

      The contents of the Client VPN endpoint configuration file.

export_image(**kwargs)

Exports an Amazon Machine Image (AMI) to a VM file. For more information, see Exporting a VM directly from an Amazon Machine Image (AMI) in the VM Import/Export User Guide .

See also: AWS API Documentation

Request Syntax

response = client.export_image(
    ClientToken='string',
    Description='string',
    DiskImageFormat='VMDK'|'RAW'|'VHD',
    DryRun=True|False,
    ImageId='string',
    S3ExportLocation={
        'S3Bucket': 'string',
        'S3Prefix': 'string'
    },
    RoleName='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • ClientToken (string) --

    Token to enable idempotency for export image requests.

    This field is autopopulated if not provided.

  • Description (string) -- A description of the image being exported. The maximum length is 255 characters.
  • DiskImageFormat (string) --

    [REQUIRED]

    The disk image format.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ImageId (string) --

    [REQUIRED]

    The ID of the image.

  • S3ExportLocation (dict) --

    [REQUIRED]

    The Amazon S3 bucket for the destination image. The destination bucket must exist.

    • S3Bucket (string) -- [REQUIRED]

      The destination Amazon S3 bucket.

    • S3Prefix (string) --

      The prefix (logical hierarchy) in the bucket.

  • RoleName (string) -- The name of the role that grants VM Import/Export permission to export images to your Amazon S3 bucket. If this parameter is not specified, the default role is named 'vmimport'.
  • TagSpecifications (list) --

    The tags to apply to the export image task during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'Description': 'string',
    'DiskImageFormat': 'VMDK'|'RAW'|'VHD',
    'ExportImageTaskId': 'string',
    'ImageId': 'string',
    'RoleName': 'string',
    'Progress': 'string',
    'S3ExportLocation': {
        'S3Bucket': 'string',
        'S3Prefix': 'string'
    },
    'Status': 'string',
    'StatusMessage': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Description (string) --

      A description of the image being exported.

    • DiskImageFormat (string) --

      The disk image format for the exported image.

    • ExportImageTaskId (string) --

      The ID of the export image task.

    • ImageId (string) --

      The ID of the image.

    • RoleName (string) --

      The name of the role that grants VM Import/Export permission to export images to your Amazon S3 bucket.

    • Progress (string) --

      The percent complete of the export image task.

    • S3ExportLocation (dict) --

      Information about the destination Amazon S3 bucket.

      • S3Bucket (string) --

        The destination Amazon S3 bucket.

      • S3Prefix (string) --

        The prefix (logical hierarchy) in the bucket.

    • Status (string) --

      The status of the export image task. The possible values are active , completed , deleting , and deleted .

    • StatusMessage (string) --

      The status message for the export image task.

    • Tags (list) --

      Any tags assigned to the export image 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 256 Unicode characters.

export_transit_gateway_routes(**kwargs)

Exports routes from the specified transit gateway route table to the specified S3 bucket. By default, all routes are exported. Alternatively, you can filter by CIDR range.

The routes are saved to the specified bucket in a JSON file. For more information, see Export Route Tables to Amazon S3 in Transit Gateways .

See also: AWS API Documentation

Request Syntax

response = client.export_transit_gateway_routes(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    S3Bucket='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

  • Filters (list) --

    One or more filters. The possible values are:

    • attachment.transit-gateway-attachment-id - The id of the transit gateway attachment.
    • attachment.resource-id - The resource id of the transit gateway attachment.
    • route-search.exact-match - The exact match of the specified filter.
    • route-search.longest-prefix-match - The longest prefix that matches the route.
    • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.
    • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.
    • state - The state of the route (active | blackhole ).
    • transit-gateway-route-destination-cidr-block - The CIDR range.
    • type - The type of route (propagated | static ).
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • S3Bucket (string) --

    [REQUIRED]

    The name of the S3 bucket.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'S3Location': 'string'
}

Response Structure

  • (dict) --

    • S3Location (string) --

      The URL of the exported file in Amazon S3. For example, s3://bucket_name /VPCTransitGateway/TransitGatewayRouteTables/file_name .

get_associated_enclave_certificate_iam_roles(**kwargs)

Returns the IAM roles that are associated with the specified ACM (ACM) certificate. It also returns the name of the Amazon S3 bucket and the Amazon S3 object key where the certificate, certificate chain, and encrypted private key bundle are stored, and the ARN of the KMS key that's used to encrypt the private key.

See also: AWS API Documentation

Request Syntax

response = client.get_associated_enclave_certificate_iam_roles(
    CertificateArn='string',
    DryRun=True|False
)
Parameters
  • CertificateArn (string) -- The ARN of the ACM certificate for which to view the associated IAM roles, encryption keys, and Amazon S3 object information.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AssociatedRoles': [
        {
            'AssociatedRoleArn': 'string',
            'CertificateS3BucketName': 'string',
            'CertificateS3ObjectKey': 'string',
            'EncryptionKmsKeyId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • AssociatedRoles (list) --

      Information about the associated IAM roles.

      • (dict) --

        Information about the associated IAM roles.

        • AssociatedRoleArn (string) --

          The ARN of the associated IAM role.

        • CertificateS3BucketName (string) --

          The name of the Amazon S3 bucket in which the Amazon S3 object is stored.

        • CertificateS3ObjectKey (string) --

          The key of the Amazon S3 object ey where the certificate, certificate chain, and encrypted private key bundle is stored. The object key is formated as follows: role_arn /certificate_arn .

        • EncryptionKmsKeyId (string) --

          The ID of the KMS customer master key (CMK) used to encrypt the private key.

get_associated_ipv6_pool_cidrs(**kwargs)

Gets information about the IPv6 CIDR block associations for a specified IPv6 address pool.

See also: AWS API Documentation

Request Syntax

response = client.get_associated_ipv6_pool_cidrs(
    PoolId='string',
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters
  • PoolId (string) --

    [REQUIRED]

    The ID of the IPv6 address pool.

  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Ipv6CidrAssociations': [
        {
            'Ipv6Cidr': 'string',
            'AssociatedResource': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Ipv6CidrAssociations (list) --

      Information about the IPv6 CIDR block associations.

      • (dict) --

        Describes an IPv6 CIDR block association.

        • Ipv6Cidr (string) --

          The IPv6 CIDR block.

        • AssociatedResource (string) --

          The resource that's associated with the IPv6 CIDR block.

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

get_capacity_reservation_usage(**kwargs)

Gets usage information about a Capacity Reservation. If the Capacity Reservation is shared, it shows usage information for the Capacity Reservation owner and each Amazon Web Services account that is currently using the shared capacity. If the Capacity Reservation is not shared, it shows only the Capacity Reservation owner's usage.

See also: AWS API Documentation

Request Syntax

response = client.get_capacity_reservation_usage(
    CapacityReservationId='string',
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters
  • CapacityReservationId (string) --

    [REQUIRED]

    The ID of the Capacity Reservation.

  • NextToken (string) -- The token to use to retrieve the next page of results.
  • MaxResults (integer) --

    The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.

    Valid range: Minimum value of 1. Maximum value of 1000.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'CapacityReservationId': 'string',
    'InstanceType': 'string',
    'TotalInstanceCount': 123,
    'AvailableInstanceCount': 123,
    'State': 'active'|'expired'|'cancelled'|'pending'|'failed',
    'InstanceUsages': [
        {
            'AccountId': 'string',
            'UsedInstanceCount': 123
        },
    ]
}

Response Structure

  • (dict) --

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

    • CapacityReservationId (string) --

      The ID of the Capacity Reservation.

    • InstanceType (string) --

      The type of instance for which the Capacity Reservation reserves capacity.

    • TotalInstanceCount (integer) --

      The number of instances for which the Capacity Reservation reserves capacity.

    • AvailableInstanceCount (integer) --

      The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

    • State (string) --

      The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

      • active - The Capacity Reservation is active and the capacity is available for your use.
      • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
      • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
      • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
      • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
    • InstanceUsages (list) --

      Information about the Capacity Reservation usage.

      • (dict) --

        Information about the Capacity Reservation usage.

        • AccountId (string) --

          The ID of the Amazon Web Services account that is making use of the Capacity Reservation.

        • UsedInstanceCount (integer) --

          The number of instances the Amazon Web Services account currently has in the Capacity Reservation.

get_coip_pool_usage(**kwargs)

Describes the allocations from the specified customer-owned address pool.

See also: AWS API Documentation

Request Syntax

response = client.get_coip_pool_usage(
    PoolId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • PoolId (string) --

    [REQUIRED]

    The ID of the address pool.

  • Filters (list) --

    One or more filters.

    • coip-address-usage.allocation-id - The allocation ID of the address.
    • coip-address-usage.aws-account-id - The ID of the Amazon Web Services account that is using the customer-owned IP address.
    • coip-address-usage.aws-service - The Amazon Web Services service that is using the customer-owned IP address.
    • coip-address-usage.co-ip - The customer-owned IP address.
    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CoipPoolId': 'string',
    'CoipAddressUsages': [
        {
            'AllocationId': 'string',
            'AwsAccountId': 'string',
            'AwsService': 'string',
            'CoIp': 'string'
        },
    ],
    'LocalGatewayRouteTableId': 'string'
}

Response Structure

  • (dict) --

    • CoipPoolId (string) --

      The ID of the customer-owned address pool.

    • CoipAddressUsages (list) --

      Information about the address usage.

      • (dict) --

        Describes address usage for a customer-owned address pool.

        • AllocationId (string) --

          The allocation ID of the address.

        • AwsAccountId (string) --

          The Amazon Web Services account ID.

        • AwsService (string) --

          The Amazon Web Services service.

        • CoIp (string) --

          The customer-owned IP address.

    • LocalGatewayRouteTableId (string) --

      The ID of the local gateway route table.

get_console_output(**kwargs)

Gets the console output for the specified instance. For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. For Windows instances, the instance console output includes the last three system event log errors.

By default, the console output returns buffered information that was posted shortly after an instance transition state (start, stop, reboot, or terminate). This information is available for at least one hour after the most recent post. Only the most recent 64 KB of console output is available.

You can optionally retrieve the latest serial console output at any time during the instance lifecycle. This option is supported on instance types that use the Nitro hypervisor.

For more information, see Instance console output in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_console_output(
    InstanceId='string',
    DryRun=True|False,
    Latest=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Latest (boolean) --

    When enabled, retrieves the latest console output for the instance.

    Default: disabled (false )

Return type

dict

Returns

Response Syntax

{
    'InstanceId': 'string',
    'Output': 'string',
    'Timestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The ID of the instance.

    • Output (string) --

      The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.

    • Timestamp (datetime) --

      The time at which the output was last updated.

Examples

This example gets the console output for the specified instance.

response = client.get_console_output(
    InstanceId='i-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'InstanceId': 'i-1234567890abcdef0',
    'Output': '...',
    'Timestamp': datetime(2018, 5, 25, 21, 23, 53, 4, 145, 0),
    'ResponseMetadata': {
        '...': '...',
    },
}
get_console_screenshot(**kwargs)

Retrieve a JPG-format screenshot of a running instance to help with troubleshooting.

The returned content is Base64-encoded.

See also: AWS API Documentation

Request Syntax

response = client.get_console_screenshot(
    DryRun=True|False,
    InstanceId='string',
    WakeUp=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • WakeUp (boolean) -- When set to true , acts as keystroke input and wakes up an instance that's in standby or "sleep" mode.
Return type

dict

Returns

Response Syntax

{
    'ImageData': 'string',
    'InstanceId': 'string'
}

Response Structure

  • (dict) --

    • ImageData (string) --

      The data that comprises the image.

    • InstanceId (string) --

      The ID of the instance.

get_default_credit_specification(**kwargs)

Describes the default credit option for CPU usage of a burstable performance instance family.

For more information, see Burstable performance instances in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_default_credit_specification(
    DryRun=True|False,
    InstanceFamily='t2'|'t3'|'t3a'|'t4g'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceFamily (string) --

    [REQUIRED]

    The instance family.

Return type

dict

Returns

Response Syntax

{
    'InstanceFamilyCreditSpecification': {
        'InstanceFamily': 't2'|'t3'|'t3a'|'t4g',
        'CpuCredits': 'string'
    }
}

Response Structure

  • (dict) --

    • InstanceFamilyCreditSpecification (dict) --

      The default credit option for CPU usage of the instance family.

      • InstanceFamily (string) --

        The instance family.

      • CpuCredits (string) --

        The default credit option for CPU usage of the instance family. Valid values are standard and unlimited .

get_ebs_default_kms_key_id(**kwargs)

Describes the default KMS key for EBS encryption by default for your account in this Region. You can change the default KMS key for encryption by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId .

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_ebs_default_kms_key_id(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'KmsKeyId': 'string'
}

Response Structure

  • (dict) --
    • KmsKeyId (string) --

      The Amazon Resource Name (ARN) of the default KMS key for encryption by default.

get_ebs_encryption_by_default(**kwargs)

Describes whether EBS encryption by default is enabled for your account in the current Region.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_ebs_encryption_by_default(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'EbsEncryptionByDefault': True|False
}

Response Structure

  • (dict) --
    • EbsEncryptionByDefault (boolean) --

      Indicates whether encryption by default is enabled.

get_flow_logs_integration_template(**kwargs)

Generates a CloudFormation template that streamlines and automates the integration of VPC flow logs with Amazon Athena. This make it easier for you to query and gain insights from VPC flow logs data. Based on the information that you provide, we configure resources in the template to do the following:

  • Create a table in Athena that maps fields to a custom log format
  • Create a Lambda function that updates the table with new partitions on a daily, weekly, or monthly basis
  • Create a table partitioned between two timestamps in the past
  • Create a set of named queries in Athena that you can use to get started quickly

See also: AWS API Documentation

Request Syntax

response = client.get_flow_logs_integration_template(
    DryRun=True|False,
    FlowLogId='string',
    ConfigDeliveryS3DestinationArn='string',
    IntegrateServices={
        'AthenaIntegrations': [
            {
                'IntegrationResultS3DestinationArn': 'string',
                'PartitionLoadFrequency': 'none'|'daily'|'weekly'|'monthly',
                'PartitionStartDate': datetime(2015, 1, 1),
                'PartitionEndDate': datetime(2015, 1, 1)
            },
        ]
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FlowLogId (string) --

    [REQUIRED]

    The ID of the flow log.

  • ConfigDeliveryS3DestinationArn (string) --

    [REQUIRED]

    To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.

  • IntegrateServices (dict) --

    [REQUIRED]

    Information about the service integration.

    • AthenaIntegrations (list) --

      Information about the integration with Amazon Athena.

      • (dict) --

        Describes integration options for Amazon Athena.

        • IntegrationResultS3DestinationArn (string) -- [REQUIRED]

          The location in Amazon S3 to store the generated CloudFormation template.

        • PartitionLoadFrequency (string) -- [REQUIRED]

          The schedule for adding new partitions to the table.

        • PartitionStartDate (datetime) --

          The start date for the partition.

        • PartitionEndDate (datetime) --

          The end date for the partition.

Return type

dict

Returns

Response Syntax

{
    'Result': 'string'
}

Response Structure

  • (dict) --

    • Result (string) --

      The generated CloudFormation template.

get_groups_for_capacity_reservation(**kwargs)

Lists the resource groups to which a Capacity Reservation has been added.

See also: AWS API Documentation

Request Syntax

response = client.get_groups_for_capacity_reservation(
    CapacityReservationId='string',
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters
  • CapacityReservationId (string) --

    [REQUIRED]

    The ID of the Capacity Reservation.

  • NextToken (string) -- The token to use to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of results to return for the request in a single page. The remaining results can be seen by sending another request with the returned nextToken value. This value can be between 5 and 500. If maxResults is given a larger value than 500, you receive an error.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'CapacityReservationGroups': [
        {
            'GroupArn': 'string',
            'OwnerId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

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

    • CapacityReservationGroups (list) --

      Information about the resource groups to which the Capacity Reservation has been added.

      • (dict) --

        Describes a resource group to which a Capacity Reservation has been added.

        • GroupArn (string) --

          The ARN of the resource group.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the resource group.

get_host_reservation_purchase_preview(**kwargs)

Preview a reservation purchase with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation.

This is a preview of the PurchaseHostReservation action and does not result in the offering being purchased.

See also: AWS API Documentation

Request Syntax

response = client.get_host_reservation_purchase_preview(
    HostIdSet=[
        'string',
    ],
    OfferingId='string'
)
Parameters
  • HostIdSet (list) --

    [REQUIRED]

    The IDs of the Dedicated Hosts with which the reservation is associated.

    • (string) --
  • OfferingId (string) --

    [REQUIRED]

    The offering ID of the reservation.

Return type

dict

Returns

Response Syntax

{
    'CurrencyCode': 'USD',
    'Purchase': [
        {
            'CurrencyCode': 'USD',
            'Duration': 123,
            'HostIdSet': [
                'string',
            ],
            'HostReservationId': 'string',
            'HourlyPrice': 'string',
            'InstanceFamily': 'string',
            'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
            'UpfrontPrice': 'string'
        },
    ],
    'TotalHourlyPrice': 'string',
    'TotalUpfrontPrice': 'string'
}

Response Structure

  • (dict) --

    • CurrencyCode (string) --

      The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD .

    • Purchase (list) --

      The purchase information of the Dedicated Host reservation and the Dedicated Hosts associated with it.

      • (dict) --

        Describes the result of the purchase.

        • CurrencyCode (string) --

          The currency in which the UpfrontPrice and HourlyPrice amounts are specified. At this time, the only supported currency is USD .

        • Duration (integer) --

          The duration of the reservation's term in seconds.

        • HostIdSet (list) --

          The IDs of the Dedicated Hosts associated with the reservation.

          • (string) --
        • HostReservationId (string) --

          The ID of the reservation.

        • HourlyPrice (string) --

          The hourly price of the reservation per hour.

        • InstanceFamily (string) --

          The instance family on the Dedicated Host that the reservation can be associated with.

        • PaymentOption (string) --

          The payment option for the reservation.

        • UpfrontPrice (string) --

          The upfront price of the reservation.

    • TotalHourlyPrice (string) --

      The potential total hourly price of the reservation per hour.

    • TotalUpfrontPrice (string) --

      The potential total upfront price. This is billed immediately.

get_instance_types_from_instance_requirements(**kwargs)

Returns a list of instance types with the specified instance attributes. You can use the response to preview the instance types without launching instances. Note that the response does not consider capacity.

When you specify multiple parameters, you get instance types that satisfy all of the specified parameters. If you specify multiple values for a parameter, you get instance types that satisfy any of the specified values.

For more information, see Preview instance types with specified attributes , Attribute-based instance type selection for EC2 Fleet , Attribute-based instance type selection for Spot Fleet , and Spot placement score in the Amazon EC2 User Guide , and Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_instance_types_from_instance_requirements(
    DryRun=True|False,
    ArchitectureTypes=[
        'i386'|'x86_64'|'arm64'|'x86_64_mac',
    ],
    VirtualizationTypes=[
        'hvm'|'paravirtual',
    ],
    InstanceRequirements={
        'VCpuCount': {
            'Min': 123,
            'Max': 123
        },
        'MemoryMiB': {
            'Min': 123,
            'Max': 123
        },
        'CpuManufacturers': [
            'intel'|'amd'|'amazon-web-services',
        ],
        'MemoryGiBPerVCpu': {
            'Min': 123.0,
            'Max': 123.0
        },
        'ExcludedInstanceTypes': [
            'string',
        ],
        'InstanceGenerations': [
            'current'|'previous',
        ],
        'SpotMaxPricePercentageOverLowestPrice': 123,
        'OnDemandMaxPricePercentageOverLowestPrice': 123,
        'BareMetal': 'included'|'required'|'excluded',
        'BurstablePerformance': 'included'|'required'|'excluded',
        'RequireHibernateSupport': True|False,
        'NetworkInterfaceCount': {
            'Min': 123,
            'Max': 123
        },
        'LocalStorage': 'included'|'required'|'excluded',
        'LocalStorageTypes': [
            'hdd'|'ssd',
        ],
        'TotalLocalStorageGB': {
            'Min': 123.0,
            'Max': 123.0
        },
        'BaselineEbsBandwidthMbps': {
            'Min': 123,
            'Max': 123
        },
        'AcceleratorTypes': [
            'gpu'|'fpga'|'inference',
        ],
        'AcceleratorCount': {
            'Min': 123,
            'Max': 123
        },
        'AcceleratorManufacturers': [
            'nvidia'|'amd'|'amazon-web-services'|'xilinx',
        ],
        'AcceleratorNames': [
            'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
        ],
        'AcceleratorTotalMemoryMiB': {
            'Min': 123,
            'Max': 123
        }
    },
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ArchitectureTypes (list) --

    [REQUIRED]

    The processor architecture type.

    • (string) --
  • VirtualizationTypes (list) --

    [REQUIRED]

    The virtualization type.

    • (string) --
  • InstanceRequirements (dict) --

    [REQUIRED]

    The attributes required for the instance types.

    • VCpuCount (dict) -- [REQUIRED]

      The minimum and maximum number of vCPUs.

      • Min (integer) -- [REQUIRED]

        The minimum number of vCPUs. To specify no minimum limit, specify 0 .

      • Max (integer) --

        The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

    • MemoryMiB (dict) -- [REQUIRED]

      The minimum and maximum amount of memory, in MiB.

      • Min (integer) -- [REQUIRED]

        The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

      • Max (integer) --

        The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

    • CpuManufacturers (list) --

      The CPU manufacturers to include.

      • For instance types with Intel CPUs, specify intel .
      • For instance types with AMD CPUs, specify amd .
      • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

      Note

      Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

      Default: Any manufacturer

      • (string) --
    • MemoryGiBPerVCpu (dict) --

      The minimum and maximum amount of memory per vCPU, in GiB.

      Default: No minimum or maximum limits

      • Min (float) --

        The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

      • Max (float) --

        The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

    • ExcludedInstanceTypes (list) --

      The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

      For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

      Default: No excluded instance types

      • (string) --
    • InstanceGenerations (list) --

      Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

      For current generation instance types, specify current .

      For previous generation instance types, specify previous .

      Default: Current and previous generation instance types

      • (string) --
    • SpotMaxPricePercentageOverLowestPrice (integer) --

      The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

      To turn off price protection, specify a high value, such as 999999 .

      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

      Note

      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

      Default: 100

    • OnDemandMaxPricePercentageOverLowestPrice (integer) --

      The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

      To turn off price protection, specify a high value, such as 999999 .

      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

      Note

      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

      Default: 20

    • BareMetal (string) --

      Indicates whether bare metal instance types must be included, excluded, or required.

      • To include bare metal instance types, specify included .
      • To require only bare metal instance types, specify required .
      • To exclude bare metal instance types, specify excluded .

      Default: excluded

    • BurstablePerformance (string) --

      Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

      • To include burstable performance instance types, specify included .
      • To require only burstable performance instance types, specify required .
      • To exclude burstable performance instance types, specify excluded .

      Default: excluded

    • RequireHibernateSupport (boolean) --

      Indicates whether instance types must support hibernation for On-Demand Instances.

      This parameter is not supported for GetSpotPlacementScores .

      Default: false

    • NetworkInterfaceCount (dict) --

      The minimum and maximum number of network interfaces.

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

    • LocalStorage (string) --

      Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

      • To include instance types with instance store volumes, specify included .
      • To require only instance types with instance store volumes, specify required .
      • To exclude instance types with instance store volumes, specify excluded .

      Default: included

    • LocalStorageTypes (list) --

      The type of local storage that is required.

      • For instance types with hard disk drive (HDD) storage, specify hdd .
      • For instance types with solid state drive (SSD) storage, specify ssd .

      Default: hdd and ssd

      • (string) --
    • TotalLocalStorageGB (dict) --

      The minimum and maximum amount of total local storage, in GB.

      Default: No minimum or maximum limits

      • Min (float) --

        The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

      • Max (float) --

        The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

    • BaselineEbsBandwidthMbps (dict) --

      The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

    • AcceleratorTypes (list) --

      The accelerator types that must be on the instance type.

      • To include instance types with GPU hardware, specify gpu .
      • To include instance types with FPGA hardware, specify fpga .
      • To include instance types with inference hardware, specify inference .

      Default: Any accelerator type

      • (string) --
    • AcceleratorCount (dict) --

      The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

      To exclude accelerator-enabled instance types, set Max to 0 .

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum number of accelerators. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

    • AcceleratorManufacturers (list) --

      Indicates whether instance types must have accelerators by specific manufacturers.

      • For instance types with NVIDIA devices, specify nvidia .
      • For instance types with AMD devices, specify amd .
      • For instance types with Amazon Web Services devices, specify amazon-web-services .
      • For instance types with Xilinx devices, specify xilinx .

      Default: Any manufacturer

      • (string) --
    • AcceleratorNames (list) --

      The accelerators that must be on the instance type.

      • For instance types with NVIDIA A100 GPUs, specify a100 .
      • For instance types with NVIDIA V100 GPUs, specify v100 .
      • For instance types with NVIDIA K80 GPUs, specify k80 .
      • For instance types with NVIDIA T4 GPUs, specify t4 .
      • For instance types with NVIDIA M60 GPUs, specify m60 .
      • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
      • For instance types with Xilinx VU9P FPGAs, specify vu9p .

      Default: Any accelerator

      • (string) --
    • AcceleratorTotalMemoryMiB (dict) --

      The minimum and maximum amount of total accelerator memory, in MiB.

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
Return type

dict

Returns

Response Syntax

{
    'InstanceTypes': [
        {
            'InstanceType': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InstanceTypes (list) --

      The instance types with the specified instance attributes.

      • (dict) --

        The list of instance types with the specified instance attributes.

        • InstanceType (string) --

          The matching instance type.

    • NextToken (string) --

      The token for the next set of results.

get_instance_uefi_data(**kwargs)

A binary representation of the UEFI variable store. Only non-volatile variables are stored. This is a base64 encoded and zlib compressed binary value that must be properly encoded.

When you use register-image to create an AMI, you can create an exact copy of your variable store by passing the UEFI data in the UefiData parameter. You can modify the UEFI data by using the python-uefivars tool on GitHub. You can use the tool to convert the UEFI data into a human-readable format (JSON), which you can inspect and modify, and then convert back into the binary format to use with register-image.

For more information, see UEFI Secure Boot in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_instance_uefi_data(
    InstanceId='string',
    DryRun=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance from which to retrieve the UEFI data.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InstanceId': 'string',
    'UefiData': 'string'
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The ID of the instance from which to retrieve the UEFI data.

    • UefiData (string) --

      Base64 representation of the non-volatile UEFI variable store.

get_ipam_address_history(**kwargs)

Retrieve historical information about a CIDR within an IPAM scope. For more information, see View the history of IP addresses in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_ipam_address_history(
    DryRun=True|False,
    Cidr='string',
    IpamScopeId='string',
    VpcId='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Cidr (string) --

    [REQUIRED]

    The CIDR you want the history of. The CIDR can be an IPv4 or IPv6 IP address range. If you enter a /16 IPv4 CIDR, you will get records that match it exactly. You will not get records for any subnets within the /16 CIDR.

  • IpamScopeId (string) --

    [REQUIRED]

    The ID of the IPAM scope that the CIDR is in.

  • VpcId (string) -- The ID of the VPC you want your history records filtered by.
  • StartTime (datetime) -- The start of the time period for which you are looking for history. If you omit this option, it will default to the value of EndTime.
  • EndTime (datetime) -- The end of the time period for which you are looking for history. If you omit this option, it will default to the current time.
  • MaxResults (integer) -- The maximum number of historical results you would like returned per page. Defaults to 100.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'HistoryRecords': [
        {
            'ResourceOwnerId': 'string',
            'ResourceRegion': 'string',
            'ResourceType': 'eip'|'vpc'|'subnet'|'network-interface'|'instance',
            'ResourceId': 'string',
            'ResourceCidr': 'string',
            'ResourceName': 'string',
            'ResourceComplianceStatus': 'compliant'|'noncompliant'|'unmanaged'|'ignored',
            'ResourceOverlapStatus': 'overlapping'|'nonoverlapping'|'ignored',
            'VpcId': 'string',
            'SampledStartTime': datetime(2015, 1, 1),
            'SampledEndTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • HistoryRecords (list) --

      A historical record for a CIDR within an IPAM scope. If the CIDR is associated with an EC2 instance, you will see an object in the response for the instance and one for the network interface.

      • (dict) --

        The historical record of a CIDR within an IPAM scope. For more information, see View the history of IP addresses in the Amazon VPC IPAM User Guide .

        • ResourceOwnerId (string) --

          The ID of the resource owner.

        • ResourceRegion (string) --

          The Amazon Web Services Region of the resource.

        • ResourceType (string) --

          The type of the resource.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceCidr (string) --

          The CIDR of the resource.

        • ResourceName (string) --

          The name of the resource.

        • ResourceComplianceStatus (string) --

          The compliance status of a resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • ResourceOverlapStatus (string) --

          The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • VpcId (string) --

          The VPC ID of the resource.

        • SampledStartTime (datetime) --

          Sampled start time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the start time may have occurred before this specific time.

        • SampledEndTime (datetime) --

          Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time may have occurred before this specific time.

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

get_ipam_pool_allocations(**kwargs)

Get a list of all the CIDR allocations in an IPAM pool.

See also: AWS API Documentation

Request Syntax

response = client.get_ipam_pool_allocations(
    DryRun=True|False,
    IpamPoolId='string',
    IpamPoolAllocationId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool you want to see the allocations for.

  • IpamPoolAllocationId (string) -- The ID of the allocation.
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

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

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

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

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results you would like returned per page.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'IpamPoolAllocations': [
        {
            'Cidr': 'string',
            'IpamPoolAllocationId': 'string',
            'Description': 'string',
            'ResourceId': 'string',
            'ResourceType': 'ipam-pool'|'vpc'|'ec2-public-ipv4-pool'|'custom',
            'ResourceRegion': 'string',
            'ResourceOwner': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • IpamPoolAllocations (list) --

      The IPAM pool allocations you want information on.

      • (dict) --

        In IPAM, an allocation is a CIDR assignment from an IPAM pool to another resource or IPAM pool.

        • Cidr (string) --

          The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .

        • IpamPoolAllocationId (string) --

          The ID of an allocation.

        • Description (string) --

          A description of the pool allocation.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of the resource.

        • ResourceRegion (string) --

          The Amazon Web Services Region of the resource.

        • ResourceOwner (string) --

          The owner of the resource.

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

get_ipam_pool_cidrs(**kwargs)

Get the CIDRs provisioned to an IPAM pool.

See also: AWS API Documentation

Request Syntax

response = client.get_ipam_pool_cidrs(
    DryRun=True|False,
    IpamPoolId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool you want the CIDR for.

  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in the request.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'IpamPoolCidrs': [
        {
            'Cidr': 'string',
            'State': 'pending-provision'|'provisioned'|'failed-provision'|'pending-deprovision'|'deprovisioned'|'failed-deprovision'|'pending-import'|'failed-import',
            'FailureReason': {
                'Code': 'cidr-not-available',
                'Message': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • IpamPoolCidrs (list) --

      Information about the CIDRs provisioned to an IPAM pool.

      • (dict) --

        A CIDR provisioned to an IPAM pool.

        • Cidr (string) --

          The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .

        • State (string) --

          The state of the CIDR.

        • FailureReason (dict) --

          Details related to why an IPAM pool CIDR failed to be provisioned.

          • Code (string) --

            An error code related to why an IPAM pool CIDR failed to be provisioned.

          • Message (string) --

            A message related to why an IPAM pool CIDR failed to be provisioned.

    • 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.

get_ipam_resource_cidrs(**kwargs)

Get information about the resources in a scope.

See also: AWS API Documentation

Request Syntax

response = client.get_ipam_resource_cidrs(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    IpamScopeId='string',
    IpamPoolId='string',
    ResourceId='string',
    ResourceType='vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool',
    ResourceTag={
        'Key': 'string',
        'Value': 'string'
    },
    ResourceOwner='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return in the request.
  • NextToken (string) -- The token for the next page of results.
  • IpamScopeId (string) --

    [REQUIRED]

    The ID of the scope that the resource is in.

  • IpamPoolId (string) -- The ID of the IPAM pool that the resource is in.
  • ResourceId (string) -- The ID of the resource.
  • ResourceType (string) -- The resource type.
  • ResourceTag (dict) --

    A tag on an IPAM resource.

    • Key (string) --

      The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

    • Value (string) --

      The value for the tag.

  • ResourceOwner (string) -- The ID of the Amazon Web Services account that owns the resource.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'IpamResourceCidrs': [
        {
            'IpamId': 'string',
            'IpamScopeId': 'string',
            'IpamPoolId': 'string',
            'ResourceRegion': 'string',
            'ResourceOwnerId': 'string',
            'ResourceId': 'string',
            'ResourceName': 'string',
            'ResourceCidr': 'string',
            'ResourceType': 'vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool',
            'ResourceTags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'IpUsage': 123.0,
            'ComplianceStatus': 'compliant'|'noncompliant'|'unmanaged'|'ignored',
            'ManagementState': 'managed'|'unmanaged'|'ignored',
            'OverlapStatus': 'overlapping'|'nonoverlapping'|'ignored',
            'VpcId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • 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.

    • IpamResourceCidrs (list) --

      The resource CIDRs.

      • (dict) --

        The CIDR for an IPAM resource.

        • IpamId (string) --

          The IPAM ID for an IPAM resource.

        • IpamScopeId (string) --

          The scope ID for an IPAM resource.

        • IpamPoolId (string) --

          The pool ID for an IPAM resource.

        • ResourceRegion (string) --

          The Amazon Web Services Region for an IPAM resource.

        • ResourceOwnerId (string) --

          The Amazon Web Services account number of the owner of an IPAM resource.

        • ResourceId (string) --

          The ID of an IPAM resource.

        • ResourceName (string) --

          The name of an IPAM resource.

        • ResourceCidr (string) --

          The CIDR for an IPAM resource.

        • ResourceType (string) --

          The type of IPAM resource.

        • ResourceTags (list) --

          The tags for an IPAM resource.

          • (dict) --

            The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

            • Key (string) --

              The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

            • Value (string) --

              The value of the tag.

        • IpUsage (float) --

          The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:

          • For a resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs.
          • For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated.
          • For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs).
        • ComplianceStatus (string) --

          The compliance status of the IPAM resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • ManagementState (string) --

          The management state of the resource. For more information about management states, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • OverlapStatus (string) --

          The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • VpcId (string) --

          The ID of a VPC.

get_launch_template_data(**kwargs)

Retrieves the configuration data of the specified instance. You can use this data to create a launch template.

This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following actions in your IAM policy: DescribeSpotInstanceRequests , DescribeInstanceCreditSpecifications , DescribeVolumes , DescribeInstanceAttribute , and DescribeElasticGpus . Or, you can allow describe* depending on your instance requirements.

See also: AWS API Documentation

Request Syntax

response = client.get_launch_template_data(
    DryRun=True|False,
    InstanceId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

Return type

dict

Returns

Response Syntax

{
    'LaunchTemplateData': {
        'KernelId': 'string',
        'EbsOptimized': True|False,
        'IamInstanceProfile': {
            'Arn': 'string',
            'Name': 'string'
        },
        'BlockDeviceMappings': [
            {
                'DeviceName': 'string',
                'VirtualName': 'string',
                'Ebs': {
                    'Encrypted': True|False,
                    'DeleteOnTermination': True|False,
                    'Iops': 123,
                    'KmsKeyId': 'string',
                    'SnapshotId': 'string',
                    'VolumeSize': 123,
                    'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                    'Throughput': 123
                },
                'NoDevice': 'string'
            },
        ],
        'NetworkInterfaces': [
            {
                'AssociateCarrierIpAddress': True|False,
                'AssociatePublicIpAddress': True|False,
                'DeleteOnTermination': True|False,
                'Description': 'string',
                'DeviceIndex': 123,
                'Groups': [
                    'string',
                ],
                'InterfaceType': 'string',
                'Ipv6AddressCount': 123,
                'Ipv6Addresses': [
                    {
                        'Ipv6Address': 'string'
                    },
                ],
                'NetworkInterfaceId': 'string',
                'PrivateIpAddress': 'string',
                'PrivateIpAddresses': [
                    {
                        'Primary': True|False,
                        'PrivateIpAddress': 'string'
                    },
                ],
                'SecondaryPrivateIpAddressCount': 123,
                'SubnetId': 'string',
                'NetworkCardIndex': 123,
                'Ipv4Prefixes': [
                    {
                        'Ipv4Prefix': 'string'
                    },
                ],
                'Ipv4PrefixCount': 123,
                'Ipv6Prefixes': [
                    {
                        'Ipv6Prefix': 'string'
                    },
                ],
                'Ipv6PrefixCount': 123
            },
        ],
        'ImageId': 'string',
        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
        'KeyName': 'string',
        'Monitoring': {
            'Enabled': True|False
        },
        'Placement': {
            'AvailabilityZone': 'string',
            'Affinity': 'string',
            'GroupName': 'string',
            'HostId': 'string',
            'Tenancy': 'default'|'dedicated'|'host',
            'SpreadDomain': 'string',
            'HostResourceGroupArn': 'string',
            'PartitionNumber': 123
        },
        'RamDiskId': 'string',
        'DisableApiTermination': True|False,
        'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
        'UserData': 'string',
        'TagSpecifications': [
            {
                'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
        ],
        'ElasticGpuSpecifications': [
            {
                'Type': 'string'
            },
        ],
        'ElasticInferenceAccelerators': [
            {
                'Type': 'string',
                'Count': 123
            },
        ],
        'SecurityGroupIds': [
            'string',
        ],
        'SecurityGroups': [
            'string',
        ],
        'InstanceMarketOptions': {
            'MarketType': 'spot',
            'SpotOptions': {
                'MaxPrice': 'string',
                'SpotInstanceType': 'one-time'|'persistent',
                'BlockDurationMinutes': 123,
                'ValidUntil': datetime(2015, 1, 1),
                'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
            }
        },
        'CreditSpecification': {
            'CpuCredits': 'string'
        },
        'CpuOptions': {
            'CoreCount': 123,
            'ThreadsPerCore': 123
        },
        'CapacityReservationSpecification': {
            'CapacityReservationPreference': 'open'|'none',
            'CapacityReservationTarget': {
                'CapacityReservationId': 'string',
                'CapacityReservationResourceGroupArn': 'string'
            }
        },
        'LicenseSpecifications': [
            {
                'LicenseConfigurationArn': 'string'
            },
        ],
        'HibernationOptions': {
            'Configured': True|False
        },
        'MetadataOptions': {
            'State': 'pending'|'applied',
            'HttpTokens': 'optional'|'required',
            'HttpPutResponseHopLimit': 123,
            'HttpEndpoint': 'disabled'|'enabled',
            'HttpProtocolIpv6': 'disabled'|'enabled',
            'InstanceMetadataTags': 'disabled'|'enabled'
        },
        'EnclaveOptions': {
            'Enabled': True|False
        },
        'InstanceRequirements': {
            'VCpuCount': {
                'Min': 123,
                'Max': 123
            },
            'MemoryMiB': {
                'Min': 123,
                'Max': 123
            },
            'CpuManufacturers': [
                'intel'|'amd'|'amazon-web-services',
            ],
            'MemoryGiBPerVCpu': {
                'Min': 123.0,
                'Max': 123.0
            },
            'ExcludedInstanceTypes': [
                'string',
            ],
            'InstanceGenerations': [
                'current'|'previous',
            ],
            'SpotMaxPricePercentageOverLowestPrice': 123,
            'OnDemandMaxPricePercentageOverLowestPrice': 123,
            'BareMetal': 'included'|'required'|'excluded',
            'BurstablePerformance': 'included'|'required'|'excluded',
            'RequireHibernateSupport': True|False,
            'NetworkInterfaceCount': {
                'Min': 123,
                'Max': 123
            },
            'LocalStorage': 'included'|'required'|'excluded',
            'LocalStorageTypes': [
                'hdd'|'ssd',
            ],
            'TotalLocalStorageGB': {
                'Min': 123.0,
                'Max': 123.0
            },
            'BaselineEbsBandwidthMbps': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorTypes': [
                'gpu'|'fpga'|'inference',
            ],
            'AcceleratorCount': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorManufacturers': [
                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
            ],
            'AcceleratorNames': [
                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
            ],
            'AcceleratorTotalMemoryMiB': {
                'Min': 123,
                'Max': 123
            }
        },
        'PrivateDnsNameOptions': {
            'HostnameType': 'ip-name'|'resource-name',
            'EnableResourceNameDnsARecord': True|False,
            'EnableResourceNameDnsAAAARecord': True|False
        },
        'MaintenanceOptions': {
            'AutoRecovery': 'default'|'disabled'
        },
        'DisableApiStop': True|False
    }
}

Response Structure

  • (dict) --

    • LaunchTemplateData (dict) --

      The instance data.

      • KernelId (string) --

        The ID of the kernel, if applicable.

      • EbsOptimized (boolean) --

        Indicates whether the instance is optimized for Amazon EBS I/O.

      • 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.

      • BlockDeviceMappings (list) --

        The block device mappings.

        • (dict) --

          Describes a block device mapping.

          • DeviceName (string) --

            The device name.

          • VirtualName (string) --

            The virtual device name (ephemeralN).

          • Ebs (dict) --

            Information about the block device for an EBS volume.

            • Encrypted (boolean) --

              Indicates whether the EBS volume is encrypted.

            • DeleteOnTermination (boolean) --

              Indicates whether the EBS volume is deleted on instance termination.

            • Iops (integer) --

              The number of I/O operations per second (IOPS) that the volume supports.

            • KmsKeyId (string) --

              The ARN of the Key Management Service (KMS) CMK used for encryption.

            • SnapshotId (string) --

              The ID of the snapshot.

            • VolumeSize (integer) --

              The size of the volume, in GiB.

            • VolumeType (string) --

              The volume type.

            • Throughput (integer) --

              The throughput that the volume supports, in MiB/s.

          • NoDevice (string) --

            To omit the device from the block device mapping, specify an empty string.

      • NetworkInterfaces (list) --

        The network interfaces.

        • (dict) --

          Describes a network interface.

          • AssociateCarrierIpAddress (boolean) --

            Indicates whether to associate a Carrier IP address with eth0 for a new network interface.

            Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide .

          • AssociatePublicIpAddress (boolean) --

            Indicates whether to associate a public IPv4 address with eth0 for a new network interface.

          • DeleteOnTermination (boolean) --

            Indicates whether the network interface is deleted when the instance is terminated.

          • Description (string) --

            A description for the network interface.

          • DeviceIndex (integer) --

            The device index for the network interface attachment.

          • Groups (list) --

            The IDs of one or more security groups.

            • (string) --
          • InterfaceType (string) --

            The type of network interface.

          • Ipv6AddressCount (integer) --

            The number of IPv6 addresses for the network interface.

          • Ipv6Addresses (list) --

            The IPv6 addresses for the network interface.

            • (dict) --

              Describes an IPv6 address.

              • Ipv6Address (string) --

                The IPv6 address.

          • NetworkInterfaceId (string) --

            The ID of the network interface.

          • PrivateIpAddress (string) --

            The primary private IPv4 address of the network interface.

          • PrivateIpAddresses (list) --

            One or more private IPv4 addresses.

            • (dict) --

              Describes a secondary private IPv4 address for a network interface.

              • Primary (boolean) --

                Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

              • PrivateIpAddress (string) --

                The private IPv4 addresses.

          • SecondaryPrivateIpAddressCount (integer) --

            The number of secondary private IPv4 addresses for the network interface.

          • SubnetId (string) --

            The ID of the subnet for the network interface.

          • NetworkCardIndex (integer) --

            The index of the network card.

          • Ipv4Prefixes (list) --

            One or more IPv4 prefixes assigned to the network interface.

            • (dict) --

              Information about the IPv4 delegated prefixes assigned to a network interface.

              • Ipv4Prefix (string) --

                One or more IPv4 delegated prefixes assigned to the network interface.

          • Ipv4PrefixCount (integer) --

            The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.

          • Ipv6Prefixes (list) --

            One or more IPv6 prefixes assigned to the network interface.

            • (dict) --

              Information about the IPv6 delegated prefixes assigned to a network interface.

              • Ipv6Prefix (string) --

                One or more IPv6 delegated prefixes assigned to the network interface.

          • Ipv6PrefixCount (integer) --

            The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.

      • ImageId (string) --

        The ID of the AMI that was used to launch the instance.

      • InstanceType (string) --

        The instance type.

      • KeyName (string) --

        The name of the key pair.

      • Monitoring (dict) --

        The monitoring for the instance.

        • Enabled (boolean) --

          Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

      • Placement (dict) --

        The placement of the instance.

        • AvailabilityZone (string) --

          The Availability Zone of the instance.

        • Affinity (string) --

          The affinity setting for the instance on the Dedicated Host.

        • GroupName (string) --

          The name of the placement group for the instance.

        • HostId (string) --

          The ID of the Dedicated Host for the instance.

        • 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.

        • SpreadDomain (string) --

          Reserved for future use.

        • HostResourceGroupArn (string) --

          The ARN of the host resource group in which to launch the instances.

        • PartitionNumber (integer) --

          The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition .

      • RamDiskId (string) --

        The ID of the RAM disk, if applicable.

      • DisableApiTermination (boolean) --

        If set to true , indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.

      • InstanceInitiatedShutdownBehavior (string) --

        Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

      • UserData (string) --

        The user data for the instance.

      • TagSpecifications (list) --

        The tags that are applied to the resources that are created during instance launch.

        • (dict) --

          The tags specification for the launch template.

          • ResourceType (string) --

            The type of resource to tag.

          • Tags (list) --

            The tags for 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 256 Unicode characters.

      • ElasticGpuSpecifications (list) --

        The elastic GPU specification.

        • (dict) --

          Describes an elastic GPU.

          • Type (string) --

            The elastic GPU type.

      • ElasticInferenceAccelerators (list) --

        The elastic inference accelerator for the instance.

        • (dict) --

          Describes an elastic inference accelerator.

          • Type (string) --

            The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

          • Count (integer) --

            The number of elastic inference accelerators to attach to the instance.

            Default: 1

      • SecurityGroupIds (list) --

        The security group IDs.

        • (string) --
      • SecurityGroups (list) --

        The security group names.

        • (string) --
      • InstanceMarketOptions (dict) --

        The market (purchasing) option for the instances.

        • MarketType (string) --

          The market type.

        • SpotOptions (dict) --

          The options for Spot Instances.

          • MaxPrice (string) --

            The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

          • SpotInstanceType (string) --

            The Spot Instance request type.

          • BlockDurationMinutes (integer) --

            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).

          • ValidUntil (datetime) --

            The end date of the request. For 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.

          • InstanceInterruptionBehavior (string) --

            The behavior when a Spot Instance is interrupted.

      • CreditSpecification (dict) --

        The credit option for CPU usage of the instance.

        • CpuCredits (string) --

          The credit option for CPU usage of a T instance.

          Valid values: standard | unlimited

      • CpuOptions (dict) --

        The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide .

        • CoreCount (integer) --

          The number of CPU cores for the instance.

        • ThreadsPerCore (integer) --

          The number of threads per CPU core.

      • CapacityReservationSpecification (dict) --

        Information about the Capacity Reservation targeting option.

        • CapacityReservationPreference (string) --

          Indicates the instance's Capacity Reservation preferences. Possible preferences include:

          • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
          • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
        • CapacityReservationTarget (dict) --

          Information about the target Capacity Reservation or Capacity Reservation group.

          • CapacityReservationId (string) --

            The ID of the targeted Capacity Reservation.

          • CapacityReservationResourceGroupArn (string) --

            The ARN of the targeted Capacity Reservation group.

      • LicenseSpecifications (list) --

        The license configurations.

        • (dict) --

          Describes a license configuration.

          • LicenseConfigurationArn (string) --

            The Amazon Resource Name (ARN) of the license configuration.

      • HibernationOptions (dict) --

        Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .

        • Configured (boolean) --

          If this parameter is set to true , the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

      • MetadataOptions (dict) --

        The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .

        • State (string) --

          The state of the metadata option changes.

          pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

          applied - The metadata options have been successfully applied on the instance.

        • HttpTokens (string) --

          The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional .

          If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

          If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

        • HttpPutResponseHopLimit (integer) --

          The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

          Default: 1

          Possible values: Integers from 1 to 64

        • HttpEndpoint (string) --

          Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled .

          Note

          If you specify a value of disabled , you will not be able to access your instance metadata.

        • HttpProtocolIpv6 (string) --

          Enables or disables the IPv6 endpoint for the instance metadata service.

          Default: disabled

        • InstanceMetadataTags (string) --

          Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

          Default: disabled

      • EnclaveOptions (dict) --

        Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

        • Enabled (boolean) --

          If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

      • InstanceRequirements (dict) --

        The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

        If you specify InstanceRequirements , you can't specify InstanceTypes .

        • VCpuCount (dict) --

          The minimum and maximum number of vCPUs.

          • Min (integer) --

            The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

          • Max (integer) --

            The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

        • MemoryMiB (dict) --

          The minimum and maximum amount of memory, in MiB.

          • Min (integer) --

            The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

          • Max (integer) --

            The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • CpuManufacturers (list) --

          The CPU manufacturers to include.

          • For instance types with Intel CPUs, specify intel .
          • For instance types with AMD CPUs, specify amd .
          • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

          Note

          Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

          Default: Any manufacturer

          • (string) --
        • MemoryGiBPerVCpu (dict) --

          The minimum and maximum amount of memory per vCPU, in GiB.

          Default: No minimum or maximum limits

          • Min (float) --

            The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

          • Max (float) --

            The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

        • ExcludedInstanceTypes (list) --

          The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

          For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

          Default: No excluded instance types

          • (string) --
        • InstanceGenerations (list) --

          Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

          For current generation instance types, specify current .

          For previous generation instance types, specify previous .

          Default: Current and previous generation instance types

          • (string) --
        • SpotMaxPricePercentageOverLowestPrice (integer) --

          The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999 .

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

          Note

          If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

          Default: 100

        • OnDemandMaxPricePercentageOverLowestPrice (integer) --

          The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

          The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

          To turn off price protection, specify a high value, such as 999999 .

          This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

          Note

          If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

          Default: 20

        • BareMetal (string) --

          Indicates whether bare metal instance types must be included, excluded, or required.

          • To include bare metal instance types, specify included .
          • To require only bare metal instance types, specify required .
          • To exclude bare metal instance types, specify excluded .

          Default: excluded

        • BurstablePerformance (string) --

          Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

          • To include burstable performance instance types, specify included .
          • To require only burstable performance instance types, specify required .
          • To exclude burstable performance instance types, specify excluded .

          Default: excluded

        • RequireHibernateSupport (boolean) --

          Indicates whether instance types must support hibernation for On-Demand Instances.

          This parameter is not supported for GetSpotPlacementScores .

          Default: false

        • NetworkInterfaceCount (dict) --

          The minimum and maximum number of network interfaces.

          Default: No minimum or maximum limits

          • Min (integer) --

            The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

          • Max (integer) --

            The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

        • LocalStorage (string) --

          Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

          • To include instance types with instance store volumes, specify included .
          • To require only instance types with instance store volumes, specify required .
          • To exclude instance types with instance store volumes, specify excluded .

          Default: included

        • LocalStorageTypes (list) --

          The type of local storage that is required.

          • For instance types with hard disk drive (HDD) storage, specify hdd .
          • For instance types with solid state drive (SSD) storage, specify ssd .

          Default: hdd and ssd

          • (string) --
        • TotalLocalStorageGB (dict) --

          The minimum and maximum amount of total local storage, in GB.

          Default: No minimum or maximum limits

          • Min (float) --

            The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

          • Max (float) --

            The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

        • BaselineEbsBandwidthMbps (dict) --

          The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

          Default: No minimum or maximum limits

          • Min (integer) --

            The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

          • Max (integer) --

            The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

        • AcceleratorTypes (list) --

          The accelerator types that must be on the instance type.

          • For instance types with GPU accelerators, specify gpu .
          • For instance types with FPGA accelerators, specify fpga .
          • For instance types with inference accelerators, specify inference .

          Default: Any accelerator type

          • (string) --
        • AcceleratorCount (dict) --

          The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

          To exclude accelerator-enabled instance types, set Max to 0 .

          Default: No minimum or maximum limits

          • Min (integer) --

            The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

          • Max (integer) --

            The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

        • AcceleratorManufacturers (list) --

          Indicates whether instance types must have accelerators by specific manufacturers.

          • For instance types with NVIDIA devices, specify nvidia .
          • For instance types with AMD devices, specify amd .
          • For instance types with Amazon Web Services devices, specify amazon-web-services .
          • For instance types with Xilinx devices, specify xilinx .

          Default: Any manufacturer

          • (string) --
        • AcceleratorNames (list) --

          The accelerators that must be on the instance type.

          • For instance types with NVIDIA A100 GPUs, specify a100 .
          • For instance types with NVIDIA V100 GPUs, specify v100 .
          • For instance types with NVIDIA K80 GPUs, specify k80 .
          • For instance types with NVIDIA T4 GPUs, specify t4 .
          • For instance types with NVIDIA M60 GPUs, specify m60 .
          • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
          • For instance types with Xilinx VU9P FPGAs, specify vu9p .

          Default: Any accelerator

          • (string) --
        • AcceleratorTotalMemoryMiB (dict) --

          The minimum and maximum amount of total accelerator memory, in MiB.

          Default: No minimum or maximum limits

          • Min (integer) --

            The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

          • Max (integer) --

            The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

      • PrivateDnsNameOptions (dict) --

        The options for the instance hostname.

        • HostnameType (string) --

          The type of hostname to assign to an instance.

        • EnableResourceNameDnsARecord (boolean) --

          Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

        • EnableResourceNameDnsAAAARecord (boolean) --

          Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

      • MaintenanceOptions (dict) --

        The maintenance options for your instance.

        • AutoRecovery (string) --

          Disables the automatic recovery behavior of your instance or sets it to default.

      • DisableApiStop (boolean) --

        Indicates whether the instance is enabled for stop protection. For more information, see Stop Protection .

Examples

This example gets the launch template data for the specified instance.

response = client.get_launch_template_data(
    InstanceId='0123d646e8048babc',
)

print(response)

Expected Output:

{
    'LaunchTemplateData': {
        'BlockDeviceMappings': [
            {
                'DeviceName': '/dev/xvda',
                'Ebs': {
                    'DeleteOnTermination': True,
                    'Encrypted': False,
                    'Iops': 100,
                    'SnapshotId': 'snap-02594938353ef77d3',
                    'VolumeSize': 8,
                    'VolumeType': 'gp2',
                },
            },
        ],
        'EbsOptimized': False,
        'ImageId': 'ami-32cf7b4a',
        'InstanceType': 't2.medium',
        'KeyName': 'my-key-pair',
        'Monitoring': {
            'Enabled': False,
        },
        'NetworkInterfaces': [
            {
                'AssociatePublicIpAddress': False,
                'DeleteOnTermination': True,
                'Description': '',
                'DeviceIndex': 0,
                'Groups': [
                    'sg-d14e1bb4',
                ],
                'Ipv6Addresses': [
                ],
                'NetworkInterfaceId': 'eni-4338b5a9',
                'PrivateIpAddress': '10.0.3.233',
                'PrivateIpAddresses': [
                    {
                        'Primary': True,
                        'PrivateIpAddress': '10.0.3.233',
                    },
                ],
                'SubnetId': 'subnet-5264e837',
            },
        ],
        'Placement': {
            'AvailabilityZone': 'us-east-2b',
            'GroupName': '',
            'Tenancy': 'default',
        },
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
get_managed_prefix_list_associations(**kwargs)

Gets information about the resources that are associated with the specified managed prefix list.

See also: AWS API Documentation

Request Syntax

response = client.get_managed_prefix_list_associations(
    DryRun=True|False,
    PrefixListId='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'PrefixListAssociations': [
        {
            'ResourceId': 'string',
            'ResourceOwner': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PrefixListAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes the resource with which a prefix list is associated.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceOwner (string) --

          The owner of the resource.

    • 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.

get_managed_prefix_list_entries(**kwargs)

Gets information about the entries for a specified managed prefix list.

See also: AWS API Documentation

Request Syntax

response = client.get_managed_prefix_list_entries(
    DryRun=True|False,
    PrefixListId='string',
    TargetVersion=123,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • TargetVersion (integer) -- The version of the prefix list for which to return the entries. The default is the current version.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
Return type

dict

Returns

Response Syntax

{
    'Entries': [
        {
            'Cidr': 'string',
            'Description': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Entries (list) --

      Information about the prefix list entries.

      • (dict) --

        Describes a prefix list entry.

        • Cidr (string) --

          The CIDR block.

        • Description (string) --

          The description.

    • 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.

get_network_insights_access_scope_analysis_findings(**kwargs)

Gets the findings for the specified Network Access Scope analysis.

See also: AWS API Documentation

Request Syntax

response = client.get_network_insights_access_scope_analysis_findings(
    NetworkInsightsAccessScopeAnalysisId='string',
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • NetworkInsightsAccessScopeAnalysisId (string) --

    [REQUIRED]

    The ID of the Network Access Scope analysis.

  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopeAnalysisId': 'string',
    'AnalysisStatus': 'running'|'succeeded'|'failed',
    'AnalysisFindings': [
        {
            'NetworkInsightsAccessScopeAnalysisId': 'string',
            'NetworkInsightsAccessScopeId': 'string',
            'FindingId': 'string',
            'FindingComponents': [
                {
                    'SequenceNumber': 123,
                    'AclRule': {
                        'Cidr': 'string',
                        'Egress': True|False,
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'string',
                        'RuleNumber': 123
                    },
                    'AttachedTo': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Component': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'DestinationVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'OutboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'InboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'RouteTableRoute': {
                        'DestinationCidr': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'string',
                        'TransitGatewayId': 'string',
                        'VpcPeeringConnectionId': 'string'
                    },
                    'SecurityGroupRule': {
                        'Cidr': 'string',
                        'Direction': 'string',
                        'SecurityGroupId': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'PrefixListId': 'string',
                        'Protocol': 'string'
                    },
                    'SourceVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Subnet': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Vpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AdditionalDetails': [
                        {
                            'AdditionalDetailType': 'string',
                            'Component': {
                                'Id': 'string',
                                'Arn': 'string',
                                'Name': 'string'
                            }
                        },
                    ],
                    'TransitGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTableRoute': {
                        'DestinationCidr': 'string',
                        'State': 'string',
                        'RouteOrigin': 'string',
                        'PrefixListId': 'string',
                        'AttachmentId': 'string',
                        'ResourceId': 'string',
                        'ResourceType': 'string'
                    }
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopeAnalysisId (string) --

      The ID of the Network Access Scope analysis.

    • AnalysisStatus (string) --

      The status of Network Access Scope Analysis.

    • AnalysisFindings (list) --

      The findings associated with Network Access Scope Analysis.

      • (dict) --

        Describes a finding for a Network Access Scope.

        • NetworkInsightsAccessScopeAnalysisId (string) --

          The ID of the Network Access Scope analysis.

        • NetworkInsightsAccessScopeId (string) --

          The ID of the Network Access Scope.

        • FindingId (string) --

          The ID of the finding.

        • FindingComponents (list) --

          The finding components.

          • (dict) --

            Describes a path component.

            • SequenceNumber (integer) --

              The sequence number.

            • AclRule (dict) --

              The network ACL rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Egress (boolean) --

                Indicates whether the rule is an outbound rule.

              • PortRange (dict) --

                The range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • Protocol (string) --

                The protocol.

              • RuleAction (string) --

                Indicates whether to allow or deny traffic that matches the rule.

              • RuleNumber (integer) --

                The rule number.

            • AttachedTo (dict) --

              The resource to which the path component is attached.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Component (dict) --

              The component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • DestinationVpc (dict) --

              The destination VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • OutboundHeader (dict) --

              The outbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • InboundHeader (dict) --

              The inbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • RouteTableRoute (dict) --

              The route table route.

              • DestinationCidr (string) --

                The destination IPv4 address, in CIDR notation.

              • DestinationPrefixListId (string) --

                The prefix of the Amazon Web Service.

              • EgressOnlyInternetGatewayId (string) --

                The ID of an egress-only internet gateway.

              • GatewayId (string) --

                The ID of the gateway, such as an internet gateway or virtual private gateway.

              • InstanceId (string) --

                The ID of the instance, such as a NAT instance.

              • NatGatewayId (string) --

                The ID of a NAT gateway.

              • NetworkInterfaceId (string) --

                The ID of a network interface.

              • Origin (string) --

                Describes how the route was created. The following are the possible values:

                • CreateRouteTable - The route was automatically created when the route table was created.
                • CreateRoute - The route was manually added to the route table.
                • EnableVgwRoutePropagation - The route was propagated by route propagation.
              • TransitGatewayId (string) --

                The ID of a transit gateway.

              • VpcPeeringConnectionId (string) --

                The ID of a VPC peering connection.

            • SecurityGroupRule (dict) --

              The security group rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Direction (string) --

                The direction. The following are the possible values:

                • egress
                • ingress
              • SecurityGroupId (string) --

                The security group ID.

              • PortRange (dict) --

                The port range.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • PrefixListId (string) --

                The prefix list ID.

              • Protocol (string) --

                The protocol name.

            • SourceVpc (dict) --

              The source VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Subnet (dict) --

              The subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Vpc (dict) --

              The component VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AdditionalDetails (list) --

              The additional details.

              • (dict) --

                Describes an additional detail for a path analysis.

                • AdditionalDetailType (string) --

                  The information type.

                • Component (dict) --

                  The path component.

                  • Id (string) --

                    The ID of the component.

                  • Arn (string) --

                    The Amazon Resource Name (ARN) of the component.

                  • Name (string) --

                    The name of the analysis component.

            • TransitGateway (dict) --

              The transit gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTableRoute (dict) --

              The route in a transit gateway route table.

              • DestinationCidr (string) --

                The CIDR block used for destination matches.

              • State (string) --

                The state of the route.

              • RouteOrigin (string) --

                The route origin. The following are the possible values:

                • static
                • propagated
              • PrefixListId (string) --

                The ID of the prefix list.

              • AttachmentId (string) --

                The ID of the route attachment.

              • ResourceId (string) --

                The ID of the resource for the route attachment.

              • ResourceType (string) --

                The resource type for the route attachment.

    • 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.

get_network_insights_access_scope_content(**kwargs)

Gets the content for the specified Network Access Scope.

See also: AWS API Documentation

Request Syntax

response = client.get_network_insights_access_scope_content(
    NetworkInsightsAccessScopeId='string',
    DryRun=True|False
)
Parameters
  • NetworkInsightsAccessScopeId (string) --

    [REQUIRED]

    The ID of the Network Access Scope.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopeContent': {
        'NetworkInsightsAccessScopeId': 'string',
        'MatchPaths': [
            {
                'Source': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'Destination': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'ThroughResources': [
                    {
                        'ResourceStatement': {
                            'Resources': [
                                'string',
                            ],
                            'ResourceTypes': [
                                'string',
                            ]
                        }
                    },
                ]
            },
        ],
        'ExcludePaths': [
            {
                'Source': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'Destination': {
                    'PacketHeaderStatement': {
                        'SourceAddresses': [
                            'string',
                        ],
                        'DestinationAddresses': [
                            'string',
                        ],
                        'SourcePorts': [
                            'string',
                        ],
                        'DestinationPorts': [
                            'string',
                        ],
                        'SourcePrefixLists': [
                            'string',
                        ],
                        'DestinationPrefixLists': [
                            'string',
                        ],
                        'Protocols': [
                            'tcp'|'udp',
                        ]
                    },
                    'ResourceStatement': {
                        'Resources': [
                            'string',
                        ],
                        'ResourceTypes': [
                            'string',
                        ]
                    }
                },
                'ThroughResources': [
                    {
                        'ResourceStatement': {
                            'Resources': [
                                'string',
                            ],
                            'ResourceTypes': [
                                'string',
                            ]
                        }
                    },
                ]
            },
        ]
    }
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopeContent (dict) --

      The Network Access Scope content.

      • NetworkInsightsAccessScopeId (string) --

        The ID of the Network Access Scope.

      • MatchPaths (list) --

        The paths to match.

        • (dict) --

          Describes a path.

          • Source (dict) --

            The source.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • Destination (dict) --

            The destination.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • ThroughResources (list) --

            The through resources.

            • (dict) --

              Describes a through resource statement.

              • ResourceStatement (dict) --

                The resource statement.

                • Resources (list) --

                  The resources.

                  • (string) --
                • ResourceTypes (list) --

                  The resource types.

                  • (string) --
      • ExcludePaths (list) --

        The paths to exclude.

        • (dict) --

          Describes a path.

          • Source (dict) --

            The source.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • Destination (dict) --

            The destination.

            • PacketHeaderStatement (dict) --

              The packet header statement.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • SourcePorts (list) --

                The source ports.

                • (string) --
              • DestinationPorts (list) --

                The destination ports.

                • (string) --
              • SourcePrefixLists (list) --

                The source prefix lists.

                • (string) --
              • DestinationPrefixLists (list) --

                The destination prefix lists.

                • (string) --
              • Protocols (list) --

                The protocols.

                • (string) --
            • ResourceStatement (dict) --

              The resource statement.

              • Resources (list) --

                The resources.

                • (string) --
              • ResourceTypes (list) --

                The resource types.

                • (string) --
          • ThroughResources (list) --

            The through resources.

            • (dict) --

              Describes a through resource statement.

              • ResourceStatement (dict) --

                The resource statement.

                • Resources (list) --

                  The resources.

                  • (string) --
                • ResourceTypes (list) --

                  The resource types.

                  • (string) --

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_password_data(**kwargs)

Retrieves the encrypted administrator password for a running Windows instance.

The Windows password is generated at boot by the EC2Config service or EC2Launch scripts (Windows Server 2016 and later). This usually only happens the first time an instance is launched. For more information, see EC2Config and EC2Launch in the Amazon EC2 User Guide .

For the EC2Config service, the password is not generated for rebundled AMIs unless Ec2SetPassword is enabled before bundling.

The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.

When you launch an instance, password generation and encryption may take a few minutes. If you try to retrieve the password before it's available, the output returns an empty string. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.

See also: AWS API Documentation

Request Syntax

response = client.get_password_data(
    InstanceId='string',
    DryRun=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the Windows instance.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InstanceId': 'string',
    'PasswordData': 'string',
    'Timestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The ID of the Windows instance.

    • PasswordData (string) --

      The password of the instance. Returns an empty string if the password is not available.

    • Timestamp (datetime) --

      The time the data was last updated.

get_reserved_instances_exchange_quote(**kwargs)

Returns a quote and exchange information for exchanging one or more specified Convertible Reserved Instances for a new Convertible Reserved Instance. If the exchange cannot be performed, the reason is returned in the response. Use AcceptReservedInstancesExchangeQuote to perform the exchange.

See also: AWS API Documentation

Request Syntax

response = client.get_reserved_instances_exchange_quote(
    DryRun=True|False,
    ReservedInstanceIds=[
        'string',
    ],
    TargetConfigurations=[
        {
            'InstanceCount': 123,
            'OfferingId': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ReservedInstanceIds (list) --

    [REQUIRED]

    The IDs of the Convertible Reserved Instances to exchange.

    • (string) --
  • TargetConfigurations (list) --

    The configuration of the target Convertible Reserved Instance to exchange for your current Convertible Reserved Instances.

    • (dict) --

      Details about the target configuration.

      • InstanceCount (integer) --

        The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

      • OfferingId (string) -- [REQUIRED]

        The Convertible Reserved Instance offering ID.

Return type

dict

Returns

Response Syntax

{
    'CurrencyCode': 'string',
    'IsValidExchange': True|False,
    'OutputReservedInstancesWillExpireAt': datetime(2015, 1, 1),
    'PaymentDue': 'string',
    'ReservedInstanceValueRollup': {
        'HourlyPrice': 'string',
        'RemainingTotalValue': 'string',
        'RemainingUpfrontValue': 'string'
    },
    'ReservedInstanceValueSet': [
        {
            'ReservationValue': {
                'HourlyPrice': 'string',
                'RemainingTotalValue': 'string',
                'RemainingUpfrontValue': 'string'
            },
            'ReservedInstanceId': 'string'
        },
    ],
    'TargetConfigurationValueRollup': {
        'HourlyPrice': 'string',
        'RemainingTotalValue': 'string',
        'RemainingUpfrontValue': 'string'
    },
    'TargetConfigurationValueSet': [
        {
            'ReservationValue': {
                'HourlyPrice': 'string',
                'RemainingTotalValue': 'string',
                'RemainingUpfrontValue': 'string'
            },
            'TargetConfiguration': {
                'InstanceCount': 123,
                'OfferingId': 'string'
            }
        },
    ],
    'ValidationFailureReason': 'string'
}

Response Structure

  • (dict) --

    Contains the output of GetReservedInstancesExchangeQuote.

    • CurrencyCode (string) --

      The currency of the transaction.

    • IsValidExchange (boolean) --

      If true , the exchange is valid. If false , the exchange cannot be completed.

    • OutputReservedInstancesWillExpireAt (datetime) --

      The new end date of the reservation term.

    • PaymentDue (string) --

      The total true upfront charge for the exchange.

    • ReservedInstanceValueRollup (dict) --

      The cost associated with the Reserved Instance.

      • HourlyPrice (string) --

        The hourly rate of the reservation.

      • RemainingTotalValue (string) --

        The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

      • RemainingUpfrontValue (string) --

        The remaining upfront cost of the reservation.

    • ReservedInstanceValueSet (list) --

      The configuration of your Convertible Reserved Instances.

      • (dict) --

        The total value of the Convertible Reserved Instance.

        • ReservationValue (dict) --

          The total value of the Convertible Reserved Instance that you are exchanging.

          • HourlyPrice (string) --

            The hourly rate of the reservation.

          • RemainingTotalValue (string) --

            The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

          • RemainingUpfrontValue (string) --

            The remaining upfront cost of the reservation.

        • ReservedInstanceId (string) --

          The ID of the Convertible Reserved Instance that you are exchanging.

    • TargetConfigurationValueRollup (dict) --

      The cost associated with the Reserved Instance.

      • HourlyPrice (string) --

        The hourly rate of the reservation.

      • RemainingTotalValue (string) --

        The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

      • RemainingUpfrontValue (string) --

        The remaining upfront cost of the reservation.

    • TargetConfigurationValueSet (list) --

      The values of the target Convertible Reserved Instances.

      • (dict) --

        The total value of the new Convertible Reserved Instances.

        • ReservationValue (dict) --

          The total value of the Convertible Reserved Instances that make up the exchange. This is the sum of the list value, remaining upfront price, and additional upfront cost of the exchange.

          • HourlyPrice (string) --

            The hourly rate of the reservation.

          • RemainingTotalValue (string) --

            The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining).

          • RemainingUpfrontValue (string) --

            The remaining upfront cost of the reservation.

        • TargetConfiguration (dict) --

          The configuration of the Convertible Reserved Instances that make up the exchange.

          • InstanceCount (integer) --

            The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved and cannot be specified in a request

          • OfferingId (string) --

            The ID of the Convertible Reserved Instance offering.

    • ValidationFailureReason (string) --

      Describes the reason why the exchange cannot be completed.

get_serial_console_access_status(**kwargs)

Retrieves the access status of your account to the EC2 serial console of all instances. By default, access to the EC2 serial console is disabled for your account. For more information, see Manage account access to the EC2 serial console in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_serial_console_access_status(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'SerialConsoleAccessEnabled': True|False
}

Response Structure

  • (dict) --
    • SerialConsoleAccessEnabled (boolean) --

      If true , access to the EC2 serial console of all instances is enabled for your account. If false , access to the EC2 serial console of all instances is disabled for your account.

get_spot_placement_scores(**kwargs)

Calculates the Spot placement score for a Region or Availability Zone based on the specified target capacity and compute requirements.

You can specify your compute requirements either by using InstanceRequirementsWithMetadata and letting Amazon EC2 choose the optimal instance types to fulfill your Spot request, or you can specify the instance types by using InstanceTypes .

For more information, see Spot placement score in the Amazon EC2 User Guide.

See also: AWS API Documentation

Request Syntax

response = client.get_spot_placement_scores(
    InstanceTypes=[
        'string',
    ],
    TargetCapacity=123,
    TargetCapacityUnitType='vcpu'|'memory-mib'|'units',
    SingleAvailabilityZone=True|False,
    RegionNames=[
        'string',
    ],
    InstanceRequirementsWithMetadata={
        'ArchitectureTypes': [
            'i386'|'x86_64'|'arm64'|'x86_64_mac',
        ],
        'VirtualizationTypes': [
            'hvm'|'paravirtual',
        ],
        'InstanceRequirements': {
            'VCpuCount': {
                'Min': 123,
                'Max': 123
            },
            'MemoryMiB': {
                'Min': 123,
                'Max': 123
            },
            'CpuManufacturers': [
                'intel'|'amd'|'amazon-web-services',
            ],
            'MemoryGiBPerVCpu': {
                'Min': 123.0,
                'Max': 123.0
            },
            'ExcludedInstanceTypes': [
                'string',
            ],
            'InstanceGenerations': [
                'current'|'previous',
            ],
            'SpotMaxPricePercentageOverLowestPrice': 123,
            'OnDemandMaxPricePercentageOverLowestPrice': 123,
            'BareMetal': 'included'|'required'|'excluded',
            'BurstablePerformance': 'included'|'required'|'excluded',
            'RequireHibernateSupport': True|False,
            'NetworkInterfaceCount': {
                'Min': 123,
                'Max': 123
            },
            'LocalStorage': 'included'|'required'|'excluded',
            'LocalStorageTypes': [
                'hdd'|'ssd',
            ],
            'TotalLocalStorageGB': {
                'Min': 123.0,
                'Max': 123.0
            },
            'BaselineEbsBandwidthMbps': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorTypes': [
                'gpu'|'fpga'|'inference',
            ],
            'AcceleratorCount': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorManufacturers': [
                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
            ],
            'AcceleratorNames': [
                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
            ],
            'AcceleratorTotalMemoryMiB': {
                'Min': 123,
                'Max': 123
            }
        }
    },
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • InstanceTypes (list) --

    The instance types. We recommend that you specify at least three instance types. If you specify one or two instance types, or specify variations of a single instance type (for example, an m3.xlarge with and without instance storage), the returned placement score will always be low.

    If you specify InstanceTypes , you can't specify InstanceRequirementsWithMetadata .

    • (string) --
  • TargetCapacity (integer) --

    [REQUIRED]

    The target capacity.

  • TargetCapacityUnitType (string) --

    The unit for the target capacity.

    Default: units (translates to number of instances)

  • SingleAvailabilityZone (boolean) --

    Specify true so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions.

    A list of scored Availability Zones is useful if you want to launch all of your Spot capacity into a single Availability Zone.

  • RegionNames (list) --

    The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1 .

    • (string) --
  • InstanceRequirementsWithMetadata (dict) --

    The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

    If you specify InstanceRequirementsWithMetadata , you can't specify InstanceTypes .

    • ArchitectureTypes (list) --

      The architecture type.

      • (string) --
    • VirtualizationTypes (list) --

      The virtualization type.

      • (string) --
    • InstanceRequirements (dict) --

      The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

      • VCpuCount (dict) -- [REQUIRED]

        The minimum and maximum number of vCPUs.

        • Min (integer) -- [REQUIRED]

          The minimum number of vCPUs. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

      • MemoryMiB (dict) -- [REQUIRED]

        The minimum and maximum amount of memory, in MiB.

        • Min (integer) -- [REQUIRED]

          The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

      • CpuManufacturers (list) --

        The CPU manufacturers to include.

        • For instance types with Intel CPUs, specify intel .
        • For instance types with AMD CPUs, specify amd .
        • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

        Note

        Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

        Default: Any manufacturer

        • (string) --
      • MemoryGiBPerVCpu (dict) --

        The minimum and maximum amount of memory per vCPU, in GiB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

      • ExcludedInstanceTypes (list) --

        The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

        For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

        Default: No excluded instance types

        • (string) --
      • InstanceGenerations (list) --

        Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

        For current generation instance types, specify current .

        For previous generation instance types, specify previous .

        Default: Current and previous generation instance types

        • (string) --
      • SpotMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 100

      • OnDemandMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 20

      • BareMetal (string) --

        Indicates whether bare metal instance types must be included, excluded, or required.

        • To include bare metal instance types, specify included .
        • To require only bare metal instance types, specify required .
        • To exclude bare metal instance types, specify excluded .

        Default: excluded

      • BurstablePerformance (string) --

        Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

        • To include burstable performance instance types, specify included .
        • To require only burstable performance instance types, specify required .
        • To exclude burstable performance instance types, specify excluded .

        Default: excluded

      • RequireHibernateSupport (boolean) --

        Indicates whether instance types must support hibernation for On-Demand Instances.

        This parameter is not supported for GetSpotPlacementScores .

        Default: false

      • NetworkInterfaceCount (dict) --

        The minimum and maximum number of network interfaces.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

      • LocalStorage (string) --

        Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

        • To include instance types with instance store volumes, specify included .
        • To require only instance types with instance store volumes, specify required .
        • To exclude instance types with instance store volumes, specify excluded .

        Default: included

      • LocalStorageTypes (list) --

        The type of local storage that is required.

        • For instance types with hard disk drive (HDD) storage, specify hdd .
        • For instance types with solid state drive (SSD) storage, specify ssd .

        Default: hdd and ssd

        • (string) --
      • TotalLocalStorageGB (dict) --

        The minimum and maximum amount of total local storage, in GB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

      • BaselineEbsBandwidthMbps (dict) --

        The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

      • AcceleratorTypes (list) --

        The accelerator types that must be on the instance type.

        • To include instance types with GPU hardware, specify gpu .
        • To include instance types with FPGA hardware, specify fpga .
        • To include instance types with inference hardware, specify inference .

        Default: Any accelerator type

        • (string) --
      • AcceleratorCount (dict) --

        The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

        To exclude accelerator-enabled instance types, set Max to 0 .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of accelerators. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

      • AcceleratorManufacturers (list) --

        Indicates whether instance types must have accelerators by specific manufacturers.

        • For instance types with NVIDIA devices, specify nvidia .
        • For instance types with AMD devices, specify amd .
        • For instance types with Amazon Web Services devices, specify amazon-web-services .
        • For instance types with Xilinx devices, specify xilinx .

        Default: Any manufacturer

        • (string) --
      • AcceleratorNames (list) --

        The accelerators that must be on the instance type.

        • For instance types with NVIDIA A100 GPUs, specify a100 .
        • For instance types with NVIDIA V100 GPUs, specify v100 .
        • For instance types with NVIDIA K80 GPUs, specify k80 .
        • For instance types with NVIDIA T4 GPUs, specify t4 .
        • For instance types with NVIDIA M60 GPUs, specify m60 .
        • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
        • For instance types with Xilinx VU9P FPGAs, specify vu9p .

        Default: Any accelerator

        • (string) --
      • AcceleratorTotalMemoryMiB (dict) --

        The minimum and maximum amount of total accelerator memory, in MiB.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- 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.
  • NextToken (string) -- The token for the next set of results.
Return type

dict

Returns

Response Syntax

{
    'SpotPlacementScores': [
        {
            'Region': 'string',
            'AvailabilityZoneId': 'string',
            'Score': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SpotPlacementScores (list) --

      The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to 10. Each score reflects how likely it is that each Region or Availability Zone will succeed at fulfilling the specified target capacity at the time of the Spot placement score request . A score of 10 means that your Spot capacity request is highly likely to succeed in that Region or Availability Zone.

      If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the capacity-optimized allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone and the capacity-optimized allocation strategy.

      Different Regions or Availability Zones might return the same score.

      Note

      The Spot placement score serves as a recommendation only. No score guarantees that your Spot request will be fully or partially fulfilled.

      • (dict) --

        The Spot placement score for this Region or Availability Zone. The score is calculated based on the assumption that the capacity-optimized allocation strategy is used and that all of the Availability Zones in the Region can be used.

        • Region (string) --

          The Region.

        • AvailabilityZoneId (string) --

          The Availability Zone.

        • Score (integer) --

          The placement score, on a scale from 1 to 10 . A score of 10 indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of 1 indicates that your Spot request is not likely to succeed.

    • NextToken (string) --

      The token for the next set of results.

get_subnet_cidr_reservations(**kwargs)

Gets information about the subnet CIDR reservations.

See also: AWS API Documentation

Request Syntax

response = client.get_subnet_cidr_reservations(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SubnetId='string',
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • reservationType - The type of reservation (prefix | explicit ).
    • subnet-id - The ID of the subnet.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • SubnetId (string) --

    [REQUIRED]

    The ID of the subnet.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'SubnetIpv4CidrReservations': [
        {
            'SubnetCidrReservationId': 'string',
            'SubnetId': 'string',
            'Cidr': 'string',
            'ReservationType': 'prefix'|'explicit',
            'OwnerId': 'string',
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'SubnetIpv6CidrReservations': [
        {
            'SubnetCidrReservationId': 'string',
            'SubnetId': 'string',
            'Cidr': 'string',
            'ReservationType': 'prefix'|'explicit',
            'OwnerId': 'string',
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SubnetIpv4CidrReservations (list) --

      Information about the IPv4 subnet CIDR reservations.

      • (dict) --

        Describes a subnet CIDR reservation.

        • SubnetCidrReservationId (string) --

          The ID of the subnet CIDR reservation.

        • SubnetId (string) --

          The ID of the subnet.

        • Cidr (string) --

          The CIDR that has been reserved.

        • ReservationType (string) --

          The type of reservation.

        • OwnerId (string) --

          The ID of the account that owns the subnet CIDR reservation.

        • Description (string) --

          The description assigned to the subnet CIDR reservation.

        • Tags (list) --

          The tags assigned to the subnet CIDR reservation.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

    • SubnetIpv6CidrReservations (list) --

      Information about the IPv6 subnet CIDR reservations.

      • (dict) --

        Describes a subnet CIDR reservation.

        • SubnetCidrReservationId (string) --

          The ID of the subnet CIDR reservation.

        • SubnetId (string) --

          The ID of the subnet.

        • Cidr (string) --

          The CIDR that has been reserved.

        • ReservationType (string) --

          The type of reservation.

        • OwnerId (string) --

          The ID of the account that owns the subnet CIDR reservation.

        • Description (string) --

          The description assigned to the subnet CIDR reservation.

        • Tags (list) --

          The tags assigned to the subnet CIDR reservation.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

    • 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.

get_transit_gateway_attachment_propagations(**kwargs)

Lists the route tables to which the specified resource attachment propagates routes.

See also: AWS API Documentation

Request Syntax

response = client.get_transit_gateway_attachment_propagations(
    TransitGatewayAttachmentId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • Filters (list) --

    One or more filters. The possible values are:

    • transit-gateway-route-table-id - The ID of the transit gateway route table.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayAttachmentPropagations': [
        {
            'TransitGatewayRouteTableId': 'string',
            'State': 'enabling'|'enabled'|'disabling'|'disabled'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayAttachmentPropagations (list) --

      Information about the propagation route tables.

      • (dict) --

        Describes a propagation route table.

        • TransitGatewayRouteTableId (string) --

          The ID of the propagation route table.

        • State (string) --

          The state of the propagation route table.

    • 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.

get_transit_gateway_multicast_domain_associations(**kwargs)

Gets information about the associations for the transit gateway multicast domain.

See also: AWS API Documentation

Request Syntax

response = client.get_transit_gateway_multicast_domain_associations(
    TransitGatewayMulticastDomainId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • Filters (list) --

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.
    • resource-type - The type of resource. The valid value is: vpc .
    • state - The state of the subnet association. Valid values are associated | associating | disassociated | disassociating .
    • subnet-id - The ID of the subnet.
    • transit-gateway-attachment-id - The id of the transit gateway attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'MulticastDomainAssociations': [
        {
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceOwnerId': 'string',
            'Subnet': {
                'SubnetId': 'string',
                'State': 'pendingAcceptance'|'associating'|'associated'|'disassociating'|'disassociated'|'rejected'|'failed'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • MulticastDomainAssociations (list) --

      Information about the multicast domain associations.

      • (dict) --

        Describes the resources associated with the transit gateway multicast domain.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway attachment.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of resource, for example a VPC attachment.

        • ResourceOwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain association resource.

        • Subnet (dict) --

          The subnet associated with the transit gateway multicast domain.

          • SubnetId (string) --

            The ID of the subnet.

          • State (string) --

            The state of the subnet association.

    • 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.

get_transit_gateway_policy_table_associations(**kwargs)

Gets a list of the transit gateway policy table associations.

See also: AWS API Documentation

Request Syntax

response = client.get_transit_gateway_policy_table_associations(
    TransitGatewayPolicyTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayPolicyTableId (string) --

    [REQUIRED]

    The ID of the transit gateway policy table.

  • Filters (list) --

    The filters associated with the transit gateway policy table.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Associations': [
        {
            'TransitGatewayPolicyTableId': 'string',
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'State': 'associating'|'associated'|'disassociating'|'disassociated'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Associations (list) --

      Returns details about the transit gateway policy table association.

      • (dict) --

        Describes a transit gateway policy table association.

        • TransitGatewayPolicyTableId (string) --

          The ID of the transit gateway policy table.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway attachment.

        • ResourceId (string) --

          The resource ID of the transit gateway attachment.

        • ResourceType (string) --

          The resource type for the transit gateway policy table association.

        • State (string) --

          The state of the transit gateway policy table association.

    • NextToken (string) --

      The token for the next page of results.

get_transit_gateway_policy_table_entries(**kwargs)

Returns a list of transit gateway policy table entries.

See also: AWS API Documentation

Request Syntax

response = client.get_transit_gateway_policy_table_entries(
    TransitGatewayPolicyTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayPolicyTableId (string) --

    [REQUIRED]

    The ID of the transit gateway policy table.

  • Filters (list) --

    The filters associated with the transit gateway policy table.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPolicyTableEntries': [
        {
            'PolicyRuleNumber': 'string',
            'PolicyRule': {
                'SourceCidrBlock': 'string',
                'SourcePortRange': 'string',
                'DestinationCidrBlock': 'string',
                'DestinationPortRange': 'string',
                'Protocol': 'string',
                'MetaData': {
                    'MetaDataKey': 'string',
                    'MetaDataValue': 'string'
                }
            },
            'TargetRouteTableId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • TransitGatewayPolicyTableEntries (list) --

      The entries for the transit gateway policy table.

      • (dict) --

        Describes a transit gateway policy table entry

        • PolicyRuleNumber (string) --

          The rule number for the transit gateway policy table entry.

        • PolicyRule (dict) --

          The policy rule associated with the transit gateway policy table.

          • SourceCidrBlock (string) --

            The source CIDR block for the transit gateway policy rule.

          • SourcePortRange (string) --

            The port range for the transit gateway policy rule. Currently this is set to * (all).

          • DestinationCidrBlock (string) --

            The destination CIDR block for the transit gateway policy rule.

          • DestinationPortRange (string) --

            The port range for the transit gateway policy rule. Currently this is set to * (all).

          • Protocol (string) --

            The protocol used by the transit gateway policy rule.

          • MetaData (dict) --

            The meta data tags used for the transit gateway policy rule.

            • MetaDataKey (string) --

              The key name for the transit gateway policy rule meta data tag.

            • MetaDataValue (string) --

              The value of the key for the transit gateway policy rule meta data tag.

        • TargetRouteTableId (string) --

          The ID of the target route table.

get_transit_gateway_prefix_list_references(**kwargs)

Gets information about the prefix list references in a specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.get_transit_gateway_prefix_list_references(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • Filters (list) --

    One or more filters. The possible values are:

    • attachment.resource-id - The ID of the resource for the attachment.
    • attachment.resource-type - The type of resource for the attachment. Valid values are vpc | vpn | direct-connect-gateway | peering .
    • attachment.transit-gateway-attachment-id - The ID of the attachment.
    • is-blackhole - Whether traffic matching the route is blocked (true | false ).
    • prefix-list-id - The ID of the prefix list.
    • prefix-list-owner-id - The ID of the owner of the prefix list.
    • state - The state of the prefix list reference (pending | available | modifying | deleting ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPrefixListReferences': [
        {
            'TransitGatewayRouteTableId': 'string',
            'PrefixListId': 'string',
            'PrefixListOwnerId': 'string',
            'State': 'pending'|'available'|'modifying'|'deleting',
            'Blackhole': True|False,
            'TransitGatewayAttachment': {
                'TransitGatewayAttachmentId': 'string',
                'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
                'ResourceId': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayPrefixListReferences (list) --

      Information about the prefix list references.

      • (dict) --

        Describes a prefix list reference.

        • TransitGatewayRouteTableId (string) --

          The ID of the transit gateway route table.

        • PrefixListId (string) --

          The ID of the prefix list.

        • PrefixListOwnerId (string) --

          The ID of the prefix list owner.

        • State (string) --

          The state of the prefix list reference.

        • Blackhole (boolean) --

          Indicates whether traffic that matches this route is dropped.

        • TransitGatewayAttachment (dict) --

          Information about the transit gateway attachment.

          • TransitGatewayAttachmentId (string) --

            The ID of the attachment.

          • ResourceType (string) --

            The resource type. Note that the tgw-peering resource type has been deprecated.

          • ResourceId (string) --

            The ID of the resource.

    • 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.

get_transit_gateway_route_table_associations(**kwargs)

Gets information about the associations for the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.get_transit_gateway_route_table_associations(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • Filters (list) --

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.
    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect .
    • transit-gateway-attachment-id - The ID of the attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Associations': [
        {
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'State': 'associating'|'associated'|'disassociating'|'disassociated'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Associations (list) --

      Information about the associations.

      • (dict) --

        Describes an association between a route table and a resource attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The resource type. Note that the tgw-peering resource type has been deprecated.

        • State (string) --

          The state of the association.

    • 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.

get_transit_gateway_route_table_propagations(**kwargs)

Gets information about the route table propagations for the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.get_transit_gateway_route_table_propagations(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • Filters (list) --

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.
    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect .
    • transit-gateway-attachment-id - The ID of the attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTablePropagations': [
        {
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'State': 'enabling'|'enabled'|'disabling'|'disabled',
            'TransitGatewayRouteTableAnnouncementId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TransitGatewayRouteTablePropagations (list) --

      Information about the route table propagations.

      • (dict) --

        Describes a route table propagation.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of resource. Note that the tgw-peering resource type has been deprecated.

        • State (string) --

          The state of the resource.

        • TransitGatewayRouteTableAnnouncementId (string) --

          The ID of the transit gateway route table announcement.

    • 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.

get_vpn_connection_device_sample_configuration(**kwargs)

Download an Amazon Web Services-provided sample configuration file to be used with the customer gateway device specified for your Site-to-Site VPN connection.

See also: AWS API Documentation

Request Syntax

response = client.get_vpn_connection_device_sample_configuration(
    VpnConnectionId='string',
    VpnConnectionDeviceTypeId='string',
    InternetKeyExchangeVersion='string',
    DryRun=True|False
)
Parameters
  • VpnConnectionId (string) --

    [REQUIRED]

    The VpnConnectionId specifies the Site-to-Site VPN connection used for the sample configuration.

  • VpnConnectionDeviceTypeId (string) --

    [REQUIRED]

    Device identifier provided by the GetVpnConnectionDeviceTypes API.

  • InternetKeyExchangeVersion (string) -- The IKE version to be used in the sample configuration file for your customer gateway device. You can specify one of the following versions: ikev1 or ikev2 .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnConnectionDeviceSampleConfiguration': 'string'
}

Response Structure

  • (dict) --

    • VpnConnectionDeviceSampleConfiguration (string) --

      Sample configuration file for the specified customer gateway device.

get_vpn_connection_device_types(**kwargs)

Obtain a list of customer gateway devices for which sample configuration files can be provided. The request has no additional parameters. You can also see the list of device types with sample configuration files available under Your customer gateway device in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_vpn_connection_device_types(
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • MaxResults (integer) -- The maximum number of results returned by GetVpnConnectionDeviceTypes in paginated output. When this parameter is used, GetVpnConnectionDeviceTypes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another GetVpnConnectionDeviceTypes request with the returned NextToken value. This value can be between 200 and 1000. If this parameter is not used, then GetVpnConnectionDeviceTypes returns all results.
  • NextToken (string) -- The NextToken value returned from a previous paginated GetVpnConnectionDeviceTypes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnConnectionDeviceTypes': [
        {
            'VpnConnectionDeviceTypeId': 'string',
            'Vendor': 'string',
            'Platform': 'string',
            'Software': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • VpnConnectionDeviceTypes (list) --

      List of customer gateway devices that have a sample configuration file available for use.

      • (dict) --

        List of customer gateway devices that have a sample configuration file available for use. You can also see the list of device types with sample configuration files available under Your customer gateway device in the Amazon Web Services Site-to-Site VPN User Guide .

        • VpnConnectionDeviceTypeId (string) --

          Customer gateway device identifier.

        • Vendor (string) --

          Customer gateway device vendor.

        • Platform (string) --

          Customer gateway device platform.

        • Software (string) --

          Customer gateway device software version.

    • NextToken (string) --

      The NextToken value to include in a future GetVpnConnectionDeviceTypes request. When the results of a GetVpnConnectionDeviceTypes request exceed MaxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
import_client_vpn_client_certificate_revocation_list(**kwargs)

Uploads a client certificate revocation list to the specified Client VPN endpoint. Uploading a client certificate revocation list overwrites the existing client certificate revocation list.

Uploading a client certificate revocation list resets existing client connections.

See also: AWS API Documentation

Request Syntax

response = client.import_client_vpn_client_certificate_revocation_list(
    ClientVpnEndpointId='string',
    CertificateRevocationList='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint to which the client certificate revocation list applies.

  • CertificateRevocationList (string) --

    [REQUIRED]

    The client certificate revocation list file. For more information, see Generate a Client Certificate Revocation List in the Client VPN Administrator Guide .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

import_image(**kwargs)

Import single or multi-volume disk images or EBS snapshots into an Amazon Machine Image (AMI).

For more information, see Importing a VM as an image using VM Import/Export in the VM Import/Export User Guide .

See also: AWS API Documentation

Request Syntax

response = client.import_image(
    Architecture='string',
    ClientData={
        'Comment': 'string',
        'UploadEnd': datetime(2015, 1, 1),
        'UploadSize': 123.0,
        'UploadStart': datetime(2015, 1, 1)
    },
    ClientToken='string',
    Description='string',
    DiskContainers=[
        {
            'Description': 'string',
            'DeviceName': 'string',
            'Format': 'string',
            'SnapshotId': 'string',
            'Url': 'string',
            'UserBucket': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            }
        },
    ],
    DryRun=True|False,
    Encrypted=True|False,
    Hypervisor='string',
    KmsKeyId='string',
    LicenseType='string',
    Platform='string',
    RoleName='string',
    LicenseSpecifications=[
        {
            'LicenseConfigurationArn': 'string'
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    UsageOperation='string',
    BootMode='legacy-bios'|'uefi'
)
Parameters
  • Architecture (string) --

    The architecture of the virtual machine.

    Valid values: i386 | x86_64

  • ClientData (dict) --

    The client-specific data.

    • Comment (string) --

      A user-defined comment about the disk upload.

    • UploadEnd (datetime) --

      The time that the disk upload ends.

    • UploadSize (float) --

      The size of the uploaded disk image, in GiB.

    • UploadStart (datetime) --

      The time that the disk upload starts.

  • ClientToken (string) -- The token to enable idempotency for VM import requests.
  • Description (string) -- A description string for the import image task.
  • DiskContainers (list) --

    Information about the disk containers.

    • (dict) --

      Describes the disk container object for an import image task.

      • Description (string) --

        The description of the disk image.

      • DeviceName (string) --

        The block device mapping for the disk.

      • Format (string) --

        The format of the disk image being imported.

        Valid values: OVA | VHD | VHDX | VMDK | RAW

      • SnapshotId (string) --

        The ID of the EBS snapshot to be used for importing the snapshot.

      • Url (string) --

        The URL to the Amazon S3-based disk image being imported. The URL can either be a https URL (https://..) or an Amazon S3 URL (s3://..)

      • UserBucket (dict) --

        The S3 bucket for the disk image.

        • S3Bucket (string) --

          The name of the Amazon S3 bucket where the disk image is located.

        • S3Key (string) --

          The file name of the disk image.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Encrypted (boolean) -- Specifies whether the destination AMI of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId . For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
  • Hypervisor (string) --

    The target hypervisor platform.

    Valid values: xen

  • KmsKeyId (string) --

    An identifier for the symmetric KMS key to use when creating the encrypted AMI. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

    The KMS key identifier may be provided in any of the following formats:

    • Key ID
    • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1 :012345678910 :alias/ExampleAlias .
    • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1 :012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef .
    • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1 :012345678910 :alias/ExampleAlias .

    Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

    The specified KMS key must exist in the Region that the AMI is being copied to.

    Amazon EBS does not support asymmetric KMS keys.

  • LicenseType (string) --

    The license type to be used for the Amazon Machine Image (AMI) after importing.

    By default, we detect the source-system operating system (OS) and apply the appropriate license. Specify AWS to replace the source-system license with an Amazon Web Services license, if appropriate. Specify BYOL to retain the source-system license, if appropriate.

    To use BYOL , you must have existing licenses with rights to use these licenses in a third party cloud, such as Amazon Web Services. For more information, see Prerequisites in the VM Import/Export User Guide.

  • Platform (string) --

    The operating system of the virtual machine.

    Valid values: Windows | Linux

  • RoleName (string) -- The name of the role to use when not using the default role, 'vmimport'.
  • LicenseSpecifications (list) --

    The ARNs of the license configurations.

    • (dict) --

      The request information of license configurations.

      • LicenseConfigurationArn (string) --

        The ARN of a license configuration.

  • TagSpecifications (list) --

    The tags to apply to the import image task during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • UsageOperation (string) -- The usage operation value. For more information, see Licensing options in the VM Import/Export User Guide .
  • BootMode (string) -- The boot mode of the virtual machine.
Return type

dict

Returns

Response Syntax

{
    'Architecture': 'string',
    'Description': 'string',
    'Encrypted': True|False,
    'Hypervisor': 'string',
    'ImageId': 'string',
    'ImportTaskId': 'string',
    'KmsKeyId': 'string',
    'LicenseType': 'string',
    'Platform': 'string',
    'Progress': 'string',
    'SnapshotDetails': [
        {
            'Description': 'string',
            'DeviceName': 'string',
            'DiskImageSize': 123.0,
            'Format': 'string',
            'Progress': 'string',
            'SnapshotId': 'string',
            'Status': 'string',
            'StatusMessage': 'string',
            'Url': 'string',
            'UserBucket': {
                'S3Bucket': 'string',
                'S3Key': 'string'
            }
        },
    ],
    'Status': 'string',
    'StatusMessage': 'string',
    'LicenseSpecifications': [
        {
            'LicenseConfigurationArn': 'string'
        },
    ],
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'UsageOperation': 'string'
}

Response Structure

  • (dict) --

    • Architecture (string) --

      The architecture of the virtual machine.

    • Description (string) --

      A description of the import task.

    • Encrypted (boolean) --

      Indicates whether the AMI is encrypted.

    • Hypervisor (string) --

      The target hypervisor of the import task.

    • ImageId (string) --

      The ID of the Amazon Machine Image (AMI) created by the import task.

    • ImportTaskId (string) --

      The task ID of the import image task.

    • KmsKeyId (string) --

      The identifier for the symmetric KMS key that was used to create the encrypted AMI.

    • LicenseType (string) --

      The license type of the virtual machine.

    • Platform (string) --

      The operating system of the virtual machine.

    • Progress (string) --

      The progress of the task.

    • SnapshotDetails (list) --

      Information about the snapshots.

      • (dict) --

        Describes the snapshot created from the imported disk.

        • Description (string) --

          A description for the snapshot.

        • DeviceName (string) --

          The block device mapping for the snapshot.

        • DiskImageSize (float) --

          The size of the disk in the snapshot, in GiB.

        • Format (string) --

          The format of the disk image from which the snapshot is created.

        • Progress (string) --

          The percentage of progress for the task.

        • SnapshotId (string) --

          The snapshot ID of the disk being imported.

        • Status (string) --

          A brief status of the snapshot creation.

        • StatusMessage (string) --

          A detailed status message for the snapshot creation.

        • Url (string) --

          The URL used to access the disk image.

        • UserBucket (dict) --

          The Amazon S3 bucket for the disk image.

          • S3Bucket (string) --

            The Amazon S3 bucket from which the disk image was created.

          • S3Key (string) --

            The file name of the disk image.

    • Status (string) --

      A brief status of the task.

    • StatusMessage (string) --

      A detailed status message of the import task.

    • LicenseSpecifications (list) --

      The ARNs of the license configurations.

      • (dict) --

        The response information for license configurations.

        • LicenseConfigurationArn (string) --

          The ARN of a license configuration.

    • Tags (list) --

      Any tags assigned to the import image 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 256 Unicode characters.

    • UsageOperation (string) --

      The usage operation value.

import_instance(**kwargs)

Creates an import instance task using metadata from the specified disk image.

This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead.

This API action is not supported by the Command Line Interface (CLI). For information about using the Amazon EC2 CLI, which is deprecated, see Importing a VM to Amazon EC2 in the Amazon EC2 CLI Reference PDF file.

For information about the import manifest referenced by this API action, see VM Import Manifest .

See also: AWS API Documentation

Request Syntax

response = client.import_instance(
    Description='string',
    DiskImages=[
        {
            'Description': 'string',
            'Image': {
                'Bytes': 123,
                'Format': 'VMDK'|'RAW'|'VHD',
                'ImportManifestUrl': 'string'
            },
            'Volume': {
                'Size': 123
            }
        },
    ],
    DryRun=True|False,
    LaunchSpecification={
        'AdditionalInfo': 'string',
        'Architecture': 'i386'|'x86_64'|'arm64'|'x86_64_mac',
        'GroupIds': [
            'string',
        ],
        'GroupNames': [
            'string',
        ],
        'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
        'Monitoring': True|False,
        'Placement': {
            'AvailabilityZone': 'string',
            'Affinity': 'string',
            'GroupName': 'string',
            'PartitionNumber': 123,
            'HostId': 'string',
            'Tenancy': 'default'|'dedicated'|'host',
            'SpreadDomain': 'string',
            'HostResourceGroupArn': 'string'
        },
        'PrivateIpAddress': 'string',
        'SubnetId': 'string',
        'UserData': {
            'Data': 'string'
        }
    },
    Platform='Windows'
)
Parameters
  • Description (string) -- A description for the instance being imported.
  • DiskImages (list) --

    The disk image.

    • (dict) --

      Describes a disk image.

      • Description (string) --

        A description of the disk image.

      • Image (dict) --

        Information about the disk image.

        • Bytes (integer) -- [REQUIRED]

          The size of the disk image, in GiB.

        • Format (string) -- [REQUIRED]

          The disk image format.

        • 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 .

      • Volume (dict) --

        Information about the volume.

        • Size (integer) -- [REQUIRED]

          The size of the volume, in GiB.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LaunchSpecification (dict) --

    The launch specification.

    • AdditionalInfo (string) --

      Reserved.

    • Architecture (string) --

      The architecture of the instance.

    • GroupIds (list) --

      The security group IDs.

      • (string) --
    • GroupNames (list) --

      The security group names.

      • (string) --
    • InstanceInitiatedShutdownBehavior (string) --

      Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

    • InstanceType (string) --

      The instance type. For more information about the instance types that you can import, see Instance Types in the VM Import/Export User Guide.

    • Monitoring (boolean) --

      Indicates whether monitoring is enabled.

    • Placement (dict) --

      The placement information for the instance.

      • AvailabilityZone (string) --

        The Availability Zone of the instance.

        If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

        This parameter is not supported by CreateFleet .

      • Affinity (string) --

        The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

        This parameter is not supported by CreateFleet .

      • GroupName (string) --

        The name of the placement group the instance is in.

      • PartitionNumber (integer) --

        The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

        This parameter is not supported by CreateFleet .

      • HostId (string) --

        The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

        This parameter is not supported by CreateFleet .

      • 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.

        This parameter is not supported by CreateFleet .

        T3 instances that use the unlimited CPU credit option do not support host tenancy.

      • SpreadDomain (string) --

        Reserved for future use.

        This parameter is not supported by CreateFleet .

      • HostResourceGroupArn (string) --

        The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

        This parameter is not supported by CreateFleet .

    • PrivateIpAddress (string) --

      [EC2-VPC] An available IP address from the IP address range of the subnet.

    • SubnetId (string) --

      [EC2-VPC] The ID of the subnet in which to launch the instance.

    • UserData (dict) --

      The Base64-encoded user data to make available to the instance.

      • Data (string) --

        The user data. If you are using an Amazon Web Services SDK or command line tool, Base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide Base64-encoded text.

  • Platform (string) --

    [REQUIRED]

    The instance operating system.

Return type

dict

Returns

Response Syntax

{
    'ConversionTask': {
        'ConversionTaskId': 'string',
        'ExpirationTime': 'string',
        'ImportInstance': {
            'Description': 'string',
            'InstanceId': 'string',
            'Platform': 'Windows',
            'Volumes': [
                {
                    'AvailabilityZone': 'string',
                    'BytesConverted': 123,
                    'Description': 'string',
                    'Image': {
                        'Checksum': 'string',
                        'Format': 'VMDK'|'RAW'|'VHD',
                        'ImportManifestUrl': 'string',
                        'Size': 123
                    },
                    'Status': 'string',
                    'StatusMessage': 'string',
                    'Volume': {
                        'Id': 'string',
                        'Size': 123
                    }
                },
            ]
        },
        'ImportVolume': {
            'AvailabilityZone': 'string',
            'BytesConverted': 123,
            'Description': 'string',
            'Image': {
                'Checksum': 'string',
                'Format': 'VMDK'|'RAW'|'VHD',
                'ImportManifestUrl': 'string',
                'Size': 123
            },
            'Volume': {
                'Id': 'string',
                'Size': 123
            }
        },
        '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.

        • Description (string) --

          A description of the task.

        • InstanceId (string) --

          The ID of the instance.

        • Platform (string) --

          The instance operating system.

        • Volumes (list) --

          The volumes.

          • (dict) --

            Describes an import volume task.

            • AvailabilityZone (string) --

              The Availability Zone where the resulting instance will reside.

            • BytesConverted (integer) --

              The number of bytes converted so far.

            • Description (string) --

              A description of the task.

            • Image (dict) --

              The image.

              • Checksum (string) --

                The checksum computed for the disk image.

              • Format (string) --

                The disk image format.

              • 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 .

              • Size (integer) --

                The size of the disk image, in GiB.

            • Status (string) --

              The status of the import of this particular disk image.

            • StatusMessage (string) --

              The status information or errors related to the disk image.

            • Volume (dict) --

              The volume.

              • Id (string) --

                The volume identifier.

              • Size (integer) --

                The size of the volume, in GiB.

      • ImportVolume (dict) --

        If the task is for importing a volume, this contains information about the import volume task.

        • AvailabilityZone (string) --

          The Availability Zone where the resulting volume will reside.

        • BytesConverted (integer) --

          The number of bytes converted so far.

        • Description (string) --

          The description you provided when starting the import volume task.

        • Image (dict) --

          The image.

          • Checksum (string) --

            The checksum computed for the disk image.

          • Format (string) --

            The disk image format.

          • 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 .

          • Size (integer) --

            The size of the disk image, in GiB.

        • Volume (dict) --

          The volume.

          • Id (string) --

            The volume identifier.

          • Size (integer) --

            The size of the volume, in GiB.

      • 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 256 Unicode characters.

import_key_pair(**kwargs)

Imports the public key from an RSA or ED25519 key pair that you created with a third-party tool. Compare this with CreateKeyPair , in which Amazon Web Services creates the key pair and gives the keys to you (Amazon Web Services keeps a copy of the public key). With ImportKeyPair, you create the key pair and give Amazon Web Services just the public key. The private key is never transferred between you and Amazon Web Services.

For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.import_key_pair(
    DryRun=True|False,
    KeyName='string',
    PublicKeyMaterial=b'bytes',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • KeyName (string) --

    [REQUIRED]

    A unique name for the key pair.

  • PublicKeyMaterial (bytes) --

    [REQUIRED]

    The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

  • TagSpecifications (list) --

    The tags to apply to the imported key pair.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'KeyFingerprint': 'string',
    'KeyName': 'string',
    'KeyPairId': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • KeyFingerprint (string) --

      • For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC 4716.
      • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8 .
    • KeyName (string) --

      The key pair name that you provided.

    • KeyPairId (string) --

      The ID of the resulting key pair.

    • Tags (list) --

      The tags applied to the imported key pair.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

        • Value (string) --

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

import_snapshot(**kwargs)

Imports a disk into an EBS snapshot.

For more information, see Importing a disk as a snapshot using VM Import/Export in the VM Import/Export User Guide .

See also: AWS API Documentation

Request Syntax

response = client.import_snapshot(
    ClientData={
        'Comment': 'string',
        'UploadEnd': datetime(2015, 1, 1),
        'UploadSize': 123.0,
        'UploadStart': datetime(2015, 1, 1)
    },
    ClientToken='string',
    Description='string',
    DiskContainer={
        'Description': 'string',
        'Format': 'string',
        'Url': 'string',
        'UserBucket': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        }
    },
    DryRun=True|False,
    Encrypted=True|False,
    KmsKeyId='string',
    RoleName='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • ClientData (dict) --

    The client-specific data.

    • Comment (string) --

      A user-defined comment about the disk upload.

    • UploadEnd (datetime) --

      The time that the disk upload ends.

    • UploadSize (float) --

      The size of the uploaded disk image, in GiB.

    • UploadStart (datetime) --

      The time that the disk upload starts.

  • ClientToken (string) -- Token to enable idempotency for VM import requests.
  • Description (string) -- The description string for the import snapshot task.
  • DiskContainer (dict) --

    Information about the disk container.

    • Description (string) --

      The description of the disk image being imported.

    • Format (string) --

      The format of the disk image being imported.

      Valid values: VHD | VMDK | RAW

    • Url (string) --

      The URL to the Amazon S3-based disk image being imported. It can either be a https URL (https://..) or an Amazon S3 URL (s3://..).

    • UserBucket (dict) --

      The Amazon S3 bucket for the disk image.

      • S3Bucket (string) --

        The name of the Amazon S3 bucket where the disk image is located.

      • S3Key (string) --

        The file name of the disk image.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Encrypted (boolean) -- Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId . For more information, see Amazon EBS Encryption in the Amazon Elastic Compute Cloud User Guide .
  • KmsKeyId (string) --

    An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

    The KMS key identifier may be provided in any of the following formats:

    • Key ID
    • Key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1 :012345678910 :alias/ExampleAlias .
    • ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the key namespace, and then the key ID. For example, arn:aws:kms:us-east-1 :012345678910 :key/abcd1234-a123-456a-a12b-a123b4cd56ef .
    • ARN using key alias. The alias ARN contains the arn:aws:kms namespace, followed by the Region of the key, the Amazon Web Services account ID of the key owner, the alias namespace, and then the key alias. For example, arn:aws:kms:us-east-1 :012345678910 :alias/ExampleAlias .

    Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you call may appear to complete even though you provided an invalid identifier. This action will eventually report failure.

    The specified KMS key must exist in the Region that the snapshot is being copied to.

    Amazon EBS does not support asymmetric KMS keys.

  • RoleName (string) -- The name of the role to use when not using the default role, 'vmimport'.
  • TagSpecifications (list) --

    The tags to apply to the import snapshot task during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'Description': 'string',
    'ImportTaskId': 'string',
    'SnapshotTaskDetail': {
        'Description': 'string',
        'DiskImageSize': 123.0,
        'Encrypted': True|False,
        'Format': 'string',
        'KmsKeyId': 'string',
        'Progress': 'string',
        'SnapshotId': 'string',
        'Status': 'string',
        'StatusMessage': 'string',
        'Url': 'string',
        'UserBucket': {
            'S3Bucket': 'string',
            'S3Key': 'string'
        }
    },
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Description (string) --

      A description of the import snapshot task.

    • ImportTaskId (string) --

      The ID of the import snapshot task.

    • SnapshotTaskDetail (dict) --

      Information about the import snapshot task.

      • Description (string) --

        The description of the snapshot.

      • DiskImageSize (float) --

        The size of the disk in the snapshot, in GiB.

      • Encrypted (boolean) --

        Indicates whether the snapshot is encrypted.

      • Format (string) --

        The format of the disk image from which the snapshot is created.

      • KmsKeyId (string) --

        The identifier for the KMS key that was used to create the encrypted snapshot.

      • Progress (string) --

        The percentage of completion for the import snapshot task.

      • SnapshotId (string) --

        The snapshot ID of the disk being imported.

      • Status (string) --

        A brief status for the import snapshot task.

      • StatusMessage (string) --

        A detailed status message for the import snapshot task.

      • Url (string) --

        The URL of the disk image from which the snapshot is created.

      • UserBucket (dict) --

        The Amazon S3 bucket for the disk image.

        • S3Bucket (string) --

          The Amazon S3 bucket from which the disk image was created.

        • S3Key (string) --

          The file name of the disk image.

    • Tags (list) --

      Any tags assigned to the import snapshot 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 256 Unicode characters.

import_volume(**kwargs)

Creates an import volume task using metadata from the specified disk image.

This API action supports only single-volume VMs. To import multi-volume VMs, use ImportImage instead. To import a disk to a snapshot, use ImportSnapshot instead.

This API action is not supported by the Command Line Interface (CLI). For information about using the Amazon EC2 CLI, which is deprecated, see Importing Disks to Amazon EBS in the Amazon EC2 CLI Reference PDF file.

For information about the import manifest referenced by this API action, see VM Import Manifest .

See also: AWS API Documentation

Request Syntax

response = client.import_volume(
    AvailabilityZone='string',
    Description='string',
    DryRun=True|False,
    Image={
        'Bytes': 123,
        'Format': 'VMDK'|'RAW'|'VHD',
        'ImportManifestUrl': 'string'
    },
    Volume={
        'Size': 123
    }
)
Parameters
  • AvailabilityZone (string) --

    [REQUIRED]

    The Availability Zone for the resulting EBS volume.

  • Description (string) -- A description of the volume.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Image (dict) --

    [REQUIRED]

    The disk image.

    • Bytes (integer) -- [REQUIRED]

      The size of the disk image, in GiB.

    • Format (string) -- [REQUIRED]

      The disk image format.

    • 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 .

  • Volume (dict) --

    [REQUIRED]

    The volume size.

    • Size (integer) -- [REQUIRED]

      The size of the volume, in GiB.

Return type

dict

Returns

Response Syntax

{
    'ConversionTask': {
        'ConversionTaskId': 'string',
        'ExpirationTime': 'string',
        'ImportInstance': {
            'Description': 'string',
            'InstanceId': 'string',
            'Platform': 'Windows',
            'Volumes': [
                {
                    'AvailabilityZone': 'string',
                    'BytesConverted': 123,
                    'Description': 'string',
                    'Image': {
                        'Checksum': 'string',
                        'Format': 'VMDK'|'RAW'|'VHD',
                        'ImportManifestUrl': 'string',
                        'Size': 123
                    },
                    'Status': 'string',
                    'StatusMessage': 'string',
                    'Volume': {
                        'Id': 'string',
                        'Size': 123
                    }
                },
            ]
        },
        'ImportVolume': {
            'AvailabilityZone': 'string',
            'BytesConverted': 123,
            'Description': 'string',
            'Image': {
                'Checksum': 'string',
                'Format': 'VMDK'|'RAW'|'VHD',
                'ImportManifestUrl': 'string',
                'Size': 123
            },
            'Volume': {
                'Id': 'string',
                'Size': 123
            }
        },
        '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.

        • Description (string) --

          A description of the task.

        • InstanceId (string) --

          The ID of the instance.

        • Platform (string) --

          The instance operating system.

        • Volumes (list) --

          The volumes.

          • (dict) --

            Describes an import volume task.

            • AvailabilityZone (string) --

              The Availability Zone where the resulting instance will reside.

            • BytesConverted (integer) --

              The number of bytes converted so far.

            • Description (string) --

              A description of the task.

            • Image (dict) --

              The image.

              • Checksum (string) --

                The checksum computed for the disk image.

              • Format (string) --

                The disk image format.

              • 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 .

              • Size (integer) --

                The size of the disk image, in GiB.

            • Status (string) --

              The status of the import of this particular disk image.

            • StatusMessage (string) --

              The status information or errors related to the disk image.

            • Volume (dict) --

              The volume.

              • Id (string) --

                The volume identifier.

              • Size (integer) --

                The size of the volume, in GiB.

      • ImportVolume (dict) --

        If the task is for importing a volume, this contains information about the import volume task.

        • AvailabilityZone (string) --

          The Availability Zone where the resulting volume will reside.

        • BytesConverted (integer) --

          The number of bytes converted so far.

        • Description (string) --

          The description you provided when starting the import volume task.

        • Image (dict) --

          The image.

          • Checksum (string) --

            The checksum computed for the disk image.

          • Format (string) --

            The disk image format.

          • 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 .

          • Size (integer) --

            The size of the disk image, in GiB.

        • Volume (dict) --

          The volume.

          • Id (string) --

            The volume identifier.

          • Size (integer) --

            The size of the volume, in GiB.

      • 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 256 Unicode characters.

list_images_in_recycle_bin(**kwargs)

Lists one or more AMIs that are currently in the Recycle Bin. For more information, see Recycle Bin in the Amazon Elastic Compute Cloud User Guide.

See also: AWS API Documentation

Request Syntax

response = client.list_images_in_recycle_bin(
    ImageIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
Parameters
  • ImageIds (list) --

    The IDs of the AMIs to list. Omit this parameter to list all of the AMIs that are in the Recycle Bin. You can specify up to 20 IDs in a single request.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) --

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

    If you do not specify a value for MaxResults , the request returns 1,000 items per page by default. For more information, see Pagination .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Images': [
        {
            'ImageId': 'string',
            'Name': 'string',
            'Description': 'string',
            'RecycleBinEnterTime': datetime(2015, 1, 1),
            'RecycleBinExitTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Images (list) --

      Information about the AMIs.

      • (dict) --

        Information about an AMI that is currently in the Recycle Bin.

        • ImageId (string) --

          The ID of the AMI.

        • Name (string) --

          The name of the AMI.

        • Description (string) --

          The description of the AMI.

        • RecycleBinEnterTime (datetime) --

          The date and time when the AMI entered the Recycle Bin.

        • RecycleBinExitTime (datetime) --

          The date and time when the AMI is to be permanently deleted from the Recycle Bin.

    • 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.

list_snapshots_in_recycle_bin(**kwargs)

Lists one or more snapshots that are currently in the Recycle Bin.

See also: AWS API Documentation

Request Syntax

response = client.list_snapshots_in_recycle_bin(
    MaxResults=123,
    NextToken='string',
    SnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • SnapshotIds (list) --

    The IDs of the snapshots to list. Omit this parameter to list all of the snapshots that are in the Recycle Bin.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Snapshots': [
        {
            'SnapshotId': 'string',
            'RecycleBinEnterTime': datetime(2015, 1, 1),
            'RecycleBinExitTime': datetime(2015, 1, 1),
            'Description': 'string',
            'VolumeId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Snapshots (list) --

      Information about the snapshots.

      • (dict) --

        Information about a snapshot that is currently in the Recycle Bin.

        • SnapshotId (string) --

          The ID of the snapshot.

        • RecycleBinEnterTime (datetime) --

          The date and time when the snaphsot entered the Recycle Bin.

        • RecycleBinExitTime (datetime) --

          The date and time when the snapshot is to be permanently deleted from the Recycle Bin.

        • Description (string) --

          The description for the snapshot.

        • VolumeId (string) --

          The ID of the volume from which the snapshot was created.

    • 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.

modify_address_attribute(**kwargs)

Modifies an attribute of the specified Elastic IP address. For requirements, see Using reverse DNS for email applications .

See also: AWS API Documentation

Request Syntax

response = client.modify_address_attribute(
    AllocationId='string',
    DomainName='string',
    DryRun=True|False
)
Parameters
  • AllocationId (string) --

    [REQUIRED]

    [EC2-VPC] The allocation ID.

  • DomainName (string) -- The domain name to modify for the IP address.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Address': {
        'PublicIp': 'string',
        'AllocationId': 'string',
        'PtrRecord': 'string',
        'PtrRecordUpdate': {
            'Value': 'string',
            'Status': 'string',
            'Reason': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Address (dict) --

      Information about the Elastic IP address.

      • PublicIp (string) --

        The public IP address.

      • AllocationId (string) --

        [EC2-VPC] The allocation ID.

      • PtrRecord (string) --

        The pointer (PTR) record for the IP address.

      • PtrRecordUpdate (dict) --

        The updated PTR record for the IP address.

        • Value (string) --

          The value for the PTR record update.

        • Status (string) --

          The status of the PTR record update.

        • Reason (string) --

          The reason for the PTR record update.

modify_availability_zone_group(**kwargs)

Changes the opt-in status of the Local Zone and Wavelength Zone group for your account.

Use DescribeAvailabilityZones to view the value for GroupName .

See also: AWS API Documentation

Request Syntax

response = client.modify_availability_zone_group(
    GroupName='string',
    OptInStatus='opted-in'|'not-opted-in',
    DryRun=True|False
)
Parameters
  • GroupName (string) --

    [REQUIRED]

    The name of the Availability Zone group, Local Zone group, or Wavelength Zone group.

  • OptInStatus (string) --

    [REQUIRED]

    Indicates whether you are opted in to the Local Zone group or Wavelength Zone group. The only valid value is opted-in . You must contact Amazon Web Services Support to opt out of a Local Zone or Wavelength Zone group.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Is true if the request succeeds, and an error otherwise.

modify_capacity_reservation(**kwargs)

Modifies a Capacity Reservation's capacity and the conditions under which it is to be released. You cannot change a Capacity Reservation's instance type, EBS optimization, instance store settings, platform, Availability Zone, or instance eligibility. If you need to modify any of these attributes, we recommend that you cancel the Capacity Reservation, and then create a new one with the required attributes.

See also: AWS API Documentation

Request Syntax

response = client.modify_capacity_reservation(
    CapacityReservationId='string',
    InstanceCount=123,
    EndDate=datetime(2015, 1, 1),
    EndDateType='unlimited'|'limited',
    Accept=True|False,
    DryRun=True|False,
    AdditionalInfo='string'
)
Parameters
  • CapacityReservationId (string) --

    [REQUIRED]

    The ID of the Capacity Reservation.

  • InstanceCount (integer) -- The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by more than 1000 in a single request.
  • EndDate (datetime) --

    The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

    The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.

    You must provide an EndDate value if EndDateType is limited . Omit EndDate if EndDateType is unlimited .

  • EndDateType (string) --

    Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

    • unlimited - The Capacity Reservation remains active until you explicitly cancel it. Do not provide an EndDate value if EndDateType is unlimited .
    • limited - The Capacity Reservation expires automatically at a specified date and time. You must provide an EndDate value if EndDateType is limited .
  • Accept (boolean) -- Reserved. Capacity Reservations you have created are accepted by default.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • AdditionalInfo (string) -- Reserved for future use.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_capacity_reservation_fleet(**kwargs)

Modifies a Capacity Reservation Fleet.

When you modify the total target capacity of a Capacity Reservation Fleet, the Fleet automatically creates new Capacity Reservations, or modifies or cancels existing Capacity Reservations in the Fleet to meet the new total target capacity. When you modify the end date for the Fleet, the end dates for all of the individual Capacity Reservations in the Fleet are updated accordingly.

See also: AWS API Documentation

Request Syntax

response = client.modify_capacity_reservation_fleet(
    CapacityReservationFleetId='string',
    TotalTargetCapacity=123,
    EndDate=datetime(2015, 1, 1),
    DryRun=True|False,
    RemoveEndDate=True|False
)
Parameters
  • CapacityReservationFleetId (string) --

    [REQUIRED]

    The ID of the Capacity Reservation Fleet to modify.

  • TotalTargetCapacity (integer) -- The total number of capacity units to be reserved by the Capacity Reservation Fleet. This value, together with the instance type weights that you assign to each instance type used by the Fleet determine the number of instances for which the Fleet reserves capacity. Both values are based on units that make sense for your workload. For more information, see Total target capacity in the Amazon EC2 User Guide.
  • EndDate (datetime) --

    The date and time at which the Capacity Reservation Fleet expires. When the Capacity Reservation Fleet expires, its state changes to expired and all of the Capacity Reservations in the Fleet expire.

    The Capacity Reservation Fleet expires within an hour after the specified time. For example, if you specify 5/31/2019 , 13:30:55 , the Capacity Reservation Fleet is guaranteed to expire between 13:30:55 and 14:30:55 on 5/31/2019 .

    You can't specify EndDate and RemoveEndDate in the same request.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RemoveEndDate (boolean) --

    Indicates whether to remove the end date from the Capacity Reservation Fleet. If you remove the end date, the Capacity Reservation Fleet does not expire and it remains active until you explicitly cancel it using the CancelCapacityReservationFleet action.

    You can't specify RemoveEndDate and EndDate in the same request.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_client_vpn_endpoint(**kwargs)

Modifies the specified Client VPN endpoint. Modifying the DNS server resets existing client connections.

See also: AWS API Documentation

Request Syntax

response = client.modify_client_vpn_endpoint(
    ClientVpnEndpointId='string',
    ServerCertificateArn='string',
    ConnectionLogOptions={
        'Enabled': True|False,
        'CloudwatchLogGroup': 'string',
        'CloudwatchLogStream': 'string'
    },
    DnsServers={
        'CustomDnsServers': [
            'string',
        ],
        'Enabled': True|False
    },
    VpnPort=123,
    Description='string',
    SplitTunnel=True|False,
    DryRun=True|False,
    SecurityGroupIds=[
        'string',
    ],
    VpcId='string',
    SelfServicePortal='enabled'|'disabled',
    ClientConnectOptions={
        'Enabled': True|False,
        'LambdaFunctionArn': 'string'
    },
    SessionTimeoutHours=123,
    ClientLoginBannerOptions={
        'Enabled': True|False,
        'BannerText': 'string'
    }
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint to modify.

  • ServerCertificateArn (string) -- The ARN of the server certificate to be used. The server certificate must be provisioned in Certificate Manager (ACM).
  • ConnectionLogOptions (dict) --

    Information about the client connection logging options.

    If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:

    • Client connection requests
    • Client connection results (successful and unsuccessful)
    • Reasons for unsuccessful client connection requests
    • Client connection termination time
    • Enabled (boolean) --

      Indicates whether connection logging is enabled.

    • CloudwatchLogGroup (string) --

      The name of the CloudWatch Logs log group. Required if connection logging is enabled.

    • CloudwatchLogStream (string) --

      The name of the CloudWatch Logs log stream to which the connection data is published.

  • DnsServers (dict) --

    Information about the DNS servers to be used by Client VPN connections. A Client VPN endpoint can have up to two DNS servers.

    • CustomDnsServers (list) --

      The IPv4 address range, in CIDR notation, of the DNS servers to be used. You can specify up to two DNS servers. Ensure that the DNS servers can be reached by the clients. The specified values overwrite the existing values.

      • (string) --
    • Enabled (boolean) --

      Indicates whether DNS servers should be used. Specify False to delete the existing DNS servers.

  • VpnPort (integer) --

    The port number to assign to the Client VPN endpoint for TCP and UDP traffic.

    Valid Values: 443 | 1194

    Default Value: 443

  • Description (string) -- A brief description of the Client VPN endpoint.
  • SplitTunnel (boolean) --

    Indicates whether the VPN is split-tunnel.

    For information about split-tunnel VPN endpoints, see Split-tunnel Client VPN endpoint in the Client VPN Administrator Guide .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SecurityGroupIds (list) --

    The IDs of one or more security groups to apply to the target network.

    • (string) --
  • VpcId (string) -- The ID of the VPC to associate with the Client VPN endpoint.
  • SelfServicePortal (string) -- Specify whether to enable the self-service portal for the Client VPN endpoint.
  • ClientConnectOptions (dict) --

    The options for managing connection authorization for new client connections.

    • Enabled (boolean) --

      Indicates whether client connect options are enabled. The default is false (not enabled).

    • LambdaFunctionArn (string) --

      The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.

  • SessionTimeoutHours (integer) --

    The maximum VPN session duration time in hours.

    Valid values: 8 | 10 | 12 | 24

    Default value: 24

  • ClientLoginBannerOptions (dict) --

    Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

    • Enabled (boolean) --

      Enable or disable a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

      Valid values: true | false

      Default value: false

    • BannerText (string) --

      Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_default_credit_specification(**kwargs)

Modifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per Amazon Web Services Region, and is specified per instance family. All new burstable performance instances in the account launch using the default credit option.

ModifyDefaultCreditSpecification is an asynchronous operation, which works at an Amazon Web Services Region level and modifies the credit option for each Availability Zone. All zones in a Region are updated within five minutes. But if instances are launched during this operation, they might not get the new credit option until the zone is updated. To verify whether the update has occurred, you can call GetDefaultCreditSpecification and check DefaultCreditSpecification for updates.

For more information, see Burstable performance instances in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_default_credit_specification(
    DryRun=True|False,
    InstanceFamily='t2'|'t3'|'t3a'|'t4g',
    CpuCredits='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceFamily (string) --

    [REQUIRED]

    The instance family.

  • CpuCredits (string) --

    [REQUIRED]

    The credit option for CPU usage of the instance family.

    Valid Values: standard | unlimited

Return type

dict

Returns

Response Syntax

{
    'InstanceFamilyCreditSpecification': {
        'InstanceFamily': 't2'|'t3'|'t3a'|'t4g',
        'CpuCredits': 'string'
    }
}

Response Structure

  • (dict) --

    • InstanceFamilyCreditSpecification (dict) --

      The default credit option for CPU usage of the instance family.

      • InstanceFamily (string) --

        The instance family.

      • CpuCredits (string) --

        The default credit option for CPU usage of the instance family. Valid values are standard and unlimited .

modify_ebs_default_kms_key_id(**kwargs)

Changes the default KMS key for EBS encryption by default for your account in this Region.

Amazon Web Services creates a unique Amazon Web Services managed KMS key in each Region for use with encryption by default. If you change the default KMS key to a symmetric customer managed KMS key, it is used instead of the Amazon Web Services managed KMS key. To reset the default KMS key to the Amazon Web Services managed KMS key for EBS, use ResetEbsDefaultKmsKeyId . Amazon EBS does not support asymmetric KMS keys.

If you delete or disable the customer managed KMS key that you specified for use with encryption by default, your instances will fail to launch.

For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_ebs_default_kms_key_id(
    KmsKeyId='string',
    DryRun=True|False
)
Parameters
  • KmsKeyId (string) --

    [REQUIRED]

    The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true .

    You can specify the KMS key using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
    • Key alias. For example, alias/ExampleAlias.
    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

    Amazon EBS does not support asymmetric KMS keys.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'KmsKeyId': 'string'
}

Response Structure

  • (dict) --

    • KmsKeyId (string) --

      The Amazon Resource Name (ARN) of the default KMS key for encryption by default.

modify_fleet(**kwargs)

Modifies the specified EC2 Fleet.

You can only modify an EC2 Fleet request of type maintain .

While the EC2 Fleet is being modified, it is in the modifying state.

To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet launches the additional Spot Instances according to the allocation strategy for the EC2 Fleet request. If the allocation strategy is lowest-price , the EC2 Fleet launches instances using the Spot Instance pool with the lowest price. If the allocation strategy is diversified , the EC2 Fleet distributes the instances across the Spot Instance pools. If the allocation strategy is capacity-optimized , EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

To scale down your EC2 Fleet, decrease its target capacity. First, the EC2 Fleet cancels any open requests that exceed the new target capacity. You can request that the EC2 Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowest-price , the EC2 Fleet terminates the instances with the highest price per unit. If the allocation strategy is capacity-optimized , the EC2 Fleet terminates the instances in the Spot Instance pools that have the least available Spot Instance capacity. If the allocation strategy is diversified , the EC2 Fleet terminates instances across the Spot Instance pools. Alternatively, you can request that the EC2 Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

If you are finished with your EC2 Fleet for now, but will use it again later, you can set the target capacity to 0.

See also: AWS API Documentation

Request Syntax

response = client.modify_fleet(
    DryRun=True|False,
    ExcessCapacityTerminationPolicy='no-termination'|'termination',
    LaunchTemplateConfigs=[
        {
            'LaunchTemplateSpecification': {
                'LaunchTemplateId': 'string',
                'LaunchTemplateName': 'string',
                'Version': 'string'
            },
            'Overrides': [
                {
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'MaxPrice': 'string',
                    'SubnetId': 'string',
                    'AvailabilityZone': 'string',
                    'WeightedCapacity': 123.0,
                    'Priority': 123.0,
                    'Placement': {
                        'AvailabilityZone': 'string',
                        'Affinity': 'string',
                        'GroupName': 'string',
                        'PartitionNumber': 123,
                        'HostId': 'string',
                        'Tenancy': 'default'|'dedicated'|'host',
                        'SpreadDomain': 'string',
                        'HostResourceGroupArn': 'string'
                    },
                    'InstanceRequirements': {
                        'VCpuCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'MemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        },
                        'CpuManufacturers': [
                            'intel'|'amd'|'amazon-web-services',
                        ],
                        'MemoryGiBPerVCpu': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'ExcludedInstanceTypes': [
                            'string',
                        ],
                        'InstanceGenerations': [
                            'current'|'previous',
                        ],
                        'SpotMaxPricePercentageOverLowestPrice': 123,
                        'OnDemandMaxPricePercentageOverLowestPrice': 123,
                        'BareMetal': 'included'|'required'|'excluded',
                        'BurstablePerformance': 'included'|'required'|'excluded',
                        'RequireHibernateSupport': True|False,
                        'NetworkInterfaceCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'LocalStorage': 'included'|'required'|'excluded',
                        'LocalStorageTypes': [
                            'hdd'|'ssd',
                        ],
                        'TotalLocalStorageGB': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'BaselineEbsBandwidthMbps': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorTypes': [
                            'gpu'|'fpga'|'inference',
                        ],
                        'AcceleratorCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorManufacturers': [
                            'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                        ],
                        'AcceleratorNames': [
                            'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                        ],
                        'AcceleratorTotalMemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        }
                    }
                },
            ]
        },
    ],
    FleetId='string',
    TargetCapacitySpecification={
        'TotalTargetCapacity': 123,
        'OnDemandTargetCapacity': 123,
        'SpotTargetCapacity': 123,
        'DefaultTargetCapacityType': 'spot'|'on-demand',
        'TargetCapacityUnitType': 'vcpu'|'memory-mib'|'units'
    },
    Context='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ExcessCapacityTerminationPolicy (string) -- Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
  • LaunchTemplateConfigs (list) --

    The launch template and overrides.

    • (dict) --

      Describes a launch template and overrides.

      • LaunchTemplateSpecification (dict) --

        The launch template to use. You must specify either the launch template ID or launch template name in the request.

        • LaunchTemplateId (string) --

          The ID of the launch template.

          You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

        • LaunchTemplateName (string) --

          The name of the launch template.

          You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

        • Version (string) --

          The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

          If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

          If the value is $Default , Amazon EC2 uses the default version of the launch template.

      • Overrides (list) --

        Any parameters that you specify override the same parameters in the launch template.

        For fleets of type request and maintain , a maximum of 300 items is allowed across all launch templates.

        • (dict) --

          Describes overrides for a launch template.

          • InstanceType (string) --

            The instance type.

            Note

            If you specify InstanceTypes , you can't specify InstanceRequirements .

          • MaxPrice (string) --

            The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

          • SubnetId (string) --

            The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, subnet-1234abcdeexample1, subnet-0987cdef6example2 ). A request of type instant can have only one subnet ID.

          • AvailabilityZone (string) --

            The Availability Zone in which to launch the instances.

          • WeightedCapacity (float) --

            The number of units provided by the specified instance type.

          • Priority (float) --

            The priority for the launch template override. The highest priority is launched first.

            If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

            If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

            Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

          • Placement (dict) --

            The location where the instance launched, if applicable.

            • AvailabilityZone (string) --

              The Availability Zone of the instance.

              If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

              This parameter is not supported by CreateFleet .

            • Affinity (string) --

              The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet .

            • GroupName (string) --

              The name of the placement group the instance is in.

            • PartitionNumber (integer) --

              The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

              This parameter is not supported by CreateFleet .

            • HostId (string) --

              The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

              This parameter is not supported by CreateFleet .

            • 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.

              This parameter is not supported by CreateFleet .

              T3 instances that use the unlimited CPU credit option do not support host tenancy.

            • SpreadDomain (string) --

              Reserved for future use.

              This parameter is not supported by CreateFleet .

            • HostResourceGroupArn (string) --

              The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

              This parameter is not supported by CreateFleet .

          • InstanceRequirements (dict) --

            The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

            Note

            If you specify InstanceRequirements , you can't specify InstanceTypes .

            • VCpuCount (dict) -- [REQUIRED]

              The minimum and maximum number of vCPUs.

              • Min (integer) -- [REQUIRED]

                The minimum number of vCPUs. To specify no minimum limit, specify 0 .

              • Max (integer) --

                The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

            • MemoryMiB (dict) -- [REQUIRED]

              The minimum and maximum amount of memory, in MiB.

              • Min (integer) -- [REQUIRED]

                The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

              • Max (integer) --

                The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

            • CpuManufacturers (list) --

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel .
              • For instance types with AMD CPUs, specify amd .
              • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

              Note

              Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

              • (string) --
            • MemoryGiBPerVCpu (dict) --

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

              • Max (float) --

                The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

            • ExcludedInstanceTypes (list) --

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

              For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

              • (string) --
            • InstanceGenerations (list) --

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

              For current generation instance types, specify current .

              For previous generation instance types, specify previous .

              Default: Current and previous generation instance types

              • (string) --
            • SpotMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 20

            • BareMetal (string) --

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included .
              • To require only bare metal instance types, specify required .
              • To exclude bare metal instance types, specify excluded .

              Default: excluded

            • BurstablePerformance (string) --

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

              • To include burstable performance instance types, specify included .
              • To require only burstable performance instance types, specify required .
              • To exclude burstable performance instance types, specify excluded .

              Default: excluded

            • RequireHibernateSupport (boolean) --

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores .

              Default: false

            • NetworkInterfaceCount (dict) --

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

            • LocalStorage (string) --

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

              • To include instance types with instance store volumes, specify included .
              • To require only instance types with instance store volumes, specify required .
              • To exclude instance types with instance store volumes, specify excluded .

              Default: included

            • LocalStorageTypes (list) --

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd .
              • For instance types with solid state drive (SSD) storage, specify ssd .

              Default: hdd and ssd

              • (string) --
            • TotalLocalStorageGB (dict) --

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

              • Max (float) --

                The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

            • BaselineEbsBandwidthMbps (dict) --

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

            • AcceleratorTypes (list) --

              The accelerator types that must be on the instance type.

              • To include instance types with GPU hardware, specify gpu .
              • To include instance types with FPGA hardware, specify fpga .
              • To include instance types with inference hardware, specify inference .

              Default: Any accelerator type

              • (string) --
            • AcceleratorCount (dict) --

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0 .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of accelerators. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

            • AcceleratorManufacturers (list) --

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia .
              • For instance types with AMD devices, specify amd .
              • For instance types with Amazon Web Services devices, specify amazon-web-services .
              • For instance types with Xilinx devices, specify xilinx .

              Default: Any manufacturer

              • (string) --
            • AcceleratorNames (list) --

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100 .
              • For instance types with NVIDIA V100 GPUs, specify v100 .
              • For instance types with NVIDIA K80 GPUs, specify k80 .
              • For instance types with NVIDIA T4 GPUs, specify t4 .
              • For instance types with NVIDIA M60 GPUs, specify m60 .
              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
              • For instance types with Xilinx VU9P FPGAs, specify vu9p .

              Default: Any accelerator

              • (string) --
            • AcceleratorTotalMemoryMiB (dict) --

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

              • Max (integer) --

                The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

  • FleetId (string) --

    [REQUIRED]

    The ID of the EC2 Fleet.

  • TargetCapacitySpecification (dict) --

    The size of the EC2 Fleet.

    • TotalTargetCapacity (integer) -- [REQUIRED]

      The number of units to request, filled using DefaultTargetCapacityType .

    • OnDemandTargetCapacity (integer) --

      The number of On-Demand units to request.

    • SpotTargetCapacity (integer) --

      The number of Spot units to request.

    • DefaultTargetCapacityType (string) --

      The default TotalTargetCapacity , which is either Spot or On-Demand .

    • TargetCapacityUnitType (string) --

      The unit for the target capacity.

      Default: units (translates to number of instances)

  • Context (string) -- Reserved.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      If the request succeeds, the response returns true . If the request fails, no response is returned, and instead an error message is returned.

modify_fpga_image_attribute(**kwargs)

Modifies the specified attribute of the specified Amazon FPGA Image (AFI).

See also: AWS API Documentation

Request Syntax

response = client.modify_fpga_image_attribute(
    DryRun=True|False,
    FpgaImageId='string',
    Attribute='description'|'name'|'loadPermission'|'productCodes',
    OperationType='add'|'remove',
    UserIds=[
        'string',
    ],
    UserGroups=[
        'string',
    ],
    ProductCodes=[
        'string',
    ],
    LoadPermission={
        'Add': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ],
        'Remove': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ]
    },
    Description='string',
    Name='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FpgaImageId (string) --

    [REQUIRED]

    The ID of the AFI.

  • Attribute (string) -- The name of the attribute.
  • OperationType (string) -- The operation type.
  • UserIds (list) --

    The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission attribute.

    • (string) --
  • UserGroups (list) --

    The user groups. This parameter is valid only when modifying the loadPermission attribute.

    • (string) --
  • ProductCodes (list) --

    The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when modifying the productCodes attribute.

    • (string) --
  • LoadPermission (dict) --

    The load permission for the AFI.

    • Add (list) --

      The load permissions to add.

      • (dict) --

        Describes a load permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

    • Remove (list) --

      The load permissions to remove.

      • (dict) --

        Describes a load permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

  • Description (string) -- A description for the AFI.
  • Name (string) -- A name for the AFI.
Return type

dict

Returns

Response Syntax

{
    'FpgaImageAttribute': {
        'FpgaImageId': 'string',
        'Name': 'string',
        'Description': 'string',
        'LoadPermissions': [
            {
                'UserId': 'string',
                'Group': 'all'
            },
        ],
        'ProductCodes': [
            {
                'ProductCodeId': 'string',
                'ProductCodeType': 'devpay'|'marketplace'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • FpgaImageAttribute (dict) --

      Information about the attribute.

      • FpgaImageId (string) --

        The ID of the AFI.

      • Name (string) --

        The name of the AFI.

      • Description (string) --

        The description of the AFI.

      • LoadPermissions (list) --

        The load permissions.

        • (dict) --

          Describes a load permission.

          • UserId (string) --

            The Amazon Web Services account ID.

          • Group (string) --

            The name of the group.

      • ProductCodes (list) --

        The product codes.

        • (dict) --

          Describes a product code.

          • ProductCodeId (string) --

            The product code.

          • ProductCodeType (string) --

            The type of product code.

modify_hosts(**kwargs)

Modify the auto-placement setting of a Dedicated Host. When auto-placement is enabled, any instances that you launch with a tenancy of host but without a specific host ID are placed onto any available Dedicated Host in your account that has auto-placement enabled. When auto-placement is disabled, you need to provide a host ID to have the instance launch onto a specific host. If no host ID is provided, the instance is launched onto a suitable host with auto-placement enabled.

You can also use this API action to modify a Dedicated Host to support either multiple instance types in an instance family, or to support a specific instance type only.

See also: AWS API Documentation

Request Syntax

response = client.modify_hosts(
    AutoPlacement='on'|'off',
    HostIds=[
        'string',
    ],
    HostRecovery='on'|'off',
    InstanceType='string',
    InstanceFamily='string'
)
Parameters
  • AutoPlacement (string) -- Specify whether to enable or disable auto-placement.
  • HostIds (list) --

    [REQUIRED]

    The IDs of the Dedicated Hosts to modify.

    • (string) --
  • HostRecovery (string) -- Indicates whether to enable or disable host recovery for the Dedicated Host. For more information, see Host recovery in the Amazon EC2 User Guide .
  • InstanceType (string) --

    Specifies the instance type to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support only a specific instance type.

    If you want to modify a Dedicated Host to support multiple instance types in its current instance family, omit this parameter and specify InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in the same request.

  • InstanceFamily (string) --

    Specifies the instance family to be supported by the Dedicated Host. Specify this parameter to modify a Dedicated Host to support multiple instance types within its current instance family.

    If you want to modify a Dedicated Host to support a specific instance type only, omit this parameter and specify InstanceType instead. You cannot specify InstanceFamily and InstanceType in the same request.

Return type

dict

Returns

Response Syntax

{
    'Successful': [
        'string',
    ],
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Successful (list) --

      The IDs of the Dedicated Hosts that were successfully modified.

      • (string) --
    • Unsuccessful (list) --

      The IDs of the Dedicated Hosts that could not be modified. Check whether the setting you requested can be used.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

modify_id_format(**kwargs)

Modifies the ID format for the specified resource on a per-Region basis. You can specify that resources should receive longer IDs (17-character IDs) when they are created.

This request can only be used to modify longer ID settings for resource types that are within the opt-in period. Resources currently in their opt-in period include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

This setting applies to the IAM user who makes the request; it does not apply to the entire Amazon Web Services account. By default, an IAM user defaults to the same settings as the root user. If you're using this action as the root user, then these settings apply to the entire account, unless an IAM user explicitly overrides these settings for themselves. For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide .

Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

See also: AWS API Documentation

Request Syntax

response = client.modify_id_format(
    Resource='string',
    UseLongIds=True|False
)
Parameters
  • Resource (string) --

    [REQUIRED]

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

    Alternatively, use the all-current option to include all resource types that are currently within their opt-in period for longer IDs.

  • UseLongIds (boolean) --

    [REQUIRED]

    Indicate whether the resource should use longer IDs (17-character IDs).

Returns

None

modify_identity_id_format(**kwargs)

Modifies the ID format of a resource for a specified IAM user, IAM role, or the root user for an account; or all IAM users, IAM roles, and the root user for an account. You can specify that resources should receive longer IDs (17-character IDs) when they are created.

This request can only be used to modify longer ID settings for resource types that are within the opt-in period. Resources currently in their opt-in period include: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

For more information, see Resource IDs in the Amazon Elastic Compute Cloud User Guide .

This setting applies to the principal specified in the request; it does not apply to the principal that makes the request.

Resources created with longer IDs are visible to all IAM roles and users, regardless of these settings and provided that they have permission to use the relevant Describe command for the resource type.

See also: AWS API Documentation

Request Syntax

response = client.modify_identity_id_format(
    PrincipalArn='string',
    Resource='string',
    UseLongIds=True|False
)
Parameters
  • PrincipalArn (string) --

    [REQUIRED]

    The ARN of the principal, which can be an IAM user, IAM role, or the root user. Specify all to modify the ID format for all IAM users, IAM roles, and the root user of the account.

  • Resource (string) --

    [REQUIRED]

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | route-table | route-table-association | security-group | subnet | subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway .

    Alternatively, use the all-current option to include all resource types that are currently within their opt-in period for longer IDs.

  • UseLongIds (boolean) --

    [REQUIRED]

    Indicates whether the resource should use longer IDs (17-character IDs)

Returns

None

modify_image_attribute(**kwargs)

Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time. You can use the Attribute parameter to specify the attribute or one of the following parameters: Description or LaunchPermission .

Images with an Amazon Web Services Marketplace product code cannot be made public.

To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance and create an AMI from the instance.

See also: AWS API Documentation

Request Syntax

response = client.modify_image_attribute(
    Attribute='string',
    Description={
        'Value': 'string'
    },
    ImageId='string',
    LaunchPermission={
        'Add': [
            {
                'Group': 'all',
                'UserId': 'string',
                'OrganizationArn': 'string',
                'OrganizationalUnitArn': 'string'
            },
        ],
        'Remove': [
            {
                'Group': 'all',
                'UserId': 'string',
                'OrganizationArn': 'string',
                'OrganizationalUnitArn': 'string'
            },
        ]
    },
    OperationType='add'|'remove',
    ProductCodes=[
        'string',
    ],
    UserGroups=[
        'string',
    ],
    UserIds=[
        'string',
    ],
    Value='string',
    DryRun=True|False,
    OrganizationArns=[
        'string',
    ],
    OrganizationalUnitArns=[
        'string',
    ]
)
Parameters
  • Attribute (string) --

    The name of the attribute to modify.

    Valid values: description | launchPermission

  • Description (dict) --

    A new description for the AMI.

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI.

  • LaunchPermission (dict) --

    A new launch permission for the AMI.

    • Add (list) --

      The Amazon Web Services account ID, organization ARN, or OU ARN to add to the list of launch permissions for the AMI.

      • (dict) --

        Describes a launch permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn (string) --

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn (string) --

          The Amazon Resource Name (ARN) of an organizational unit (OU).

    • Remove (list) --

      The Amazon Web Services account ID, organization ARN, or OU ARN to remove from the list of launch permissions for the AMI.

      • (dict) --

        Describes a launch permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn (string) --

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn (string) --

          The Amazon Resource Name (ARN) of an organizational unit (OU).

  • OperationType (string) -- The operation type. This parameter can be used only when the Attribute parameter is launchPermission .
  • ProductCodes (list) --

    Not supported.

    • (string) --
  • UserGroups (list) --

    The user groups. This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
  • UserIds (list) --

    The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
  • Value (string) -- The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • OrganizationArns (list) --

    The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
  • OrganizationalUnitArns (list) --

    The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
Returns

None

Examples

This example makes the specified AMI public.

response = client.modify_image_attribute(
    ImageId='ami-5731123e',
    LaunchPermission={
        'Add': [
            {
                'Group': 'all',
            },
        ],
    },
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example grants launch permissions for the specified AMI to the specified AWS account.

response = client.modify_image_attribute(
    ImageId='ami-5731123e',
    LaunchPermission={
        'Add': [
            {
                'UserId': '123456789012',
            },
        ],
    },
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_instance_attribute(**kwargs)

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

Note: Using this action to change the security groups associated with an elastic network interface (ENI) attached to an instance in a VPC can result in an error if the instance has more than one ENI. To change the security groups associated with an ENI attached to an instance that has multiple ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action.

To modify some attributes, the instance must be stopped. For more information, see Modify a stopped instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_attribute(
    SourceDestCheck={
        'Value': True|False
    },
    Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop',
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'VolumeId': 'string'
            },
            'NoDevice': 'string',
            'VirtualName': 'string'
        },
    ],
    DisableApiTermination={
        'Value': True|False
    },
    DryRun=True|False,
    EbsOptimized={
        'Value': True|False
    },
    EnaSupport={
        'Value': True|False
    },
    Groups=[
        'string',
    ],
    InstanceId='string',
    InstanceInitiatedShutdownBehavior={
        'Value': 'string'
    },
    InstanceType={
        'Value': 'string'
    },
    Kernel={
        'Value': 'string'
    },
    Ramdisk={
        'Value': 'string'
    },
    SriovNetSupport={
        'Value': 'string'
    },
    UserData={
        'Value': b'bytes'
    },
    Value='string',
    DisableApiStop={
        'Value': True|False
    }
)
Parameters
  • SourceDestCheck (dict) --

    Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • Attribute (string) -- The name of the attribute.
  • BlockDeviceMappings (list) --

    Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination , the default is true and the volume is deleted when the instance is terminated.

    To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Update the block device mapping when launching an instance in the Amazon EC2 User Guide .

    • (dict) --

      Describes a block device mapping entry.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the volume is deleted on instance termination.

        • VolumeId (string) --

          The ID of the EBS volume.

      • NoDevice (string) --

        suppress the specified device included in the block device mapping.

      • VirtualName (string) --

        The virtual device name.

  • DisableApiTermination (dict) --

    If the value is true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EbsOptimized (dict) --

    Specifies whether the instance is optimized for Amazon 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.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • EnaSupport (dict) --

    Set to true to enable enhanced networking with ENA for the instance.

    This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • Groups (list) --

    [EC2-VPC] Replaces the security groups of the instance with the specified security groups. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

    • (string) --
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • InstanceInitiatedShutdownBehavior (dict) --

    Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • InstanceType (dict) --

    Changes the instance type to the specified value. For more information, see Instance types in the Amazon EC2 User Guide . If the instance type is not valid, the error returned is InvalidInstanceAttributeValue .

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • Kernel (dict) --

    Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • Ramdisk (dict) --

    Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • SriovNetSupport (dict) --

    Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.

    There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.

    This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • UserData (dict) --

    Changes the instance's user data to the specified value. If you are using an Amazon Web Services SDK or command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text.

    • Value (bytes) --
  • Value (string) -- A new value for the attribute. Use only with the kernel , ramdisk , userData , disableApiTermination , or instanceInitiatedShutdownBehavior attribute.
  • DisableApiStop (dict) --

    Indicates whether an instance is enabled for stop protection. For more information, see Stop Protection .

    • Value (boolean) --

      The attribute value. The valid values are true or false .

Returns

None

Examples

This example modifies the instance type of the specified stopped instance.

response = client.modify_instance_attribute(
    InstanceId='i-1234567890abcdef0',
    InstanceType={
        'Value': 'm5.large',
    },
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example enables enhanced networking for the specified stopped instance.

response = client.modify_instance_attribute(
    EnaSupport={
        'Value': True,
    },
    InstanceId='i-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_instance_capacity_reservation_attributes(**kwargs)

Modifies the Capacity Reservation settings for a stopped instance. Use this action to configure an instance to target a specific Capacity Reservation, run in any open Capacity Reservation with matching attributes, or run On-Demand Instance capacity.

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_capacity_reservation_attributes(
    InstanceId='string',
    CapacityReservationSpecification={
        'CapacityReservationPreference': 'open'|'none',
        'CapacityReservationTarget': {
            'CapacityReservationId': 'string',
            'CapacityReservationResourceGroupArn': 'string'
        }
    },
    DryRun=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance to be modified.

  • CapacityReservationSpecification (dict) --

    [REQUIRED]

    Information about the Capacity Reservation targeting option.

    • CapacityReservationPreference (string) --

      Indicates the instance's Capacity Reservation preferences. Possible preferences include:

      • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
      • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.
    • CapacityReservationTarget (dict) --

      Information about the target Capacity Reservation or Capacity Reservation group.

      • CapacityReservationId (string) --

        The ID of the Capacity Reservation in which to run the instance.

      • CapacityReservationResourceGroupArn (string) --

        The ARN of the Capacity Reservation resource group in which to run the instance.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_instance_credit_specification(**kwargs)

Modifies the credit option for CPU usage on a running or stopped burstable performance instance. The credit options are standard and unlimited .

For more information, see Burstable performance instances in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_credit_specification(
    DryRun=True|False,
    ClientToken='string',
    InstanceCreditSpecifications=[
        {
            'InstanceId': 'string',
            'CpuCredits': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) -- A unique, case-sensitive token that you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency .
  • InstanceCreditSpecifications (list) --

    [REQUIRED]

    Information about the credit option for CPU usage.

    • (dict) --

      Describes the credit option for CPU usage of a burstable performance instance.

      • InstanceId (string) --

        The ID of the instance.

      • CpuCredits (string) --

        The credit option for CPU usage of the instance.

        Valid values: standard | unlimited

        T3 instances with host tenancy do not support the unlimited CPU credit option.

Return type

dict

Returns

Response Syntax

{
    'SuccessfulInstanceCreditSpecifications': [
        {
            'InstanceId': 'string'
        },
    ],
    'UnsuccessfulInstanceCreditSpecifications': [
        {
            'InstanceId': 'string',
            'Error': {
                'Code': 'InvalidInstanceID.Malformed'|'InvalidInstanceID.NotFound'|'IncorrectInstanceState'|'InstanceCreditSpecification.NotSupported',
                'Message': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • SuccessfulInstanceCreditSpecifications (list) --

      Information about the instances whose credit option for CPU usage was successfully modified.

      • (dict) --

        Describes the burstable performance instance whose credit option for CPU usage was successfully modified.

        • InstanceId (string) --

          The ID of the instance.

    • UnsuccessfulInstanceCreditSpecifications (list) --

      Information about the instances whose credit option for CPU usage was not modified.

      • (dict) --

        Describes the burstable performance instance whose credit option for CPU usage was not modified.

        • InstanceId (string) --

          The ID of the instance.

        • Error (dict) --

          The applicable error for the burstable performance instance whose credit option for CPU usage was not modified.

          • Code (string) --

            The error code.

          • Message (string) --

            The applicable error message.

modify_instance_event_start_time(**kwargs)

Modifies the start time for a scheduled Amazon EC2 instance event.

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_event_start_time(
    DryRun=True|False,
    InstanceId='string',
    InstanceEventId='string',
    NotBefore=datetime(2015, 1, 1)
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance with the scheduled event.

  • InstanceEventId (string) --

    [REQUIRED]

    The ID of the event whose date and time you are modifying.

  • NotBefore (datetime) --

    [REQUIRED]

    The new date and time when the event will take place.

Return type

dict

Returns

Response Syntax

{
    'Event': {
        'InstanceEventId': 'string',
        'Code': 'instance-reboot'|'system-reboot'|'system-maintenance'|'instance-retirement'|'instance-stop',
        'Description': 'string',
        'NotAfter': datetime(2015, 1, 1),
        'NotBefore': datetime(2015, 1, 1),
        'NotBeforeDeadline': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • Event (dict) --

      Describes a scheduled event for an instance.

      • InstanceEventId (string) --

        The ID of the event.

      • Code (string) --

        The event code.

      • Description (string) --

        A description of the event.

        After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].

      • NotAfter (datetime) --

        The latest scheduled end time for the event.

      • NotBefore (datetime) --

        The earliest scheduled start time for the event.

      • NotBeforeDeadline (datetime) --

        The deadline for starting the event.

modify_instance_event_window(**kwargs)

Modifies the specified event window.

You can define either a set of time ranges or a cron expression when modifying the event window, but not both.

To modify the targets associated with the event window, use the AssociateInstanceEventWindow and DisassociateInstanceEventWindow API.

If Amazon Web Services has already scheduled an event, modifying an event window won't change the time of the scheduled event.

For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_event_window(
    DryRun=True|False,
    Name='string',
    InstanceEventWindowId='string',
    TimeRanges=[
        {
            'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
            'StartHour': 123,
            'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
            'EndHour': 123
        },
    ],
    CronExpression='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Name (string) -- The name of the event window.
  • InstanceEventWindowId (string) --

    [REQUIRED]

    The ID of the event window.

  • TimeRanges (list) --

    The time ranges of the event window.

    • (dict) --

      The start day and time and the end day and time of the time range, in UTC.

      • StartWeekDay (string) --

        The day on which the time range begins.

      • StartHour (integer) --

        The hour when the time range begins.

      • EndWeekDay (string) --

        The day on which the time range ends.

      • EndHour (integer) --

        The hour when the time range ends.

  • CronExpression (string) --

    The cron expression of the event window, for example, * 0-4,20-23 * * 1,5 .

    Constraints:

    • Only hour and day of the week values are supported.
    • For day of the week values, you can specify either integers 0 through 6 , or alternative single values SUN through SAT .
    • The minute, month, and year must be specified by * .
    • The hour value must be one or a multiple range, for example, 0-4 or 0-4,20-23 .
    • Each hour range must be >= 2 hours, for example, 0-2 or 20-23 .
    • The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.

    For more information about cron expressions, see cron on the Wikipedia website .

Return type

dict

Returns

Response Syntax

{
    'InstanceEventWindow': {
        'InstanceEventWindowId': 'string',
        'TimeRanges': [
            {
                'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'StartHour': 123,
                'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                'EndHour': 123
            },
        ],
        'Name': 'string',
        'CronExpression': 'string',
        'AssociationTarget': {
            'InstanceIds': [
                'string',
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'DedicatedHostIds': [
                'string',
            ]
        },
        'State': 'creating'|'deleting'|'active'|'deleted',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • InstanceEventWindow (dict) --

      Information about the event window.

      • InstanceEventWindowId (string) --

        The ID of the event window.

      • TimeRanges (list) --

        One or more time ranges defined for the event window.

        • (dict) --

          The start day and time and the end day and time of the time range, in UTC.

          • StartWeekDay (string) --

            The day on which the time range begins.

          • StartHour (integer) --

            The hour when the time range begins.

          • EndWeekDay (string) --

            The day on which the time range ends.

          • EndHour (integer) --

            The hour when the time range ends.

      • Name (string) --

        The name of the event window.

      • CronExpression (string) --

        The cron expression defined for the event window.

      • AssociationTarget (dict) --

        One or more targets associated with the event window.

        • InstanceIds (list) --

          The IDs of the instances associated with the event window.

          • (string) --
        • Tags (list) --

          The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • DedicatedHostIds (list) --

          The IDs of the Dedicated Hosts associated with the event window.

          • (string) --
      • State (string) --

        The current state of the event window.

      • Tags (list) --

        The instance tags associated with the event window.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

modify_instance_maintenance_options(**kwargs)

Modifies the recovery behavior of your instance to disable simplified automatic recovery or set the recovery behavior to default. The default configuration will not enable simplified automatic recovery for an unsupported instance type. For more information, see Simplified automatic recovery .

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_maintenance_options(
    InstanceId='string',
    AutoRecovery='disabled'|'default',
    DryRun=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • AutoRecovery (string) -- Disables the automatic recovery behavior of your instance or sets it to default.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InstanceId': 'string',
    'AutoRecovery': 'disabled'|'default'
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The ID of the instance.

    • AutoRecovery (string) --

      Provides information on the current automatic recovery behavior of your instance.

modify_instance_metadata_options(**kwargs)

Modify the instance metadata parameters on a running or stopped instance. When you modify the parameters on a stopped instance, they are applied when the instance is started. When you modify the parameters on a running instance, the API responds with a state of “pending”. After the parameter modifications are successfully applied to the instance, the state of the modifications changes from “pending” to “applied” in subsequent describe-instances API calls. For more information, see Instance metadata and user data in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_metadata_options(
    InstanceId='string',
    HttpTokens='optional'|'required',
    HttpPutResponseHopLimit=123,
    HttpEndpoint='disabled'|'enabled',
    DryRun=True|False,
    HttpProtocolIpv6='disabled'|'enabled',
    InstanceMetadataTags='disabled'|'enabled'
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • HttpTokens (string) --

    The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional .

    If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

    If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

  • HttpPutResponseHopLimit (integer) --

    The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. If no parameter is specified, the existing state is maintained.

    Possible values: Integers from 1 to 64

  • HttpEndpoint (string) --

    Enables or disables the HTTP metadata endpoint on your instances. If this parameter is not specified, the existing state is maintained.

    If you specify a value of disabled , you cannot access your instance metadata.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • HttpProtocolIpv6 (string) -- Enables or disables the IPv6 endpoint for the instance metadata service. This setting applies only if you have enabled the HTTP metadata endpoint.
  • InstanceMetadataTags (string) --

    Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

    Default: disabled

Return type

dict

Returns

Response Syntax

{
    'InstanceId': 'string',
    'InstanceMetadataOptions': {
        'State': 'pending'|'applied',
        'HttpTokens': 'optional'|'required',
        'HttpPutResponseHopLimit': 123,
        'HttpEndpoint': 'disabled'|'enabled',
        'HttpProtocolIpv6': 'disabled'|'enabled',
        'InstanceMetadataTags': 'disabled'|'enabled'
    }
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The ID of the instance.

    • InstanceMetadataOptions (dict) --

      The metadata options for the instance.

      • State (string) --

        The state of the metadata option changes.

        pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

        applied - The metadata options have been successfully applied on the instance.

      • HttpTokens (string) --

        The state of token usage for your instance metadata requests.

        If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

        If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

        Default: optional

      • HttpPutResponseHopLimit (integer) --

        The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

        Default: 1

        Possible values: Integers from 1 to 64

      • HttpEndpoint (string) --

        Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

        If the value is disabled , you cannot access your instance metadata.

      • HttpProtocolIpv6 (string) --

        Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

      • InstanceMetadataTags (string) --

        Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see Work with instance tags using the instance metadata .

modify_instance_placement(**kwargs)

Modifies the placement attributes for a specified instance. You can do the following:

  • Modify the affinity between an instance and a Dedicated Host . When affinity is set to host and the instance is not associated with a specific Dedicated Host, the next time the instance is launched, it is automatically associated with the host on which it lands. If the instance is restarted or rebooted, this relationship persists.
  • Change the Dedicated Host with which an instance is associated.
  • Change the instance tenancy of an instance.
  • Move an instance to or from a placement group .

At least one attribute for affinity, host ID, tenancy, or placement group name must be specified in the request. Affinity and tenancy can be modified in the same request.

To modify the host ID, tenancy, placement group, or partition for an instance, the instance must be in the stopped state.

See also: AWS API Documentation

Request Syntax

response = client.modify_instance_placement(
    Affinity='default'|'host',
    GroupName='string',
    HostId='string',
    InstanceId='string',
    Tenancy='dedicated'|'host',
    PartitionNumber=123,
    HostResourceGroupArn='string'
)
Parameters
  • Affinity (string) -- The affinity setting for the instance.
  • GroupName (string) --

    The name of the placement group in which to place the instance. For spread placement groups, the instance must have a tenancy of default . For cluster and partition placement groups, the instance must have a tenancy of default or dedicated .

    To remove an instance from a placement group, specify an empty string ("").

  • HostId (string) -- The ID of the Dedicated Host with which to associate the instance.
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance that you are modifying.

  • Tenancy (string) --

    The tenancy for the instance.

    Note

    For T3 instances, you can't change the tenancy from dedicated to host , or from host to dedicated . Attempting to make one of these unsupported tenancy changes results in the InvalidTenancy error code.

  • PartitionNumber (integer) -- The number of the partition in which to place the instance. Valid only if the placement group strategy is set to partition .
  • HostResourceGroupArn (string) -- The ARN of the host resource group in which to place the instance.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Is true if the request succeeds, and an error otherwise.

modify_ipam(**kwargs)

Modify the configurations of an IPAM.

See also: AWS API Documentation

Request Syntax

response = client.modify_ipam(
    DryRun=True|False,
    IpamId='string',
    Description='string',
    AddOperatingRegions=[
        {
            'RegionName': 'string'
        },
    ],
    RemoveOperatingRegions=[
        {
            'RegionName': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamId (string) --

    [REQUIRED]

    The ID of the IPAM you want to modify.

  • Description (string) -- The description of the IPAM you want to modify.
  • AddOperatingRegions (list) --

    Choose the operating Regions for the IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

    For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

    • (dict) --

      Add an operating Region to an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

      For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

      • RegionName (string) --

        The name of the operating Region.

  • RemoveOperatingRegions (list) --

    The operating Regions to remove.

    • (dict) --

      Remove an operating Region from an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

      For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide

      • RegionName (string) --

        The name of the operating Region you want to remove.

Return type

dict

Returns

Response Syntax

{
    'Ipam': {
        'OwnerId': 'string',
        'IpamId': 'string',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'PublicDefaultScopeId': 'string',
        'PrivateDefaultScopeId': 'string',
        'ScopeCount': 123,
        'Description': 'string',
        'OperatingRegions': [
            {
                'RegionName': 'string'
            },
        ],
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Ipam (dict) --

      The results of the modification.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the IPAM.

      • IpamId (string) --

        The ID of the IPAM.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM.

      • PublicDefaultScopeId (string) --

        The ID of the IPAM's default public scope.

      • PrivateDefaultScopeId (string) --

        The ID of the IPAM's default private scope.

      • ScopeCount (integer) --

        The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

      • Description (string) --

        The description for the IPAM.

      • OperatingRegions (list) --

        The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

        For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

        • (dict) --

          The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

          For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

          • RegionName (string) --

            The name of the operating Region.

      • State (string) --

        The state of the IPAM.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

modify_ipam_pool(**kwargs)

Modify the configurations of an IPAM pool.

For more information, see Modify a pool in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_ipam_pool(
    DryRun=True|False,
    IpamPoolId='string',
    Description='string',
    AutoImport=True|False,
    AllocationMinNetmaskLength=123,
    AllocationMaxNetmaskLength=123,
    AllocationDefaultNetmaskLength=123,
    ClearAllocationDefaultNetmaskLength=True|False,
    AddAllocationResourceTags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    RemoveAllocationResourceTags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool you want to modify.

  • Description (string) -- The description of the IPAM pool you want to modify.
  • AutoImport (boolean) --

    If true, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

    A locale must be set on the pool for this feature to work.

  • AllocationMinNetmaskLength (integer) -- The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128. The minimum netmask length must be less than the maximum netmask length.
  • AllocationMaxNetmaskLength (integer) -- The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.The maximum netmask length must be greater than the minimum netmask length.
  • AllocationDefaultNetmaskLength (integer) -- The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.
  • ClearAllocationDefaultNetmaskLength (boolean) -- Clear the default netmask length allocation rule for this pool.
  • AddAllocationResourceTags (list) --

    Add tag allocation rules to a pool. For more information about allocation rules, see Create a top-level pool in the Amazon VPC IPAM User Guide .

    • (dict) --

      A tag on an IPAM resource.

      • Key (string) --

        The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Value (string) --

        The value for the tag.

  • RemoveAllocationResourceTags (list) --

    Remove tag allocation rules from a pool.

    • (dict) --

      A tag on an IPAM resource.

      • Key (string) --

        The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

      • Value (string) --

        The value for the tag.

Return type

dict

Returns

Response Syntax

{
    'IpamPool': {
        'OwnerId': 'string',
        'IpamPoolId': 'string',
        'SourceIpamPoolId': 'string',
        'IpamPoolArn': 'string',
        'IpamScopeArn': 'string',
        'IpamScopeType': 'public'|'private',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'Locale': 'string',
        'PoolDepth': 123,
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'StateMessage': 'string',
        'Description': 'string',
        'AutoImport': True|False,
        'PubliclyAdvertisable': True|False,
        'AddressFamily': 'ipv4'|'ipv6',
        'AllocationMinNetmaskLength': 123,
        'AllocationMaxNetmaskLength': 123,
        'AllocationDefaultNetmaskLength': 123,
        'AllocationResourceTags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'AwsService': 'ec2'
    }
}

Response Structure

  • (dict) --

    • IpamPool (dict) --

      The results of the modification.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the IPAM pool.

      • IpamPoolId (string) --

        The ID of the IPAM pool.

      • SourceIpamPoolId (string) --

        The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.

      • IpamPoolArn (string) --

        The ARN of the IPAM pool.

      • IpamScopeArn (string) --

        The ARN of the scope of the IPAM pool.

      • IpamScopeType (string) --

        In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM pool.

      • Locale (string) --

        The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.

      • PoolDepth (integer) --

        The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

      • State (string) --

        The state of the IPAM pool.

      • StateMessage (string) --

        A message related to the failed creation of an IPAM pool.

      • Description (string) --

        The description of the IPAM pool.

      • AutoImport (boolean) --

        If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

        A locale must be set on the pool for this feature to work.

      • PubliclyAdvertisable (boolean) --

        Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to ipv4 .

      • AddressFamily (string) --

        The address family of the pool.

      • AllocationMinNetmaskLength (integer) --

        The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

      • AllocationMaxNetmaskLength (integer) --

        The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

      • AllocationDefaultNetmaskLength (integer) --

        The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.

      • AllocationResourceTags (list) --

        Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.

        • (dict) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • Key (string) --

            The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

          • Value (string) --

            The value of the tag.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

      • AwsService (string) --

        Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.

modify_ipam_resource_cidr(**kwargs)

Modify a resource CIDR. You can use this action to transfer resource CIDRs between scopes and ignore resource CIDRs that you do not want to manage. If set to false, the resource will not be tracked for overlap, it cannot be auto-imported into a pool, and it will be removed from any pool it has an allocation in.

For more information, see Move resource CIDRs between scopes and Change the monitoring state of resource CIDRs in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_ipam_resource_cidr(
    DryRun=True|False,
    ResourceId='string',
    ResourceCidr='string',
    ResourceRegion='string',
    CurrentIpamScopeId='string',
    DestinationIpamScopeId='string',
    Monitored=True|False
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • ResourceId (string) --

    [REQUIRED]

    The ID of the resource you want to modify.

  • ResourceCidr (string) --

    [REQUIRED]

    The CIDR of the resource you want to modify.

  • ResourceRegion (string) --

    [REQUIRED]

    The Amazon Web Services Region of the resource you want to modify.

  • CurrentIpamScopeId (string) --

    [REQUIRED]

    The ID of the current scope that the resource CIDR is in.

  • DestinationIpamScopeId (string) -- The ID of the scope you want to transfer the resource CIDR to.
  • Monitored (boolean) --

    [REQUIRED]

    Determines if the resource is monitored by IPAM. If a resource is monitored, the resource is discovered by IPAM and you can view details about the resource’s CIDR.

Return type

dict

Returns

Response Syntax

{
    'IpamResourceCidr': {
        'IpamId': 'string',
        'IpamScopeId': 'string',
        'IpamPoolId': 'string',
        'ResourceRegion': 'string',
        'ResourceOwnerId': 'string',
        'ResourceId': 'string',
        'ResourceName': 'string',
        'ResourceCidr': 'string',
        'ResourceType': 'vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool',
        'ResourceTags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'IpUsage': 123.0,
        'ComplianceStatus': 'compliant'|'noncompliant'|'unmanaged'|'ignored',
        'ManagementState': 'managed'|'unmanaged'|'ignored',
        'OverlapStatus': 'overlapping'|'nonoverlapping'|'ignored',
        'VpcId': 'string'
    }
}

Response Structure

  • (dict) --

    • IpamResourceCidr (dict) --

      The CIDR for an IPAM resource.

      • IpamId (string) --

        The IPAM ID for an IPAM resource.

      • IpamScopeId (string) --

        The scope ID for an IPAM resource.

      • IpamPoolId (string) --

        The pool ID for an IPAM resource.

      • ResourceRegion (string) --

        The Amazon Web Services Region for an IPAM resource.

      • ResourceOwnerId (string) --

        The Amazon Web Services account number of the owner of an IPAM resource.

      • ResourceId (string) --

        The ID of an IPAM resource.

      • ResourceName (string) --

        The name of an IPAM resource.

      • ResourceCidr (string) --

        The CIDR for an IPAM resource.

      • ResourceType (string) --

        The type of IPAM resource.

      • ResourceTags (list) --

        The tags for an IPAM resource.

        • (dict) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • Key (string) --

            The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

          • Value (string) --

            The value of the tag.

      • IpUsage (float) --

        The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:

        • For a resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs.
        • For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated.
        • For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs).
      • ComplianceStatus (string) --

        The compliance status of the IPAM resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

      • ManagementState (string) --

        The management state of the resource. For more information about management states, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

      • OverlapStatus (string) --

        The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

      • VpcId (string) --

        The ID of a VPC.

modify_ipam_scope(**kwargs)

Modify an IPAM scope.

See also: AWS API Documentation

Request Syntax

response = client.modify_ipam_scope(
    DryRun=True|False,
    IpamScopeId='string',
    Description='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamScopeId (string) --

    [REQUIRED]

    The ID of the scope you want to modify.

  • Description (string) -- The description of the scope you want to modify.
Return type

dict

Returns

Response Syntax

{
    'IpamScope': {
        'OwnerId': 'string',
        'IpamScopeId': 'string',
        'IpamScopeArn': 'string',
        'IpamArn': 'string',
        'IpamRegion': 'string',
        'IpamScopeType': 'public'|'private',
        'IsDefault': True|False,
        'Description': 'string',
        'PoolCount': 123,
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • IpamScope (dict) --

      The results of the modification.

      • OwnerId (string) --

        The Amazon Web Services account ID of the owner of the scope.

      • IpamScopeId (string) --

        The ID of the scope.

      • IpamScopeArn (string) --

        The ARN of the scope.

      • IpamArn (string) --

        The ARN of the IPAM.

      • IpamRegion (string) --

        The Amazon Web Services Region of the IPAM scope.

      • IpamScopeType (string) --

        The type of the scope.

      • IsDefault (boolean) --

        Defines if the scope is the default scope or not.

      • Description (string) --

        The description of the scope.

      • PoolCount (integer) --

        The number of pools in the scope.

      • State (string) --

        The state of the IPAM scope.

      • Tags (list) --

        The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

modify_launch_template(**kwargs)

Modifies a launch template. You can specify which version of the launch template to set as the default version. When launching an instance, the default version applies when a launch template version is not specified.

See also: AWS API Documentation

Request Syntax

response = client.modify_launch_template(
    DryRun=True|False,
    ClientToken='string',
    LaunchTemplateId='string',
    LaunchTemplateName='string',
    DefaultVersion='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency .

    Constraint: Maximum 128 ASCII characters.

  • LaunchTemplateId (string) --

    The ID of the launch template.

    You must specify either the LaunchTemplateId or the LaunchTemplateName , but not both.

  • LaunchTemplateName (string) --

    The name of the launch template.

    You must specify either the LaunchTemplateName or the LaunchTemplateId , but not both.

  • DefaultVersion (string) -- The version number of the launch template to set as the default version.
Return type

dict

Returns

Response Syntax

{
    'LaunchTemplate': {
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'CreateTime': datetime(2015, 1, 1),
        'CreatedBy': 'string',
        'DefaultVersionNumber': 123,
        'LatestVersionNumber': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • LaunchTemplate (dict) --

      Information about the launch template.

      • LaunchTemplateId (string) --

        The ID of the launch template.

      • LaunchTemplateName (string) --

        The name of the launch template.

      • CreateTime (datetime) --

        The time launch template was created.

      • CreatedBy (string) --

        The principal that created the launch template.

      • DefaultVersionNumber (integer) --

        The version number of the default version of the launch template.

      • LatestVersionNumber (integer) --

        The version number of the latest version of the launch template.

      • Tags (list) --

        The tags for the launch template.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Examples

This example specifies version 2 as the default version of the specified launch template.

response = client.modify_launch_template(
    DefaultVersion='2',
    LaunchTemplateId='lt-0abcd290751193123',
)

print(response)

Expected Output:

{
    'LaunchTemplate': {
        'CreateTime': datetime(2017, 12, 1, 13, 35, 46, 4, 335, 0),
        'CreatedBy': 'arn:aws:iam::123456789012:root',
        'DefaultVersionNumber': 2,
        'LatestVersionNumber': 2,
        'LaunchTemplateId': 'lt-0abcd290751193123',
        'LaunchTemplateName': 'WebServers',
    },
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_managed_prefix_list(**kwargs)

Modifies the specified managed prefix list.

Adding or removing entries in a prefix list creates a new version of the prefix list. Changing the name of the prefix list does not affect the version.

If you specify a current version number that does not match the true current version number, the request fails.

See also: AWS API Documentation

Request Syntax

response = client.modify_managed_prefix_list(
    DryRun=True|False,
    PrefixListId='string',
    CurrentVersion=123,
    PrefixListName='string',
    AddEntries=[
        {
            'Cidr': 'string',
            'Description': 'string'
        },
    ],
    RemoveEntries=[
        {
            'Cidr': 'string'
        },
    ],
    MaxEntries=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • CurrentVersion (integer) -- The current version of the prefix list.
  • PrefixListName (string) -- A name for the prefix list.
  • AddEntries (list) --

    One or more entries to add to the prefix list.

    • (dict) --

      An entry for a prefix list.

      • Cidr (string) -- [REQUIRED]

        The CIDR block.

      • Description (string) --

        A description for the entry.

        Constraints: Up to 255 characters in length.

  • RemoveEntries (list) --

    One or more entries to remove from the prefix list.

    • (dict) --

      An entry for a prefix list.

      • Cidr (string) -- [REQUIRED]

        The CIDR block.

  • MaxEntries (integer) --

    The maximum number of entries for the prefix list. You cannot modify the entries of a prefix list and modify the size of a prefix list at the same time.

    If any of the resources that reference the prefix list cannot support the new maximum size, the modify operation fails. Check the state message for the IDs of the first ten resources that do not support the new maximum size.

Return type

dict

Returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The current state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

      • OwnerId (string) --

        The ID of the owner of the prefix list.

modify_network_interface_attribute(**kwargs)

Modifies the specified network interface attribute. You can specify only one attribute at a time. You can use this action to attach and detach security groups from an existing EC2 instance.

See also: AWS API Documentation

Request Syntax

response = client.modify_network_interface_attribute(
    Attachment={
        'AttachmentId': 'string',
        'DeleteOnTermination': True|False
    },
    Description={
        'Value': 'string'
    },
    DryRun=True|False,
    Groups=[
        'string',
    ],
    NetworkInterfaceId='string',
    SourceDestCheck={
        'Value': True|False
    }
)
Parameters
  • Attachment (dict) --

    Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.

    • AttachmentId (string) --

      The ID of the network interface attachment.

    • DeleteOnTermination (boolean) --

      Indicates whether the network interface is deleted when the instance is terminated.

  • Description (dict) --

    A description for the network interface.

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

    • (string) --
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

  • SourceDestCheck (dict) --

    Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

Returns

None

Examples

This example modifies the attachment attribute of the specified network interface.

response = client.modify_network_interface_attribute(
    Attachment={
        'AttachmentId': 'eni-attach-43348162',
        'DeleteOnTermination': False,
    },
    NetworkInterfaceId='eni-686ea200',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example modifies the description attribute of the specified network interface.

response = client.modify_network_interface_attribute(
    Description={
        'Value': 'My description',
    },
    NetworkInterfaceId='eni-686ea200',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example command modifies the groupSet attribute of the specified network interface.

response = client.modify_network_interface_attribute(
    Groups=[
        'sg-903004f8',
        'sg-1a2b3c4d',
    ],
    NetworkInterfaceId='eni-686ea200',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example command modifies the sourceDestCheck attribute of the specified network interface.

response = client.modify_network_interface_attribute(
    NetworkInterfaceId='eni-686ea200',
    SourceDestCheck={
        'Value': False,
    },
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_private_dns_name_options(**kwargs)

Modifies the options for instance hostnames for the specified instance.

See also: AWS API Documentation

Request Syntax

response = client.modify_private_dns_name_options(
    DryRun=True|False,
    InstanceId='string',
    PrivateDnsHostnameType='ip-name'|'resource-name',
    EnableResourceNameDnsARecord=True|False,
    EnableResourceNameDnsAAAARecord=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) -- The ID of the instance.
  • PrivateDnsHostnameType (string) -- The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.
  • EnableResourceNameDnsARecord (boolean) -- Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
  • EnableResourceNameDnsAAAARecord (boolean) -- Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_reserved_instances(**kwargs)

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 EC2 User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_reserved_instances(
    ReservedInstancesIds=[
        'string',
    ],
    ClientToken='string',
    TargetConfigurations=[
        {
            'AvailabilityZone': 'string',
            'InstanceCount': 123,
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'Platform': 'string',
            'Scope': 'Availability Zone'|'Region'
        },
    ]
)
Parameters
  • ReservedInstancesIds (list) --

    [REQUIRED]

    The IDs of the Reserved Instances to modify.

    • (string) --
  • ClientToken (string) -- A unique, case-sensitive token you provide to ensure idempotency of your modification request. For more information, see Ensuring Idempotency .
  • TargetConfigurations (list) --

    [REQUIRED]

    The configuration settings for the Reserved Instances to modify.

    • (dict) --

      Describes the configuration settings for the modified Reserved Instances.

      Note

      We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

      • AvailabilityZone (string) --

        The Availability Zone for the modified Reserved Instances.

      • InstanceCount (integer) --

        The number of modified Reserved Instances.

        Note

        This is a required field for a request.

      • InstanceType (string) --

        The instance type for the modified Reserved Instances.

      • Platform (string) --

        The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

      • Scope (string) --

        Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.

Return type

dict

Returns

Response Syntax

{
    'ReservedInstancesModificationId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of ModifyReservedInstances.

    • ReservedInstancesModificationId (string) --

      The ID for the modification.

modify_security_group_rules(**kwargs)

Modifies the rules of a security group.

See also: AWS API Documentation

Request Syntax

response = client.modify_security_group_rules(
    GroupId='string',
    SecurityGroupRules=[
        {
            'SecurityGroupRuleId': 'string',
            'SecurityGroupRule': {
                'IpProtocol': 'string',
                'FromPort': 123,
                'ToPort': 123,
                'CidrIpv4': 'string',
                'CidrIpv6': 'string',
                'PrefixListId': 'string',
                'ReferencedGroupId': 'string',
                'Description': 'string'
            }
        },
    ],
    DryRun=True|False
)
Parameters
  • GroupId (string) --

    [REQUIRED]

    The ID of the security group.

  • SecurityGroupRules (list) --

    [REQUIRED]

    Information about the security group properties to update.

    • (dict) --

      Describes an update to a security group rule.

      • SecurityGroupRuleId (string) --

        The ID of the security group rule.

      • SecurityGroupRule (dict) --

        Information about the security group rule.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          Use -1 to specify all protocols.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 (string) --

          The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix length.

        • CidrIpv6 (string) --

          The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix length.

        • PrefixListId (string) --

          The ID of the prefix list.

        • ReferencedGroupId (string) --

          The ID of the security group that is referenced in the security group rule.

        • Description (string) --

          The description of the security group rule.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

modify_snapshot_attribute(**kwargs)

Adds or removes permission settings for the specified snapshot. You may add or remove specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single operation. If you need to both add and remove account IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.

Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.

For more information about modifying snapshot permissions, see Share a snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_snapshot_attribute(
    Attribute='productCodes'|'createVolumePermission',
    CreateVolumePermission={
        'Add': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ],
        'Remove': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ]
    },
    GroupNames=[
        'string',
    ],
    OperationType='add'|'remove',
    SnapshotId='string',
    UserIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Attribute (string) -- The snapshot attribute to modify. Only volume creation permissions can be modified.
  • CreateVolumePermission (dict) --

    A JSON representation of the snapshot attribute modification.

    • Add (list) --

      Adds the specified Amazon Web Services account ID or group to the list.

      • (dict) --

        Describes the user or group to be added or removed from the list of create volume permissions for a volume.

        • Group (string) --

          The group to be added or removed. The possible value is all .

        • UserId (string) --

          The ID of the Amazon Web Services account to be added or removed.

    • Remove (list) --

      Removes the specified Amazon Web Services account ID or group from the list.

      • (dict) --

        Describes the user or group to be added or removed from the list of create volume permissions for a volume.

        • Group (string) --

          The group to be added or removed. The possible value is all .

        • UserId (string) --

          The ID of the Amazon Web Services account to be added or removed.

  • GroupNames (list) --

    The group to modify for the snapshot.

    • (string) --
  • OperationType (string) -- The type of operation to perform to the attribute.
  • SnapshotId (string) --

    [REQUIRED]

    The ID of the snapshot.

  • UserIds (list) --

    The account ID to modify for the snapshot.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example modifies snapshot snap-1234567890abcdef0 to remove the create volume permission for a user with the account ID 123456789012. If the command succeeds, no output is returned.

response = client.modify_snapshot_attribute(
    Attribute='createVolumePermission',
    OperationType='remove',
    SnapshotId='snap-1234567890abcdef0',
    UserIds=[
        '123456789012',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example makes the snapshot snap-1234567890abcdef0 public.

response = client.modify_snapshot_attribute(
    Attribute='createVolumePermission',
    GroupNames=[
        'all',
    ],
    OperationType='add',
    SnapshotId='snap-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_snapshot_tier(**kwargs)

Archives an Amazon EBS snapshot. When you archive a snapshot, it is converted to a full snapshot that includes all of the blocks of data that were written to the volume at the time the snapshot was created, and moved from the standard tier to the archive tier. For more information, see Archive Amazon EBS snapshots in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_snapshot_tier(
    SnapshotId='string',
    StorageTier='archive',
    DryRun=True|False
)
Parameters
  • SnapshotId (string) --

    [REQUIRED]

    The ID of the snapshot.

  • StorageTier (string) -- The name of the storage tier. You must specify archive .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'SnapshotId': 'string',
    'TieringStartTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • SnapshotId (string) --

      The ID of the snapshot.

    • TieringStartTime (datetime) --

      The date and time when the archive process was started.

modify_spot_fleet_request(**kwargs)

Modifies the specified Spot Fleet request.

You can only modify a Spot Fleet request of type maintain .

While the Spot Fleet request is being modified, it is in the modifying state.

To scale up your Spot Fleet, increase its target capacity. The Spot Fleet launches the additional Spot Instances according to the allocation strategy for the Spot Fleet request. If the allocation strategy is lowestPrice , the Spot Fleet launches instances using the Spot Instance pool with the lowest price. If the allocation strategy is diversified , the Spot Fleet distributes the instances across the Spot Instance pools. If the allocation strategy is capacityOptimized , Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching.

To scale down your Spot Fleet, decrease its target capacity. First, the Spot Fleet cancels any open requests that exceed the new target capacity. You can request that the Spot Fleet terminate Spot Instances until the size of the fleet no longer exceeds the new target capacity. If the allocation strategy is lowestPrice , the Spot Fleet terminates the instances with the highest price per unit. If the allocation strategy is capacityOptimized , the Spot Fleet terminates the instances in the Spot Instance pools that have the least available Spot Instance capacity. If the allocation strategy is diversified , the Spot Fleet terminates instances across the Spot Instance pools. Alternatively, you can request that the Spot Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

If you are finished with your Spot Fleet for now, but will use it again later, you can set the target capacity to 0.

See also: AWS API Documentation

Request Syntax

response = client.modify_spot_fleet_request(
    ExcessCapacityTerminationPolicy='noTermination'|'default',
    LaunchTemplateConfigs=[
        {
            'LaunchTemplateSpecification': {
                'LaunchTemplateId': 'string',
                'LaunchTemplateName': 'string',
                'Version': 'string'
            },
            'Overrides': [
                {
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'SpotPrice': 'string',
                    'SubnetId': 'string',
                    'AvailabilityZone': 'string',
                    'WeightedCapacity': 123.0,
                    'Priority': 123.0,
                    'InstanceRequirements': {
                        'VCpuCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'MemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        },
                        'CpuManufacturers': [
                            'intel'|'amd'|'amazon-web-services',
                        ],
                        'MemoryGiBPerVCpu': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'ExcludedInstanceTypes': [
                            'string',
                        ],
                        'InstanceGenerations': [
                            'current'|'previous',
                        ],
                        'SpotMaxPricePercentageOverLowestPrice': 123,
                        'OnDemandMaxPricePercentageOverLowestPrice': 123,
                        'BareMetal': 'included'|'required'|'excluded',
                        'BurstablePerformance': 'included'|'required'|'excluded',
                        'RequireHibernateSupport': True|False,
                        'NetworkInterfaceCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'LocalStorage': 'included'|'required'|'excluded',
                        'LocalStorageTypes': [
                            'hdd'|'ssd',
                        ],
                        'TotalLocalStorageGB': {
                            'Min': 123.0,
                            'Max': 123.0
                        },
                        'BaselineEbsBandwidthMbps': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorTypes': [
                            'gpu'|'fpga'|'inference',
                        ],
                        'AcceleratorCount': {
                            'Min': 123,
                            'Max': 123
                        },
                        'AcceleratorManufacturers': [
                            'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                        ],
                        'AcceleratorNames': [
                            'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                        ],
                        'AcceleratorTotalMemoryMiB': {
                            'Min': 123,
                            'Max': 123
                        }
                    }
                },
            ]
        },
    ],
    SpotFleetRequestId='string',
    TargetCapacity=123,
    OnDemandTargetCapacity=123,
    Context='string'
)
Parameters
  • 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.
  • LaunchTemplateConfigs (list) --

    The launch template and overrides. You can only use this parameter if you specified a launch template (LaunchTemplateConfigs ) in your Spot Fleet request. If you specified LaunchSpecifications in your Spot Fleet request, then omit this parameter.

    • (dict) --

      Describes a launch template and overrides.

      • LaunchTemplateSpecification (dict) --

        The launch template.

        • LaunchTemplateId (string) --

          The ID of the launch template.

          You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

        • LaunchTemplateName (string) --

          The name of the launch template.

          You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

        • Version (string) --

          The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

          If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

          If the value is $Default , Amazon EC2 uses the default version of the launch template.

      • Overrides (list) --

        Any parameters that you specify override the same parameters in the launch template.

        • (dict) --

          Describes overrides for a launch template.

          • InstanceType (string) --

            The instance type.

          • SpotPrice (string) --

            The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

          • SubnetId (string) --

            The ID of the subnet in which to launch the instances.

          • AvailabilityZone (string) --

            The Availability Zone in which to launch the instances.

          • WeightedCapacity (float) --

            The number of units provided by the specified instance type.

          • Priority (float) --

            The priority for the launch template override. The highest priority is launched first.

            If OnDemandAllocationStrategy is set to prioritized , Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

            If the Spot AllocationStrategy is set to capacityOptimizedPrioritized , Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

            Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

          • InstanceRequirements (dict) --

            The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.

            Note

            If you specify InstanceRequirements , you can't specify InstanceTypes .

            • VCpuCount (dict) --

              The minimum and maximum number of vCPUs.

              • Min (integer) --

                The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

              • Max (integer) --

                The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

            • MemoryMiB (dict) --

              The minimum and maximum amount of memory, in MiB.

              • Min (integer) --

                The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • CpuManufacturers (list) --

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel .
              • For instance types with AMD CPUs, specify amd .
              • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

              Note

              Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

              • (string) --
            • MemoryGiBPerVCpu (dict) --

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

              • Max (float) --

                The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

            • ExcludedInstanceTypes (list) --

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

              For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

              • (string) --
            • InstanceGenerations (list) --

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

              For current generation instance types, specify current .

              For previous generation instance types, specify previous .

              Default: Current and previous generation instance types

              • (string) --
            • SpotMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 20

            • BareMetal (string) --

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included .
              • To require only bare metal instance types, specify required .
              • To exclude bare metal instance types, specify excluded .

              Default: excluded

            • BurstablePerformance (string) --

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

              • To include burstable performance instance types, specify included .
              • To require only burstable performance instance types, specify required .
              • To exclude burstable performance instance types, specify excluded .

              Default: excluded

            • RequireHibernateSupport (boolean) --

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores .

              Default: false

            • NetworkInterfaceCount (dict) --

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

            • LocalStorage (string) --

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

              • To include instance types with instance store volumes, specify included .
              • To require only instance types with instance store volumes, specify required .
              • To exclude instance types with instance store volumes, specify excluded .

              Default: included

            • LocalStorageTypes (list) --

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd .
              • For instance types with solid state drive (SSD) storage, specify ssd .

              Default: hdd and ssd

              • (string) --
            • TotalLocalStorageGB (dict) --

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

              • Max (float) --

                The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

            • BaselineEbsBandwidthMbps (dict) --

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

            • AcceleratorTypes (list) --

              The accelerator types that must be on the instance type.

              • For instance types with GPU accelerators, specify gpu .
              • For instance types with FPGA accelerators, specify fpga .
              • For instance types with inference accelerators, specify inference .

              Default: Any accelerator type

              • (string) --
            • AcceleratorCount (dict) --

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0 .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

            • AcceleratorManufacturers (list) --

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia .
              • For instance types with AMD devices, specify amd .
              • For instance types with Amazon Web Services devices, specify amazon-web-services .
              • For instance types with Xilinx devices, specify xilinx .

              Default: Any manufacturer

              • (string) --
            • AcceleratorNames (list) --

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100 .
              • For instance types with NVIDIA V100 GPUs, specify v100 .
              • For instance types with NVIDIA K80 GPUs, specify k80 .
              • For instance types with NVIDIA T4 GPUs, specify t4 .
              • For instance types with NVIDIA M60 GPUs, specify m60 .
              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
              • For instance types with Xilinx VU9P FPGAs, specify vu9p .

              Default: Any accelerator

              • (string) --
            • AcceleratorTotalMemoryMiB (dict) --

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

  • SpotFleetRequestId (string) --

    [REQUIRED]

    The ID of the Spot Fleet request.

  • TargetCapacity (integer) -- The size of the fleet.
  • OnDemandTargetCapacity (integer) -- The number of On-Demand Instances in the fleet.
  • Context (string) -- Reserved.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    Contains the output of ModifySpotFleetRequest.

    • Return (boolean) --

      If the request succeeds, the response returns true . If the request fails, no response is returned, and instead an error message is returned.

Examples

This example increases the target capacity of the specified Spot fleet request.

response = client.modify_spot_fleet_request(
    SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    TargetCapacity=20,
)

print(response)

Expected Output:

{
    'Return': True,
    'ResponseMetadata': {
        '...': '...',
    },
}

This example decreases the target capacity of the specified Spot fleet request without terminating any Spot Instances as a result.

response = client.modify_spot_fleet_request(
    ExcessCapacityTerminationPolicy='NoTermination ',
    SpotFleetRequestId='sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    TargetCapacity=10,
)

print(response)

Expected Output:

{
    'Return': True,
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_subnet_attribute(**kwargs)

Modifies a subnet attribute. You can only modify one attribute at a time.

Use this action to modify subnets on Amazon Web Services Outposts.

  • To modify a subnet on an Outpost rack, set both MapCustomerOwnedIpOnLaunch and CustomerOwnedIpv4Pool . These two parameters act as a single attribute.
  • To modify a subnet on an Outpost server, set either EnableLniAtDeviceIndex or DisableLniAtDeviceIndex .

For more information about Amazon Web Services Outposts, see the following:

See also: AWS API Documentation

Request Syntax

response = client.modify_subnet_attribute(
    AssignIpv6AddressOnCreation={
        'Value': True|False
    },
    MapPublicIpOnLaunch={
        'Value': True|False
    },
    SubnetId='string',
    MapCustomerOwnedIpOnLaunch={
        'Value': True|False
    },
    CustomerOwnedIpv4Pool='string',
    EnableDns64={
        'Value': True|False
    },
    PrivateDnsHostnameTypeOnLaunch='ip-name'|'resource-name',
    EnableResourceNameDnsARecordOnLaunch={
        'Value': True|False
    },
    EnableResourceNameDnsAAAARecordOnLaunch={
        'Value': True|False
    },
    EnableLniAtDeviceIndex=123,
    DisableLniAtDeviceIndex={
        'Value': True|False
    }
)
Parameters
  • AssignIpv6AddressOnCreation (dict) --

    Specify true to indicate that network interfaces created in the specified subnet should be assigned an IPv6 address. This includes a network interface that's created when launching an instance into the subnet (the instance therefore receives an IPv6 address).

    If you enable the IPv6 addressing feature for your subnet, your network interface or instance only receives an IPv6 address if it's created using version 2016-11-15 or later of the Amazon EC2 API.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • MapPublicIpOnLaunch (dict) --

    Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a public IPv4 address.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • SubnetId (string) --

    [REQUIRED]

    The ID of the subnet.

  • MapCustomerOwnedIpOnLaunch (dict) --

    Specify true to indicate that network interfaces attached to instances created in the specified subnet should be assigned a customer-owned IPv4 address.

    When this value is true , you must specify the customer-owned IP pool using CustomerOwnedIpv4Pool .

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • CustomerOwnedIpv4Pool (string) --

    The customer-owned IPv4 address pool associated with the subnet.

    You must set this value when you specify true for MapCustomerOwnedIpOnLaunch .

  • EnableDns64 (dict) --

    Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • PrivateDnsHostnameTypeOnLaunch (string) -- The type of hostname to assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 and IPv6) subnets, an instance DNS name can be based on the instance IPv4 address (ip-name) or the instance ID (resource-name). For IPv6 only subnets, an instance DNS name must be based on the instance ID (resource-name).
  • EnableResourceNameDnsARecordOnLaunch (dict) --

    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • EnableResourceNameDnsAAAARecordOnLaunch (dict) --

    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • EnableLniAtDeviceIndex (integer) -- Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1). A local network interface cannot be the primary network interface (eth0).
  • DisableLniAtDeviceIndex (dict) --

    Specify true to indicate that local network interfaces at the current position should be disabled.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

Returns

None

Examples

This example modifies the specified subnet so that all instances launched into this subnet are assigned a public IP address.

response = client.modify_subnet_attribute(
    MapPublicIpOnLaunch={
        'Value': True,
    },
    SubnetId='subnet-1a2b3c4d',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_traffic_mirror_filter_network_services(**kwargs)

Allows or restricts mirroring network services.

By default, Amazon DNS network services are not eligible for Traffic Mirror. Use AddNetworkServices to add network services to a Traffic Mirror filter. When a network service is added to the Traffic Mirror filter, all traffic related to that network service will be mirrored. When you no longer want to mirror network services, use RemoveNetworkServices to remove the network services from the Traffic Mirror filter.

See also: AWS API Documentation

Request Syntax

response = client.modify_traffic_mirror_filter_network_services(
    TrafficMirrorFilterId='string',
    AddNetworkServices=[
        'amazon-dns',
    ],
    RemoveNetworkServices=[
        'amazon-dns',
    ],
    DryRun=True|False
)
Parameters
  • TrafficMirrorFilterId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror filter.

  • AddNetworkServices (list) --

    The network service, for example Amazon DNS, that you want to mirror.

    • (string) --
  • RemoveNetworkServices (list) --

    The network service, for example Amazon DNS, that you no longer want to mirror.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilter': {
        'TrafficMirrorFilterId': 'string',
        'IngressFilterRules': [
            {
                'TrafficMirrorFilterRuleId': 'string',
                'TrafficMirrorFilterId': 'string',
                'TrafficDirection': 'ingress'|'egress',
                'RuleNumber': 123,
                'RuleAction': 'accept'|'reject',
                'Protocol': 123,
                'DestinationPortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'SourcePortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'DestinationCidrBlock': 'string',
                'SourceCidrBlock': 'string',
                'Description': 'string'
            },
        ],
        'EgressFilterRules': [
            {
                'TrafficMirrorFilterRuleId': 'string',
                'TrafficMirrorFilterId': 'string',
                'TrafficDirection': 'ingress'|'egress',
                'RuleNumber': 123,
                'RuleAction': 'accept'|'reject',
                'Protocol': 123,
                'DestinationPortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'SourcePortRange': {
                    'FromPort': 123,
                    'ToPort': 123
                },
                'DestinationCidrBlock': 'string',
                'SourceCidrBlock': 'string',
                'Description': 'string'
            },
        ],
        'NetworkServices': [
            'amazon-dns',
        ],
        'Description': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TrafficMirrorFilter (dict) --

      The Traffic Mirror filter that the network service is associated with.

      • TrafficMirrorFilterId (string) --

        The ID of the Traffic Mirror filter.

      • IngressFilterRules (list) --

        Information about the ingress rules that are associated with the Traffic Mirror filter.

        • (dict) --

          Describes the Traffic Mirror rule.

          • TrafficMirrorFilterRuleId (string) --

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId (string) --

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection (string) --

            The traffic direction assigned to the Traffic Mirror rule.

          • RuleNumber (integer) --

            The rule number of the Traffic Mirror rule.

          • RuleAction (string) --

            The action assigned to the Traffic Mirror rule.

          • Protocol (integer) --

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange (dict) --

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange (dict) --

            The source port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock (string) --

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock (string) --

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description (string) --

            The description of the Traffic Mirror rule.

      • EgressFilterRules (list) --

        Information about the egress rules that are associated with the Traffic Mirror filter.

        • (dict) --

          Describes the Traffic Mirror rule.

          • TrafficMirrorFilterRuleId (string) --

            The ID of the Traffic Mirror rule.

          • TrafficMirrorFilterId (string) --

            The ID of the Traffic Mirror filter that the rule is associated with.

          • TrafficDirection (string) --

            The traffic direction assigned to the Traffic Mirror rule.

          • RuleNumber (integer) --

            The rule number of the Traffic Mirror rule.

          • RuleAction (string) --

            The action assigned to the Traffic Mirror rule.

          • Protocol (integer) --

            The protocol assigned to the Traffic Mirror rule.

          • DestinationPortRange (dict) --

            The destination port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • SourcePortRange (dict) --

            The source port range assigned to the Traffic Mirror rule.

            • FromPort (integer) --

              The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • ToPort (integer) --

              The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

          • DestinationCidrBlock (string) --

            The destination CIDR block assigned to the Traffic Mirror rule.

          • SourceCidrBlock (string) --

            The source CIDR block assigned to the Traffic Mirror rule.

          • Description (string) --

            The description of the Traffic Mirror rule.

      • NetworkServices (list) --

        The network service traffic that is associated with the Traffic Mirror filter.

        • (string) --
      • Description (string) --

        The description of the Traffic Mirror filter.

      • Tags (list) --

        The tags assigned to the Traffic Mirror filter.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

modify_traffic_mirror_filter_rule(**kwargs)

Modifies the specified Traffic Mirror rule.

DestinationCidrBlock and SourceCidrBlock must both be an IPv4 range or an IPv6 range.

See also: AWS API Documentation

Request Syntax

response = client.modify_traffic_mirror_filter_rule(
    TrafficMirrorFilterRuleId='string',
    TrafficDirection='ingress'|'egress',
    RuleNumber=123,
    RuleAction='accept'|'reject',
    DestinationPortRange={
        'FromPort': 123,
        'ToPort': 123
    },
    SourcePortRange={
        'FromPort': 123,
        'ToPort': 123
    },
    Protocol=123,
    DestinationCidrBlock='string',
    SourceCidrBlock='string',
    Description='string',
    RemoveFields=[
        'destination-port-range'|'source-port-range'|'protocol'|'description',
    ],
    DryRun=True|False
)
Parameters
  • TrafficMirrorFilterRuleId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror rule.

  • TrafficDirection (string) -- The type of traffic to assign to the rule.
  • RuleNumber (integer) -- The number of the Traffic Mirror rule. This number must be unique for each Traffic Mirror rule in a given direction. The rules are processed in ascending order by rule number.
  • RuleAction (string) -- The action to assign to the rule.
  • DestinationPortRange (dict) --

    The destination ports that are associated with the Traffic Mirror rule.

    • FromPort (integer) --

      The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • ToPort (integer) --

      The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

  • SourcePortRange (dict) --

    The port range to assign to the Traffic Mirror rule.

    • FromPort (integer) --

      The first port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

    • ToPort (integer) --

      The last port in the Traffic Mirror port range. This applies to the TCP and UDP protocols.

  • Protocol (integer) -- The protocol, for example TCP, to assign to the Traffic Mirror rule.
  • DestinationCidrBlock (string) -- The destination CIDR block to assign to the Traffic Mirror rule.
  • SourceCidrBlock (string) -- The source CIDR block to assign to the Traffic Mirror rule.
  • Description (string) -- The description to assign to the Traffic Mirror rule.
  • RemoveFields (list) --

    The properties that you want to remove from the Traffic Mirror filter rule.

    When you remove a property from a Traffic Mirror filter rule, the property is set to the default.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilterRule': {
        'TrafficMirrorFilterRuleId': 'string',
        'TrafficMirrorFilterId': 'string',
        'TrafficDirection': 'ingress'|'egress',
        'RuleNumber': 123,
        'RuleAction': 'accept'|'reject',
        'Protocol': 123,
        'DestinationPortRange': {
            'FromPort': 123,
            'ToPort': 123
        },
        'SourcePortRange': {
            'FromPort': 123,
            'ToPort': 123
        },
        'DestinationCidrBlock': 'string',
        'SourceCidrBlock': 'string',
        'Description': 'string'
    }
}

Response Structure

  • (dict) --

    • TrafficMirrorFilterRule (dict) --

      Modifies a Traffic Mirror rule.

      • TrafficMirrorFilterRuleId (string) --

        The ID of the Traffic Mirror rule.

      • TrafficMirrorFilterId (string) --

        The ID of the Traffic Mirror filter that the rule is associated with.

      • TrafficDirection (string) --

        The traffic direction assigned to the Traffic Mirror rule.

      • RuleNumber (integer) --

        The rule number of the Traffic Mirror rule.

      • RuleAction (string) --

        The action assigned to the Traffic Mirror rule.

      • Protocol (integer) --

        The protocol assigned to the Traffic Mirror rule.

      • DestinationPortRange (dict) --

        The destination port range assigned to the Traffic Mirror rule.

        • FromPort (integer) --

          The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • ToPort (integer) --

          The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • SourcePortRange (dict) --

        The source port range assigned to the Traffic Mirror rule.

        • FromPort (integer) --

          The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

        • ToPort (integer) --

          The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

      • DestinationCidrBlock (string) --

        The destination CIDR block assigned to the Traffic Mirror rule.

      • SourceCidrBlock (string) --

        The source CIDR block assigned to the Traffic Mirror rule.

      • Description (string) --

        The description of the Traffic Mirror rule.

modify_traffic_mirror_session(**kwargs)

Modifies a Traffic Mirror session.

See also: AWS API Documentation

Request Syntax

response = client.modify_traffic_mirror_session(
    TrafficMirrorSessionId='string',
    TrafficMirrorTargetId='string',
    TrafficMirrorFilterId='string',
    PacketLength=123,
    SessionNumber=123,
    VirtualNetworkId=123,
    Description='string',
    RemoveFields=[
        'packet-length'|'description'|'virtual-network-id',
    ],
    DryRun=True|False
)
Parameters
  • TrafficMirrorSessionId (string) --

    [REQUIRED]

    The ID of the Traffic Mirror session.

  • TrafficMirrorTargetId (string) -- The Traffic Mirror target. The target must be in the same VPC as the source, or have a VPC peering connection with the source.
  • TrafficMirrorFilterId (string) -- The ID of the Traffic Mirror filter.
  • PacketLength (integer) -- The number of bytes in each packet to mirror. These are bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet.
  • SessionNumber (integer) --

    The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

    Valid values are 1-32766.

  • VirtualNetworkId (integer) -- The virtual network ID of the Traffic Mirror session.
  • Description (string) -- The description to assign to the Traffic Mirror session.
  • RemoveFields (list) --

    The properties that you want to remove from the Traffic Mirror session.

    When you remove a property from a Traffic Mirror session, the property is set to the default.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorSession': {
        'TrafficMirrorSessionId': 'string',
        'TrafficMirrorTargetId': 'string',
        'TrafficMirrorFilterId': 'string',
        'NetworkInterfaceId': 'string',
        'OwnerId': 'string',
        'PacketLength': 123,
        'SessionNumber': 123,
        'VirtualNetworkId': 123,
        'Description': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TrafficMirrorSession (dict) --

      Information about the Traffic Mirror session.

      • TrafficMirrorSessionId (string) --

        The ID for the Traffic Mirror session.

      • TrafficMirrorTargetId (string) --

        The ID of the Traffic Mirror target.

      • TrafficMirrorFilterId (string) --

        The ID of the Traffic Mirror filter.

      • NetworkInterfaceId (string) --

        The ID of the Traffic Mirror session's network interface.

      • OwnerId (string) --

        The ID of the account that owns the Traffic Mirror session.

      • PacketLength (integer) --

        The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet

      • SessionNumber (integer) --

        The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

        Valid values are 1-32766.

      • VirtualNetworkId (integer) --

        The virtual network ID associated with the Traffic Mirror session.

      • Description (string) --

        The description of the Traffic Mirror session.

      • Tags (list) --

        The tags assigned to the Traffic Mirror session.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

modify_transit_gateway(**kwargs)

Modifies the specified transit gateway. When you modify a transit gateway, the modified options are applied to new transit gateway attachments only. Your existing transit gateway attachments are not modified.

See also: AWS API Documentation

Request Syntax

response = client.modify_transit_gateway(
    TransitGatewayId='string',
    Description='string',
    Options={
        'AddTransitGatewayCidrBlocks': [
            'string',
        ],
        'RemoveTransitGatewayCidrBlocks': [
            'string',
        ],
        'VpnEcmpSupport': 'enable'|'disable',
        'DnsSupport': 'enable'|'disable',
        'AutoAcceptSharedAttachments': 'enable'|'disable',
        'DefaultRouteTableAssociation': 'enable'|'disable',
        'AssociationDefaultRouteTableId': 'string',
        'DefaultRouteTablePropagation': 'enable'|'disable',
        'PropagationDefaultRouteTableId': 'string',
        'AmazonSideAsn': 123
    },
    DryRun=True|False
)
Parameters
  • TransitGatewayId (string) --

    [REQUIRED]

    The ID of the transit gateway.

  • Description (string) -- The description for the transit gateway.
  • Options (dict) --

    The options to modify.

    • AddTransitGatewayCidrBlocks (list) --

      Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6.

      • (string) --
    • RemoveTransitGatewayCidrBlocks (list) --

      Removes CIDR blocks for the transit gateway.

      • (string) --
    • VpnEcmpSupport (string) --

      Enable or disable Equal Cost Multipath Protocol support.

    • DnsSupport (string) --

      Enable or disable DNS support.

    • AutoAcceptSharedAttachments (string) --

      Enable or disable automatic acceptance of attachment requests.

    • DefaultRouteTableAssociation (string) --

      Enable or disable automatic association with the default association route table.

    • AssociationDefaultRouteTableId (string) --

      The ID of the default association route table.

    • DefaultRouteTablePropagation (string) --

      Enable or disable automatic propagation of routes to the default propagation route table.

    • PropagationDefaultRouteTableId (string) --

      The ID of the default propagation route table.

    • AmazonSideAsn (integer) --

      A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGateway': {
        'TransitGatewayId': 'string',
        'TransitGatewayArn': 'string',
        'State': 'pending'|'available'|'modifying'|'deleting'|'deleted',
        'OwnerId': 'string',
        'Description': 'string',
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'AmazonSideAsn': 123,
            'TransitGatewayCidrBlocks': [
                'string',
            ],
            'AutoAcceptSharedAttachments': 'enable'|'disable',
            'DefaultRouteTableAssociation': 'enable'|'disable',
            'AssociationDefaultRouteTableId': 'string',
            'DefaultRouteTablePropagation': 'enable'|'disable',
            'PropagationDefaultRouteTableId': 'string',
            'VpnEcmpSupport': 'enable'|'disable',
            'DnsSupport': 'enable'|'disable',
            'MulticastSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGateway (dict) --

      Describes a transit gateway.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • TransitGatewayArn (string) --

        The Amazon Resource Name (ARN) of the transit gateway.

      • State (string) --

        The state of the transit gateway.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that owns the transit gateway.

      • Description (string) --

        The description of the transit gateway.

      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The transit gateway options.

        • AmazonSideAsn (integer) --

          A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

        • TransitGatewayCidrBlocks (list) --

          The transit gateway CIDR blocks.

          • (string) --
        • AutoAcceptSharedAttachments (string) --

          Indicates whether attachment requests are automatically accepted.

        • DefaultRouteTableAssociation (string) --

          Indicates whether resource attachments are automatically associated with the default association route table.

        • AssociationDefaultRouteTableId (string) --

          The ID of the default association route table.

        • DefaultRouteTablePropagation (string) --

          Indicates whether resource attachments automatically propagate routes to the default propagation route table.

        • PropagationDefaultRouteTableId (string) --

          The ID of the default propagation route table.

        • VpnEcmpSupport (string) --

          Indicates whether Equal Cost Multipath Protocol support is enabled.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • MulticastSupport (string) --

          Indicates whether multicast is enabled on the transit gateway

      • Tags (list) --

        The tags for the transit gateway.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

modify_transit_gateway_prefix_list_reference(**kwargs)

Modifies a reference (route) to a prefix list in a specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.modify_transit_gateway_prefix_list_reference(
    TransitGatewayRouteTableId='string',
    PrefixListId='string',
    TransitGatewayAttachmentId='string',
    Blackhole=True|False,
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment to which traffic is routed.
  • Blackhole (boolean) -- Indicates whether to drop traffic that matches this route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPrefixListReference': {
        'TransitGatewayRouteTableId': 'string',
        'PrefixListId': 'string',
        'PrefixListOwnerId': 'string',
        'State': 'pending'|'available'|'modifying'|'deleting',
        'Blackhole': True|False,
        'TransitGatewayAttachment': {
            'TransitGatewayAttachmentId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceId': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPrefixListReference (dict) --

      Information about the prefix list reference.

      • TransitGatewayRouteTableId (string) --

        The ID of the transit gateway route table.

      • PrefixListId (string) --

        The ID of the prefix list.

      • PrefixListOwnerId (string) --

        The ID of the prefix list owner.

      • State (string) --

        The state of the prefix list reference.

      • Blackhole (boolean) --

        Indicates whether traffic that matches this route is dropped.

      • TransitGatewayAttachment (dict) --

        Information about the transit gateway attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • ResourceType (string) --

          The resource type. Note that the tgw-peering resource type has been deprecated.

        • ResourceId (string) --

          The ID of the resource.

modify_transit_gateway_vpc_attachment(**kwargs)

Modifies the specified VPC attachment.

See also: AWS API Documentation

Request Syntax

response = client.modify_transit_gateway_vpc_attachment(
    TransitGatewayAttachmentId='string',
    AddSubnetIds=[
        'string',
    ],
    RemoveSubnetIds=[
        'string',
    ],
    Options={
        'DnsSupport': 'enable'|'disable',
        'Ipv6Support': 'enable'|'disable',
        'ApplianceModeSupport': 'enable'|'disable'
    },
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • AddSubnetIds (list) --

    The IDs of one or more subnets to add. You can specify at most one subnet per Availability Zone.

    • (string) --
  • RemoveSubnetIds (list) --

    The IDs of one or more subnets to remove.

    • (string) --
  • Options (dict) --

    The new VPC attachment options.

    • DnsSupport (string) --

      Enable or disable DNS support. The default is enable .

    • Ipv6Support (string) --

      Enable or disable IPv6 support. The default is enable .

    • ApplianceModeSupport (string) --

      Enable or disable support for appliance mode. If enabled, a traffic flow between a source and destination uses the same Availability Zone for the VPC attachment for the lifetime of that flow. The default is disable .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayVpcAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayId': 'string',
        'VpcId': 'string',
        'VpcOwnerId': 'string',
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'SubnetIds': [
            'string',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'DnsSupport': 'enable'|'disable',
            'Ipv6Support': 'enable'|'disable',
            'ApplianceModeSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayVpcAttachment (dict) --

      Information about the modified attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • VpcId (string) --

        The ID of the VPC.

      • VpcOwnerId (string) --

        The ID of the Amazon Web Services account that owns the VPC.

      • State (string) --

        The state of the VPC attachment. Note that the initiating state has been deprecated.

      • SubnetIds (list) --

        The IDs of the subnets.

        • (string) --
      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The VPC attachment options.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • Ipv6Support (string) --

          Indicates whether IPv6 support is disabled.

        • ApplianceModeSupport (string) --

          Indicates whether appliance mode support is enabled.

      • Tags (list) --

        The tags for the VPC attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

modify_volume(**kwargs)

You can modify several parameters of an existing EBS volume, including volume size, volume type, and IOPS capacity. If your EBS volume is attached to a current-generation EC2 instance type, you might be able to apply these changes without stopping the instance or detaching the volume from it. For more information about modifying EBS volumes, see Amazon EBS Elastic Volumes (Linux instances) or Amazon EBS Elastic Volumes (Windows instances).

When you complete a resize operation on your volume, you need to extend the volume's file-system size to take advantage of the new storage capacity. For more information, see Extend a Linux file system or Extend a Windows file system .

You can use CloudWatch Events to check the status of a modification to an EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch Events User Guide . You can also track the status of a modification using DescribeVolumesModifications . For information about tracking status changes using either method, see Monitor the progress of volume modifications .

With previous-generation instance types, resizing an EBS volume might require detaching and reattaching the volume or stopping and restarting the instance.

After modifying a volume, you must wait at least six hours and ensure that the volume is in the in-use or available state before you can modify the same volume. This is sometimes referred to as a cooldown period.

See also: AWS API Documentation

Request Syntax

response = client.modify_volume(
    DryRun=True|False,
    VolumeId='string',
    Size=123,
    VolumeType='standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
    Iops=123,
    Throughput=123,
    MultiAttachEnabled=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VolumeId (string) --

    [REQUIRED]

    The ID of the volume.

  • Size (integer) --

    The target size of the volume, in GiB. The target volume size must be greater than or equal to the existing size of the volume.

    The following are the supported volumes sizes for each volume type:

    • gp2 and gp3 : 1-16,384
    • io1 and io2 : 4-16,384
    • st1 and sc1 : 125-16,384
    • standard : 1-1,024

    Default: The existing size is retained.

  • VolumeType (string) --

    The target EBS volume type of the volume. For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide .

    Default: The existing type is retained.

  • Iops (integer) --

    The target IOPS rate of the volume. This parameter is valid only for gp3 , io1 , and io2 volumes.

    The following are the supported values for each volume type:

    • gp3 : 3,000-16,000 IOPS
    • io1 : 100-64,000 IOPS
    • io2 : 100-64,000 IOPS

    Default: The existing value is retained if you keep the same volume type. If you change the volume type to io1 , io2 , or gp3 , the default is 3,000.

  • Throughput (integer) --

    The target throughput of the volume, in MiB/s. This parameter is valid only for gp3 volumes. The maximum value is 1,000.

    Default: The existing value is retained if the source and target volume type is gp3 . Otherwise, the default value is 125.

    Valid Range: Minimum value of 125. Maximum value of 1000.

  • MultiAttachEnabled (boolean) -- Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 Nitro-based instances in the same Availability Zone. This parameter is supported with io1 and io2 volumes only. For more information, see Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User Guide .
Return type

dict

Returns

Response Syntax

{
    'VolumeModification': {
        'VolumeId': 'string',
        'ModificationState': 'modifying'|'optimizing'|'completed'|'failed',
        'StatusMessage': 'string',
        'TargetSize': 123,
        'TargetIops': 123,
        'TargetVolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
        'TargetThroughput': 123,
        'TargetMultiAttachEnabled': True|False,
        'OriginalSize': 123,
        'OriginalIops': 123,
        'OriginalVolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
        'OriginalThroughput': 123,
        'OriginalMultiAttachEnabled': True|False,
        'Progress': 123,
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • VolumeModification (dict) --

      Information about the volume modification.

      • VolumeId (string) --

        The ID of the volume.

      • ModificationState (string) --

        The current modification state. The modification state is null for unmodified volumes.

      • StatusMessage (string) --

        A status message about the modification progress or failure.

      • TargetSize (integer) --

        The target size of the volume, in GiB.

      • TargetIops (integer) --

        The target IOPS rate of the volume.

      • TargetVolumeType (string) --

        The target EBS volume type of the volume.

      • TargetThroughput (integer) --

        The target throughput of the volume, in MiB/s.

      • TargetMultiAttachEnabled (boolean) --

        The target setting for Amazon EBS Multi-Attach.

      • OriginalSize (integer) --

        The original size of the volume, in GiB.

      • OriginalIops (integer) --

        The original IOPS rate of the volume.

      • OriginalVolumeType (string) --

        The original EBS volume type of the volume.

      • OriginalThroughput (integer) --

        The original throughput of the volume, in MiB/s.

      • OriginalMultiAttachEnabled (boolean) --

        The original setting for Amazon EBS Multi-Attach.

      • Progress (integer) --

        The modification progress, from 0 to 100 percent complete.

      • StartTime (datetime) --

        The modification start time.

      • EndTime (datetime) --

        The modification completion or failure time.

modify_volume_attribute(**kwargs)

Modifies a volume attribute.

By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.

You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

See also: AWS API Documentation

Request Syntax

response = client.modify_volume_attribute(
    AutoEnableIO={
        'Value': True|False
    },
    VolumeId='string',
    DryRun=True|False
)
Parameters
  • AutoEnableIO (dict) --

    Indicates whether the volume should be auto-enabled for I/O operations.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • VolumeId (string) --

    [REQUIRED]

    The ID of the volume.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example sets the autoEnableIo attribute of the volume with the ID vol-1234567890abcdef0 to true. If the command succeeds, no output is returned.

response = client.modify_volume_attribute(
    AutoEnableIO={
        'Value': True,
    },
    DryRun=True,
    VolumeId='vol-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_vpc_attribute(**kwargs)

Modifies the specified attribute of the specified VPC.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_attribute(
    EnableDnsHostnames={
        'Value': True|False
    },
    EnableDnsSupport={
        'Value': True|False
    },
    VpcId='string'
)
Parameters
  • EnableDnsHostnames (dict) --

    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.

    You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • EnableDnsSupport (dict) --

    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.

    You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Returns

None

Examples

This example modifies the enableDnsSupport attribute. This attribute indicates whether DNS resolution is enabled for the VPC. If this attribute is true, the Amazon DNS server resolves DNS hostnames for instances in the VPC to their corresponding IP addresses; otherwise, it does not.

response = client.modify_vpc_attribute(
    EnableDnsSupport={
        'Value': False,
    },
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example modifies the enableDnsHostnames attribute. This attribute indicates whether instances launched in the VPC get DNS hostnames. If this attribute is true, instances in the VPC get DNS hostnames; otherwise, they do not.

response = client.modify_vpc_attribute(
    EnableDnsHostnames={
        'Value': False,
    },
    VpcId='vpc-a01106c2',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
modify_vpc_endpoint(**kwargs)

Modifies attributes of a specified VPC endpoint. The attributes that you can modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load Balancer). For more information, see the Amazon Web Services PrivateLink Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_endpoint(
    DryRun=True|False,
    VpcEndpointId='string',
    ResetPolicy=True|False,
    PolicyDocument='string',
    AddRouteTableIds=[
        'string',
    ],
    RemoveRouteTableIds=[
        'string',
    ],
    AddSubnetIds=[
        'string',
    ],
    RemoveSubnetIds=[
        'string',
    ],
    AddSecurityGroupIds=[
        'string',
    ],
    RemoveSecurityGroupIds=[
        'string',
    ],
    IpAddressType='ipv4'|'dualstack'|'ipv6',
    DnsOptions={
        'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined'
    },
    PrivateDnsEnabled=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointId (string) --

    [REQUIRED]

    The ID of the endpoint.

  • ResetPolicy (boolean) -- (Gateway endpoint) Specify true to reset the policy document to the default policy. The default policy allows full access to the service.
  • PolicyDocument (string) -- (Interface and gateway endpoints) A policy to attach to the endpoint that controls access to the service. The policy must be in valid JSON format.
  • AddRouteTableIds (list) --

    (Gateway endpoint) One or more route tables IDs to associate with the endpoint.

    • (string) --
  • RemoveRouteTableIds (list) --

    (Gateway endpoint) One or more route table IDs to disassociate from the endpoint.

    • (string) --
  • AddSubnetIds (list) --

    (Interface and Gateway Load Balancer endpoints) One or more subnet IDs in which to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.

    • (string) --
  • RemoveSubnetIds (list) --

    (Interface endpoint) One or more subnets IDs in which to remove the endpoint.

    • (string) --
  • AddSecurityGroupIds (list) --

    (Interface endpoint) One or more security group IDs to associate with the network interface.

    • (string) --
  • RemoveSecurityGroupIds (list) --

    (Interface endpoint) One or more security group IDs to disassociate from the network interface.

    • (string) --
  • IpAddressType (string) -- The IP address type for the endpoint.
  • DnsOptions (dict) --

    The DNS options for the endpoint.

    • DnsRecordIpType (string) --

      The DNS records created for the endpoint.

  • PrivateDnsEnabled (boolean) -- (Interface endpoint) Indicates whether a private hosted zone is associated with the VPC.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_vpc_endpoint_connection_notification(**kwargs)

Modifies a connection notification for VPC endpoint or VPC endpoint service. You can change the SNS topic for the notification, or the events for which to be notified.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_endpoint_connection_notification(
    DryRun=True|False,
    ConnectionNotificationId='string',
    ConnectionNotificationArn='string',
    ConnectionEvents=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ConnectionNotificationId (string) --

    [REQUIRED]

    The ID of the notification.

  • ConnectionNotificationArn (string) -- The ARN for the SNS topic for the notification.
  • ConnectionEvents (list) --

    One or more events for the endpoint. Valid values are Accept , Connect , Delete , and Reject .

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'ReturnValue': True|False
}

Response Structure

  • (dict) --

    • ReturnValue (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_vpc_endpoint_service_configuration(**kwargs)

Modifies the attributes of your VPC endpoint service configuration. You can change the Network Load Balancers or Gateway Load Balancers for your service, and you can specify whether acceptance is required for requests to connect to your endpoint service through an interface VPC endpoint.

If you set or modify the private DNS name, you must prove that you own the private DNS domain name.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_endpoint_service_configuration(
    DryRun=True|False,
    ServiceId='string',
    PrivateDnsName='string',
    RemovePrivateDnsName=True|False,
    AcceptanceRequired=True|False,
    AddNetworkLoadBalancerArns=[
        'string',
    ],
    RemoveNetworkLoadBalancerArns=[
        'string',
    ],
    AddGatewayLoadBalancerArns=[
        'string',
    ],
    RemoveGatewayLoadBalancerArns=[
        'string',
    ],
    AddSupportedIpAddressTypes=[
        'string',
    ],
    RemoveSupportedIpAddressTypes=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the service.

  • PrivateDnsName (string) -- (Interface endpoint configuration) The private DNS name to assign to the endpoint service.
  • RemovePrivateDnsName (boolean) -- (Interface endpoint configuration) Removes the private DNS name of the endpoint service.
  • AcceptanceRequired (boolean) -- Indicates whether requests to create an endpoint to your service must be accepted.
  • AddNetworkLoadBalancerArns (list) --

    The Amazon Resource Names (ARNs) of Network Load Balancers to add to your service configuration.

    • (string) --
  • RemoveNetworkLoadBalancerArns (list) --

    The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your service configuration.

    • (string) --
  • AddGatewayLoadBalancerArns (list) --

    The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to your service configuration.

    • (string) --
  • RemoveGatewayLoadBalancerArns (list) --

    The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from your service configuration.

    • (string) --
  • AddSupportedIpAddressTypes (list) --

    The IP address types to add to your service configuration.

    • (string) --
  • RemoveSupportedIpAddressTypes (list) --

    The IP address types to remove from your service configuration.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_vpc_endpoint_service_payer_responsibility(**kwargs)

Modifies the payer responsibility for your VPC endpoint service.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_endpoint_service_payer_responsibility(
    DryRun=True|False,
    ServiceId='string',
    PayerResponsibility='ServiceOwner'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the service.

  • PayerResponsibility (string) --

    [REQUIRED]

    The entity that is responsible for the endpoint costs. The default is the endpoint owner. If you set the payer responsibility to the service owner, you cannot set it back to the endpoint owner.

Return type

dict

Returns

Response Syntax

{
    'ReturnValue': True|False
}

Response Structure

  • (dict) --

    • ReturnValue (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_vpc_endpoint_service_permissions(**kwargs)

Modifies the permissions for your VPC endpoint service. You can add or remove permissions for service consumers (IAM users, IAM roles, and Amazon Web Services accounts) to connect to your endpoint service.

If you grant permissions to all principals, the service is public. Any users who know the name of a public service can send a request to attach an endpoint. If the service does not require manual approval, attachments are automatically approved.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_endpoint_service_permissions(
    DryRun=True|False,
    ServiceId='string',
    AddAllowedPrincipals=[
        'string',
    ],
    RemoveAllowedPrincipals=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the service.

  • AddAllowedPrincipals (list) --

    The Amazon Resource Names (ARN) of one or more principals. Permissions are granted to the principals in this list. To grant permissions to all principals, specify an asterisk (*).

    • (string) --
  • RemoveAllowedPrincipals (list) --

    The Amazon Resource Names (ARN) of one or more principals. Permissions are revoked for principals in this list.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'ReturnValue': True|False
}

Response Structure

  • (dict) --

    • ReturnValue (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

modify_vpc_peering_connection_options(**kwargs)

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Modifies the VPC peering connection options on one side of a VPC peering connection. You can do the following:

  • Enable/disable communication over the peering connection between an EC2-Classic instance that's linked to your VPC (using ClassicLink) and instances in the peer VPC.
  • Enable/disable communication over the peering connection between instances in your VPC and an EC2-Classic instance that's linked to the peer VPC.
  • Enable/disable the ability to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

If the peered VPCs are in the same Amazon Web Services account, you can enable DNS resolution for queries from the local VPC. This ensures that queries from the local VPC resolve to private IP addresses in the peer VPC. This option is not available if the peered VPCs are in different different Amazon Web Services accounts or different Regions. For peered VPCs in different Amazon Web Services accounts, each Amazon Web Services account owner must initiate a separate request to modify the peering connection options. For inter-region peering connections, you must use the Region for the requester VPC to modify the requester VPC peering options and the Region for the accepter VPC to modify the accepter VPC peering options. To verify which VPCs are the accepter and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections command.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_peering_connection_options(
    AccepterPeeringConnectionOptions={
        'AllowDnsResolutionFromRemoteVpc': True|False,
        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
    },
    DryRun=True|False,
    RequesterPeeringConnectionOptions={
        'AllowDnsResolutionFromRemoteVpc': True|False,
        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
    },
    VpcPeeringConnectionId='string'
)
Parameters
  • AccepterPeeringConnectionOptions (dict) --

    The VPC peering connection options for the accepter VPC.

    • AllowDnsResolutionFromRemoteVpc (boolean) --

      If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

    • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

      If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

    • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

      If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RequesterPeeringConnectionOptions (dict) --

    The VPC peering connection options for the requester VPC.

    • AllowDnsResolutionFromRemoteVpc (boolean) --

      If true, enables a local VPC to resolve public DNS hostnames to private IP addresses when queried from instances in the peer VPC.

    • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

      If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

    • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

      If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

  • VpcPeeringConnectionId (string) --

    [REQUIRED]

    The ID of the VPC peering connection.

Return type

dict

Returns

Response Syntax

{
    'AccepterPeeringConnectionOptions': {
        'AllowDnsResolutionFromRemoteVpc': True|False,
        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
    },
    'RequesterPeeringConnectionOptions': {
        'AllowDnsResolutionFromRemoteVpc': True|False,
        'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
        'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
    }
}

Response Structure

  • (dict) --

    • AccepterPeeringConnectionOptions (dict) --

      Information about the VPC peering connection options for the accepter VPC.

      • AllowDnsResolutionFromRemoteVpc (boolean) --

        If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.

      • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

        If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

      • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

        If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

    • RequesterPeeringConnectionOptions (dict) --

      Information about the VPC peering connection options for the requester VPC.

      • AllowDnsResolutionFromRemoteVpc (boolean) --

        If true, the public DNS hostnames of instances in the specified VPC resolve to private IP addresses when queried from instances in the peer VPC.

      • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

        If true, enables outbound communication from an EC2-Classic instance that's linked to a local VPC using ClassicLink to instances in a peer VPC.

      • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

        If true, enables outbound communication from instances in a local VPC to an EC2-Classic instance that's linked to a peer VPC using ClassicLink.

modify_vpc_tenancy(**kwargs)

Modifies the instance tenancy attribute of the specified VPC. You can change the instance tenancy attribute of a VPC to default only. You cannot change the instance tenancy attribute to dedicated .

After you modify the tenancy of the VPC, any new instances that you launch into the VPC have a tenancy of default , unless you specify otherwise during launch. The tenancy of any existing instances in the VPC is not affected.

For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_vpc_tenancy(
    VpcId='string',
    InstanceTenancy='default',
    DryRun=True|False
)
Parameters
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • InstanceTenancy (string) --

    [REQUIRED]

    The instance tenancy attribute for the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ReturnValue': True|False
}

Response Structure

  • (dict) --

    • ReturnValue (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

modify_vpn_connection(**kwargs)

Modifies the customer gateway or the target gateway of an Amazon Web Services Site-to-Site VPN connection. To modify the target gateway, the following migration options are available:

  • An existing virtual private gateway to a new virtual private gateway
  • An existing virtual private gateway to a transit gateway
  • An existing transit gateway to a new transit gateway
  • An existing transit gateway to a virtual private gateway

Before you perform the migration to the new gateway, you must configure the new gateway. Use CreateVpnGateway to create a virtual private gateway, or CreateTransitGateway to create a transit gateway.

This step is required when you migrate from a virtual private gateway with static routes to a transit gateway.

You must delete the static routes before you migrate to the new gateway.

Keep a copy of the static route before you delete it. You will need to add back these routes to the transit gateway after the VPN connection migration is complete.

After you migrate to the new gateway, you might need to modify your VPC route table. Use CreateRoute and DeleteRoute to make the changes described in Update VPC route tables in the Amazon Web Services Site-to-Site VPN User Guide .

When the new gateway is a transit gateway, modify the transit gateway route table to allow traffic between the VPC and the Amazon Web Services Site-to-Site VPN connection. Use CreateTransitGatewayRoute to add the routes.

If you deleted VPN static routes, you must add the static routes to the transit gateway route table.

After you perform this operation, the VPN endpoint's IP addresses on the Amazon Web Services side and the tunnel options remain intact. Your Amazon Web Services Site-to-Site VPN connection will be temporarily unavailable for a brief period while we provision the new endpoints.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpn_connection(
    VpnConnectionId='string',
    TransitGatewayId='string',
    CustomerGatewayId='string',
    VpnGatewayId='string',
    DryRun=True|False
)
Parameters
  • VpnConnectionId (string) --

    [REQUIRED]

    The ID of the VPN connection.

  • TransitGatewayId (string) -- The ID of the transit gateway.
  • CustomerGatewayId (string) -- The ID of the customer gateway at your end of the VPN connection.
  • VpnGatewayId (string) -- The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnConnection': {
        'CustomerGatewayConfiguration': 'string',
        'CustomerGatewayId': 'string',
        'Category': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'Type': 'ipsec.1',
        'VpnConnectionId': 'string',
        'VpnGatewayId': 'string',
        'TransitGatewayId': 'string',
        'CoreNetworkArn': 'string',
        'CoreNetworkAttachmentArn': 'string',
        'GatewayAssociationState': 'associated'|'not-associated'|'associating'|'disassociating',
        'Options': {
            'EnableAcceleration': True|False,
            'StaticRoutesOnly': True|False,
            'LocalIpv4NetworkCidr': 'string',
            'RemoteIpv4NetworkCidr': 'string',
            'LocalIpv6NetworkCidr': 'string',
            'RemoteIpv6NetworkCidr': 'string',
            'OutsideIpAddressType': 'string',
            'TransportTransitGatewayAttachmentId': 'string',
            'TunnelInsideIpVersion': 'ipv4'|'ipv6',
            'TunnelOptions': [
                {
                    'OutsideIpAddress': 'string',
                    'TunnelInsideCidr': 'string',
                    'TunnelInsideIpv6Cidr': 'string',
                    'PreSharedKey': 'string',
                    'Phase1LifetimeSeconds': 123,
                    'Phase2LifetimeSeconds': 123,
                    'RekeyMarginTimeSeconds': 123,
                    'RekeyFuzzPercentage': 123,
                    'ReplayWindowSize': 123,
                    'DpdTimeoutSeconds': 123,
                    'DpdTimeoutAction': 'string',
                    'Phase1EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'Phase2DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'IkeVersions': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'StartupAction': 'string'
                },
            ]
        },
        'Routes': [
            {
                'DestinationCidrBlock': 'string',
                'Source': 'Static',
                'State': 'pending'|'available'|'deleting'|'deleted'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VgwTelemetry': [
            {
                'AcceptedRouteCount': 123,
                'LastStatusChange': datetime(2015, 1, 1),
                'OutsideIpAddress': 'string',
                'Status': 'UP'|'DOWN',
                'StatusMessage': 'string',
                'CertificateArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • VpnConnection (dict) --

      Describes a VPN connection.

      • CustomerGatewayConfiguration (string) --

        The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.

      • CustomerGatewayId (string) --

        The ID of the customer gateway at your end of the VPN connection.

      • Category (string) --

        The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

      • State (string) --

        The current state of the VPN connection.

      • Type (string) --

        The type of VPN connection.

      • VpnConnectionId (string) --

        The ID of the VPN connection.

      • VpnGatewayId (string) --

        The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

      • TransitGatewayId (string) --

        The ID of the transit gateway associated with the VPN connection.

      • CoreNetworkArn (string) --

        The ARN of the core network.

      • CoreNetworkAttachmentArn (string) --

        The ARN of the core network attachment.

      • GatewayAssociationState (string) --

        The current state of the gateway association.

      • Options (dict) --

        The VPN connection options.

        • EnableAcceleration (boolean) --

          Indicates whether acceleration is enabled for the VPN connection.

        • StaticRoutesOnly (boolean) --

          Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

        • LocalIpv4NetworkCidr (string) --

          The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv4NetworkCidr (string) --

          The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

        • LocalIpv6NetworkCidr (string) --

          The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv6NetworkCidr (string) --

          The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

        • OutsideIpAddressType (string) --

          The type of IPv4 address assigned to the outside interface of the customer gateway.

          Valid values: PrivateIpv4 | PublicIpv4

          Default: PublicIpv4

        • TransportTransitGatewayAttachmentId (string) --

          The transit gateway attachment ID in use for the VPN tunnel.

        • TunnelInsideIpVersion (string) --

          Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

        • TunnelOptions (list) --

          Indicates the VPN tunnel options.

          • (dict) --

            The VPN tunnel options.

            • OutsideIpAddress (string) --

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr (string) --

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr (string) --

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey (string) --

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds (integer) --

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds (integer) --

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds (integer) --

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage (integer) --

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize (integer) --

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds (integer) --

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction (string) --

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The encryption algorithm.

            • Phase1IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The integrity algorithm.

            • Phase1DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 1 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 2 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • IkeVersions (list) --

              The IKE versions that are permitted for the VPN tunnel.

              • (dict) --

                The internet key exchange (IKE) version permitted for the VPN tunnel.

                • Value (string) --

                  The IKE version.

            • StartupAction (string) --

              The action to take when the establishing the VPN tunnels for a VPN connection.

      • Routes (list) --

        The static routes associated with the VPN connection.

        • (dict) --

          Describes a static route for a VPN connection.

          • DestinationCidrBlock (string) --

            The CIDR block associated with the local subnet of the customer data center.

          • Source (string) --

            Indicates how the routes were provided.

          • State (string) --

            The current state of the static route.

      • Tags (list) --

        Any tags assigned to the VPN connection.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

      • VgwTelemetry (list) --

        Information about the VPN tunnel.

        • (dict) --

          Describes telemetry for a VPN tunnel.

          • AcceptedRouteCount (integer) --

            The number of accepted routes.

          • LastStatusChange (datetime) --

            The date and time of the last change in status.

          • OutsideIpAddress (string) --

            The Internet-routable IP address of the virtual private gateway's outside interface.

          • Status (string) --

            The status of the VPN tunnel.

          • StatusMessage (string) --

            If an error occurs, a description of the error.

          • CertificateArn (string) --

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

modify_vpn_connection_options(**kwargs)

Modifies the connection options for your Site-to-Site VPN connection.

When you modify the VPN connection options, the VPN endpoint IP addresses on the Amazon Web Services side do not change, and the tunnel options do not change. Your VPN connection will be temporarily unavailable for a brief period while the VPN connection is updated.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpn_connection_options(
    VpnConnectionId='string',
    LocalIpv4NetworkCidr='string',
    RemoteIpv4NetworkCidr='string',
    LocalIpv6NetworkCidr='string',
    RemoteIpv6NetworkCidr='string',
    DryRun=True|False
)
Parameters
  • VpnConnectionId (string) --

    [REQUIRED]

    The ID of the Site-to-Site VPN connection.

  • LocalIpv4NetworkCidr (string) --

    The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

    Default: 0.0.0.0/0

  • RemoteIpv4NetworkCidr (string) --

    The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

    Default: 0.0.0.0/0

  • LocalIpv6NetworkCidr (string) --

    The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

    Default: ::/0

  • RemoteIpv6NetworkCidr (string) --

    The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

    Default: ::/0

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnConnection': {
        'CustomerGatewayConfiguration': 'string',
        'CustomerGatewayId': 'string',
        'Category': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'Type': 'ipsec.1',
        'VpnConnectionId': 'string',
        'VpnGatewayId': 'string',
        'TransitGatewayId': 'string',
        'CoreNetworkArn': 'string',
        'CoreNetworkAttachmentArn': 'string',
        'GatewayAssociationState': 'associated'|'not-associated'|'associating'|'disassociating',
        'Options': {
            'EnableAcceleration': True|False,
            'StaticRoutesOnly': True|False,
            'LocalIpv4NetworkCidr': 'string',
            'RemoteIpv4NetworkCidr': 'string',
            'LocalIpv6NetworkCidr': 'string',
            'RemoteIpv6NetworkCidr': 'string',
            'OutsideIpAddressType': 'string',
            'TransportTransitGatewayAttachmentId': 'string',
            'TunnelInsideIpVersion': 'ipv4'|'ipv6',
            'TunnelOptions': [
                {
                    'OutsideIpAddress': 'string',
                    'TunnelInsideCidr': 'string',
                    'TunnelInsideIpv6Cidr': 'string',
                    'PreSharedKey': 'string',
                    'Phase1LifetimeSeconds': 123,
                    'Phase2LifetimeSeconds': 123,
                    'RekeyMarginTimeSeconds': 123,
                    'RekeyFuzzPercentage': 123,
                    'ReplayWindowSize': 123,
                    'DpdTimeoutSeconds': 123,
                    'DpdTimeoutAction': 'string',
                    'Phase1EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'Phase2DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'IkeVersions': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'StartupAction': 'string'
                },
            ]
        },
        'Routes': [
            {
                'DestinationCidrBlock': 'string',
                'Source': 'Static',
                'State': 'pending'|'available'|'deleting'|'deleted'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VgwTelemetry': [
            {
                'AcceptedRouteCount': 123,
                'LastStatusChange': datetime(2015, 1, 1),
                'OutsideIpAddress': 'string',
                'Status': 'UP'|'DOWN',
                'StatusMessage': 'string',
                'CertificateArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • VpnConnection (dict) --

      Describes a VPN connection.

      • CustomerGatewayConfiguration (string) --

        The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.

      • CustomerGatewayId (string) --

        The ID of the customer gateway at your end of the VPN connection.

      • Category (string) --

        The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

      • State (string) --

        The current state of the VPN connection.

      • Type (string) --

        The type of VPN connection.

      • VpnConnectionId (string) --

        The ID of the VPN connection.

      • VpnGatewayId (string) --

        The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

      • TransitGatewayId (string) --

        The ID of the transit gateway associated with the VPN connection.

      • CoreNetworkArn (string) --

        The ARN of the core network.

      • CoreNetworkAttachmentArn (string) --

        The ARN of the core network attachment.

      • GatewayAssociationState (string) --

        The current state of the gateway association.

      • Options (dict) --

        The VPN connection options.

        • EnableAcceleration (boolean) --

          Indicates whether acceleration is enabled for the VPN connection.

        • StaticRoutesOnly (boolean) --

          Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

        • LocalIpv4NetworkCidr (string) --

          The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv4NetworkCidr (string) --

          The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

        • LocalIpv6NetworkCidr (string) --

          The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv6NetworkCidr (string) --

          The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

        • OutsideIpAddressType (string) --

          The type of IPv4 address assigned to the outside interface of the customer gateway.

          Valid values: PrivateIpv4 | PublicIpv4

          Default: PublicIpv4

        • TransportTransitGatewayAttachmentId (string) --

          The transit gateway attachment ID in use for the VPN tunnel.

        • TunnelInsideIpVersion (string) --

          Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

        • TunnelOptions (list) --

          Indicates the VPN tunnel options.

          • (dict) --

            The VPN tunnel options.

            • OutsideIpAddress (string) --

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr (string) --

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr (string) --

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey (string) --

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds (integer) --

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds (integer) --

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds (integer) --

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage (integer) --

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize (integer) --

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds (integer) --

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction (string) --

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The encryption algorithm.

            • Phase1IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The integrity algorithm.

            • Phase1DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 1 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 2 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • IkeVersions (list) --

              The IKE versions that are permitted for the VPN tunnel.

              • (dict) --

                The internet key exchange (IKE) version permitted for the VPN tunnel.

                • Value (string) --

                  The IKE version.

            • StartupAction (string) --

              The action to take when the establishing the VPN tunnels for a VPN connection.

      • Routes (list) --

        The static routes associated with the VPN connection.

        • (dict) --

          Describes a static route for a VPN connection.

          • DestinationCidrBlock (string) --

            The CIDR block associated with the local subnet of the customer data center.

          • Source (string) --

            Indicates how the routes were provided.

          • State (string) --

            The current state of the static route.

      • Tags (list) --

        Any tags assigned to the VPN connection.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

      • VgwTelemetry (list) --

        Information about the VPN tunnel.

        • (dict) --

          Describes telemetry for a VPN tunnel.

          • AcceptedRouteCount (integer) --

            The number of accepted routes.

          • LastStatusChange (datetime) --

            The date and time of the last change in status.

          • OutsideIpAddress (string) --

            The Internet-routable IP address of the virtual private gateway's outside interface.

          • Status (string) --

            The status of the VPN tunnel.

          • StatusMessage (string) --

            If an error occurs, a description of the error.

          • CertificateArn (string) --

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

modify_vpn_tunnel_certificate(**kwargs)

Modifies the VPN tunnel endpoint certificate.

See also: AWS API Documentation

Request Syntax

response = client.modify_vpn_tunnel_certificate(
    VpnConnectionId='string',
    VpnTunnelOutsideIpAddress='string',
    DryRun=True|False
)
Parameters
  • VpnConnectionId (string) --

    [REQUIRED]

    The ID of the Amazon Web Services Site-to-Site VPN connection.

  • VpnTunnelOutsideIpAddress (string) --

    [REQUIRED]

    The external IP address of the VPN tunnel.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnConnection': {
        'CustomerGatewayConfiguration': 'string',
        'CustomerGatewayId': 'string',
        'Category': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'Type': 'ipsec.1',
        'VpnConnectionId': 'string',
        'VpnGatewayId': 'string',
        'TransitGatewayId': 'string',
        'CoreNetworkArn': 'string',
        'CoreNetworkAttachmentArn': 'string',
        'GatewayAssociationState': 'associated'|'not-associated'|'associating'|'disassociating',
        'Options': {
            'EnableAcceleration': True|False,
            'StaticRoutesOnly': True|False,
            'LocalIpv4NetworkCidr': 'string',
            'RemoteIpv4NetworkCidr': 'string',
            'LocalIpv6NetworkCidr': 'string',
            'RemoteIpv6NetworkCidr': 'string',
            'OutsideIpAddressType': 'string',
            'TransportTransitGatewayAttachmentId': 'string',
            'TunnelInsideIpVersion': 'ipv4'|'ipv6',
            'TunnelOptions': [
                {
                    'OutsideIpAddress': 'string',
                    'TunnelInsideCidr': 'string',
                    'TunnelInsideIpv6Cidr': 'string',
                    'PreSharedKey': 'string',
                    'Phase1LifetimeSeconds': 123,
                    'Phase2LifetimeSeconds': 123,
                    'RekeyMarginTimeSeconds': 123,
                    'RekeyFuzzPercentage': 123,
                    'ReplayWindowSize': 123,
                    'DpdTimeoutSeconds': 123,
                    'DpdTimeoutAction': 'string',
                    'Phase1EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'Phase2DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'IkeVersions': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'StartupAction': 'string'
                },
            ]
        },
        'Routes': [
            {
                'DestinationCidrBlock': 'string',
                'Source': 'Static',
                'State': 'pending'|'available'|'deleting'|'deleted'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VgwTelemetry': [
            {
                'AcceptedRouteCount': 123,
                'LastStatusChange': datetime(2015, 1, 1),
                'OutsideIpAddress': 'string',
                'Status': 'UP'|'DOWN',
                'StatusMessage': 'string',
                'CertificateArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • VpnConnection (dict) --

      Describes a VPN connection.

      • CustomerGatewayConfiguration (string) --

        The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.

      • CustomerGatewayId (string) --

        The ID of the customer gateway at your end of the VPN connection.

      • Category (string) --

        The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

      • State (string) --

        The current state of the VPN connection.

      • Type (string) --

        The type of VPN connection.

      • VpnConnectionId (string) --

        The ID of the VPN connection.

      • VpnGatewayId (string) --

        The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

      • TransitGatewayId (string) --

        The ID of the transit gateway associated with the VPN connection.

      • CoreNetworkArn (string) --

        The ARN of the core network.

      • CoreNetworkAttachmentArn (string) --

        The ARN of the core network attachment.

      • GatewayAssociationState (string) --

        The current state of the gateway association.

      • Options (dict) --

        The VPN connection options.

        • EnableAcceleration (boolean) --

          Indicates whether acceleration is enabled for the VPN connection.

        • StaticRoutesOnly (boolean) --

          Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

        • LocalIpv4NetworkCidr (string) --

          The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv4NetworkCidr (string) --

          The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

        • LocalIpv6NetworkCidr (string) --

          The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv6NetworkCidr (string) --

          The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

        • OutsideIpAddressType (string) --

          The type of IPv4 address assigned to the outside interface of the customer gateway.

          Valid values: PrivateIpv4 | PublicIpv4

          Default: PublicIpv4

        • TransportTransitGatewayAttachmentId (string) --

          The transit gateway attachment ID in use for the VPN tunnel.

        • TunnelInsideIpVersion (string) --

          Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

        • TunnelOptions (list) --

          Indicates the VPN tunnel options.

          • (dict) --

            The VPN tunnel options.

            • OutsideIpAddress (string) --

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr (string) --

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr (string) --

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey (string) --

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds (integer) --

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds (integer) --

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds (integer) --

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage (integer) --

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize (integer) --

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds (integer) --

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction (string) --

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The encryption algorithm.

            • Phase1IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The integrity algorithm.

            • Phase1DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 1 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 2 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • IkeVersions (list) --

              The IKE versions that are permitted for the VPN tunnel.

              • (dict) --

                The internet key exchange (IKE) version permitted for the VPN tunnel.

                • Value (string) --

                  The IKE version.

            • StartupAction (string) --

              The action to take when the establishing the VPN tunnels for a VPN connection.

      • Routes (list) --

        The static routes associated with the VPN connection.

        • (dict) --

          Describes a static route for a VPN connection.

          • DestinationCidrBlock (string) --

            The CIDR block associated with the local subnet of the customer data center.

          • Source (string) --

            Indicates how the routes were provided.

          • State (string) --

            The current state of the static route.

      • Tags (list) --

        Any tags assigned to the VPN connection.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

      • VgwTelemetry (list) --

        Information about the VPN tunnel.

        • (dict) --

          Describes telemetry for a VPN tunnel.

          • AcceptedRouteCount (integer) --

            The number of accepted routes.

          • LastStatusChange (datetime) --

            The date and time of the last change in status.

          • OutsideIpAddress (string) --

            The Internet-routable IP address of the virtual private gateway's outside interface.

          • Status (string) --

            The status of the VPN tunnel.

          • StatusMessage (string) --

            If an error occurs, a description of the error.

          • CertificateArn (string) --

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

modify_vpn_tunnel_options(**kwargs)

Modifies the options for a VPN tunnel in an Amazon Web Services Site-to-Site VPN connection. You can modify multiple options for a tunnel in a single request, but you can only modify one tunnel at a time. For more information, see Site-to-Site VPN tunnel options for your Site-to-Site VPN connection in the Amazon Web Services Site-to-Site VPN User Guide .

See also: AWS API Documentation

Request Syntax

response = client.modify_vpn_tunnel_options(
    VpnConnectionId='string',
    VpnTunnelOutsideIpAddress='string',
    TunnelOptions={
        'TunnelInsideCidr': 'string',
        'TunnelInsideIpv6Cidr': 'string',
        'PreSharedKey': 'string',
        'Phase1LifetimeSeconds': 123,
        'Phase2LifetimeSeconds': 123,
        'RekeyMarginTimeSeconds': 123,
        'RekeyFuzzPercentage': 123,
        'ReplayWindowSize': 123,
        'DPDTimeoutSeconds': 123,
        'DPDTimeoutAction': 'string',
        'Phase1EncryptionAlgorithms': [
            {
                'Value': 'string'
            },
        ],
        'Phase2EncryptionAlgorithms': [
            {
                'Value': 'string'
            },
        ],
        'Phase1IntegrityAlgorithms': [
            {
                'Value': 'string'
            },
        ],
        'Phase2IntegrityAlgorithms': [
            {
                'Value': 'string'
            },
        ],
        'Phase1DHGroupNumbers': [
            {
                'Value': 123
            },
        ],
        'Phase2DHGroupNumbers': [
            {
                'Value': 123
            },
        ],
        'IKEVersions': [
            {
                'Value': 'string'
            },
        ],
        'StartupAction': 'string'
    },
    DryRun=True|False
)
Parameters
  • VpnConnectionId (string) --

    [REQUIRED]

    The ID of the Amazon Web Services Site-to-Site VPN connection.

  • VpnTunnelOutsideIpAddress (string) --

    [REQUIRED]

    The external IP address of the VPN tunnel.

  • TunnelOptions (dict) --

    [REQUIRED]

    The tunnel options to modify.

    • TunnelInsideCidr (string) --

      The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same virtual private gateway.

      Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The following CIDR blocks are reserved and cannot be used:

      • 169.254.0.0/30
      • 169.254.1.0/30
      • 169.254.2.0/30
      • 169.254.3.0/30
      • 169.254.4.0/30
      • 169.254.5.0/30
      • 169.254.169.252/30
    • TunnelInsideIpv6Cidr (string) --

      The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks must be unique across all VPN connections that use the same transit gateway.

      Constraints: A size /126 CIDR block from the local fd00::/8 range.

    • PreSharedKey (string) --

      The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

      Constraints: Allowed characters are alphanumeric characters, periods (.), and underscores (_). Must be between 8 and 64 characters in length and cannot start with zero (0).

    • Phase1LifetimeSeconds (integer) --

      The lifetime for phase 1 of the IKE negotiation, in seconds.

      Constraints: A value between 900 and 28,800.

      Default: 28800

    • Phase2LifetimeSeconds (integer) --

      The lifetime for phase 2 of the IKE negotiation, in seconds.

      Constraints: A value between 900 and 3,600. The value must be less than the value for Phase1LifetimeSeconds .

      Default: 3600

    • RekeyMarginTimeSeconds (integer) --

      The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey. The exact time of the rekey is randomly selected based on the value for RekeyFuzzPercentage .

      Constraints: A value between 60 and half of Phase2LifetimeSeconds .

      Default: 540

    • RekeyFuzzPercentage (integer) --

      The percentage of the rekey window (determined by RekeyMarginTimeSeconds ) during which the rekey time is randomly selected.

      Constraints: A value between 0 and 100.

      Default: 100

    • ReplayWindowSize (integer) --

      The number of packets in an IKE replay window.

      Constraints: A value between 64 and 2048.

      Default: 1024

    • DPDTimeoutSeconds (integer) --

      The number of seconds after which a DPD timeout occurs.

      Constraints: A value greater than or equal to 30.

      Default: 30

    • DPDTimeoutAction (string) --

      The action to take after DPD timeout occurs. Specify restart to restart the IKE initiation. Specify clear to end the IKE session.

      Valid Values: clear | none | restart

      Default: clear

    • Phase1EncryptionAlgorithms (list) --

      One or more encryption algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

      Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

      • (dict) --

        Specifies the encryption algorithm for the VPN tunnel for phase 1 IKE negotiations.

        • Value (string) --

          The value for the encryption algorithm.

    • Phase2EncryptionAlgorithms (list) --

      One or more encryption algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

      Valid values: AES128 | AES256 | AES128-GCM-16 | AES256-GCM-16

      • (dict) --

        Specifies the encryption algorithm for the VPN tunnel for phase 2 IKE negotiations.

        • Value (string) --

          The encryption algorithm.

    • Phase1IntegrityAlgorithms (list) --

      One or more integrity algorithms that are permitted for the VPN tunnel for phase 1 IKE negotiations.

      Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

      • (dict) --

        Specifies the integrity algorithm for the VPN tunnel for phase 1 IKE negotiations.

        • Value (string) --

          The value for the integrity algorithm.

    • Phase2IntegrityAlgorithms (list) --

      One or more integrity algorithms that are permitted for the VPN tunnel for phase 2 IKE negotiations.

      Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512

      • (dict) --

        Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE negotiations.

        • Value (string) --

          The integrity algorithm.

    • Phase1DHGroupNumbers (list) --

      One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 1 IKE negotiations.

      Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

      • (dict) --

        Specifies a Diffie-Hellman group number for the VPN tunnel for phase 1 IKE negotiations.

        • Value (integer) --

          The Diffie-Hellmann group number.

    • Phase2DHGroupNumbers (list) --

      One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel for phase 2 IKE negotiations.

      Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24

      • (dict) --

        Specifies a Diffie-Hellman group number for the VPN tunnel for phase 2 IKE negotiations.

        • Value (integer) --

          The Diffie-Hellmann group number.

    • IKEVersions (list) --

      The IKE versions that are permitted for the VPN tunnel.

      Valid values: ikev1 | ikev2

      • (dict) --

        The IKE version that is permitted for the VPN tunnel.

        • Value (string) --

          The IKE version.

    • StartupAction (string) --

      The action to take when the establishing the tunnel for the VPN connection. By default, your customer gateway device must initiate the IKE negotiation and bring up the tunnel. Specify start for Amazon Web Services to initiate the IKE negotiation.

      Valid Values: add | start

      Default: add

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpnConnection': {
        'CustomerGatewayConfiguration': 'string',
        'CustomerGatewayId': 'string',
        'Category': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'Type': 'ipsec.1',
        'VpnConnectionId': 'string',
        'VpnGatewayId': 'string',
        'TransitGatewayId': 'string',
        'CoreNetworkArn': 'string',
        'CoreNetworkAttachmentArn': 'string',
        'GatewayAssociationState': 'associated'|'not-associated'|'associating'|'disassociating',
        'Options': {
            'EnableAcceleration': True|False,
            'StaticRoutesOnly': True|False,
            'LocalIpv4NetworkCidr': 'string',
            'RemoteIpv4NetworkCidr': 'string',
            'LocalIpv6NetworkCidr': 'string',
            'RemoteIpv6NetworkCidr': 'string',
            'OutsideIpAddressType': 'string',
            'TransportTransitGatewayAttachmentId': 'string',
            'TunnelInsideIpVersion': 'ipv4'|'ipv6',
            'TunnelOptions': [
                {
                    'OutsideIpAddress': 'string',
                    'TunnelInsideCidr': 'string',
                    'TunnelInsideIpv6Cidr': 'string',
                    'PreSharedKey': 'string',
                    'Phase1LifetimeSeconds': 123,
                    'Phase2LifetimeSeconds': 123,
                    'RekeyMarginTimeSeconds': 123,
                    'RekeyFuzzPercentage': 123,
                    'ReplayWindowSize': 123,
                    'DpdTimeoutSeconds': 123,
                    'DpdTimeoutAction': 'string',
                    'Phase1EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2EncryptionAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase2IntegrityAlgorithms': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'Phase1DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'Phase2DHGroupNumbers': [
                        {
                            'Value': 123
                        },
                    ],
                    'IkeVersions': [
                        {
                            'Value': 'string'
                        },
                    ],
                    'StartupAction': 'string'
                },
            ]
        },
        'Routes': [
            {
                'DestinationCidrBlock': 'string',
                'Source': 'Static',
                'State': 'pending'|'available'|'deleting'|'deleted'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VgwTelemetry': [
            {
                'AcceptedRouteCount': 123,
                'LastStatusChange': datetime(2015, 1, 1),
                'OutsideIpAddress': 'string',
                'Status': 'UP'|'DOWN',
                'StatusMessage': 'string',
                'CertificateArn': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • VpnConnection (dict) --

      Describes a VPN connection.

      • CustomerGatewayConfiguration (string) --

        The configuration information for the VPN connection's customer gateway (in the native XML format). This element is always present in the CreateVpnConnection response; however, it's present in the DescribeVpnConnections response only if the VPN connection is in the pending or available state.

      • CustomerGatewayId (string) --

        The ID of the customer gateway at your end of the VPN connection.

      • Category (string) --

        The category of the VPN connection. A value of VPN indicates an Amazon Web Services VPN connection. A value of VPN-Classic indicates an Amazon Web Services Classic VPN connection.

      • State (string) --

        The current state of the VPN connection.

      • Type (string) --

        The type of VPN connection.

      • VpnConnectionId (string) --

        The ID of the VPN connection.

      • VpnGatewayId (string) --

        The ID of the virtual private gateway at the Amazon Web Services side of the VPN connection.

      • TransitGatewayId (string) --

        The ID of the transit gateway associated with the VPN connection.

      • CoreNetworkArn (string) --

        The ARN of the core network.

      • CoreNetworkAttachmentArn (string) --

        The ARN of the core network attachment.

      • GatewayAssociationState (string) --

        The current state of the gateway association.

      • Options (dict) --

        The VPN connection options.

        • EnableAcceleration (boolean) --

          Indicates whether acceleration is enabled for the VPN connection.

        • StaticRoutesOnly (boolean) --

          Indicates whether the VPN connection uses static routes only. Static routes must be used for devices that don't support BGP.

        • LocalIpv4NetworkCidr (string) --

          The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv4NetworkCidr (string) --

          The IPv4 CIDR on the Amazon Web Services side of the VPN connection.

        • LocalIpv6NetworkCidr (string) --

          The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection.

        • RemoteIpv6NetworkCidr (string) --

          The IPv6 CIDR on the Amazon Web Services side of the VPN connection.

        • OutsideIpAddressType (string) --

          The type of IPv4 address assigned to the outside interface of the customer gateway.

          Valid values: PrivateIpv4 | PublicIpv4

          Default: PublicIpv4

        • TransportTransitGatewayAttachmentId (string) --

          The transit gateway attachment ID in use for the VPN tunnel.

        • TunnelInsideIpVersion (string) --

          Indicates whether the VPN tunnels process IPv4 or IPv6 traffic.

        • TunnelOptions (list) --

          Indicates the VPN tunnel options.

          • (dict) --

            The VPN tunnel options.

            • OutsideIpAddress (string) --

              The external IP address of the VPN tunnel.

            • TunnelInsideCidr (string) --

              The range of inside IPv4 addresses for the tunnel.

            • TunnelInsideIpv6Cidr (string) --

              The range of inside IPv6 addresses for the tunnel.

            • PreSharedKey (string) --

              The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and the customer gateway.

            • Phase1LifetimeSeconds (integer) --

              The lifetime for phase 1 of the IKE negotiation, in seconds.

            • Phase2LifetimeSeconds (integer) --

              The lifetime for phase 2 of the IKE negotiation, in seconds.

            • RekeyMarginTimeSeconds (integer) --

              The margin time, in seconds, before the phase 2 lifetime expires, during which the Amazon Web Services side of the VPN connection performs an IKE rekey.

            • RekeyFuzzPercentage (integer) --

              The percentage of the rekey window determined by RekeyMarginTimeSeconds during which the rekey time is randomly selected.

            • ReplayWindowSize (integer) --

              The number of packets in an IKE replay window.

            • DpdTimeoutSeconds (integer) --

              The number of seconds after which a DPD timeout occurs.

            • DpdTimeoutAction (string) --

              The action to take after a DPD timeout occurs.

            • Phase1EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the encryption algorithm.

            • Phase2EncryptionAlgorithms (list) --

              The permitted encryption algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The encryption algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The encryption algorithm.

            • Phase1IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 1 IKE negotiations.

                • Value (string) --

                  The value for the integrity algorithm.

            • Phase2IntegrityAlgorithms (list) --

              The permitted integrity algorithms for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The integrity algorithm for phase 2 IKE negotiations.

                • Value (string) --

                  The integrity algorithm.

            • Phase1DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 1 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • Phase2DHGroupNumbers (list) --

              The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE negotiations.

              • (dict) --

                The Diffie-Hellmann group number for phase 2 IKE negotiations.

                • Value (integer) --

                  The Diffie-Hellmann group number.

            • IkeVersions (list) --

              The IKE versions that are permitted for the VPN tunnel.

              • (dict) --

                The internet key exchange (IKE) version permitted for the VPN tunnel.

                • Value (string) --

                  The IKE version.

            • StartupAction (string) --

              The action to take when the establishing the VPN tunnels for a VPN connection.

      • Routes (list) --

        The static routes associated with the VPN connection.

        • (dict) --

          Describes a static route for a VPN connection.

          • DestinationCidrBlock (string) --

            The CIDR block associated with the local subnet of the customer data center.

          • Source (string) --

            Indicates how the routes were provided.

          • State (string) --

            The current state of the static route.

      • Tags (list) --

        Any tags assigned to the VPN connection.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

      • VgwTelemetry (list) --

        Information about the VPN tunnel.

        • (dict) --

          Describes telemetry for a VPN tunnel.

          • AcceptedRouteCount (integer) --

            The number of accepted routes.

          • LastStatusChange (datetime) --

            The date and time of the last change in status.

          • OutsideIpAddress (string) --

            The Internet-routable IP address of the virtual private gateway's outside interface.

          • Status (string) --

            The status of the VPN tunnel.

          • StatusMessage (string) --

            If an error occurs, a description of the error.

          • CertificateArn (string) --

            The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate.

monitor_instances(**kwargs)

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitor your instances using CloudWatch in the Amazon EC2 User Guide .

To disable detailed monitoring, see UnmonitorInstances .

See also: AWS API Documentation

Request Syntax

response = client.monitor_instances(
    InstanceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • InstanceIds (list) --

    [REQUIRED]

    The IDs of the instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

move_address_to_vpc(**kwargs)

Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the RestoreAddressToClassic request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.move_address_to_vpc(
    DryRun=True|False,
    PublicIp='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PublicIp (string) --

    [REQUIRED]

    The Elastic IP address.

Return type

dict

Returns

Response Syntax

{
    'AllocationId': 'string',
    'Status': 'MoveInProgress'|'InVpc'|'InClassic'
}

Response Structure

  • (dict) --

    • AllocationId (string) --

      The allocation ID for the Elastic IP address.

    • Status (string) --

      The status of the move of the IP address.

Examples

This example moves the specified Elastic IP address to the EC2-VPC platform.

response = client.move_address_to_vpc(
    PublicIp='54.123.4.56',
)

print(response)

Expected Output:

{
    'Status': 'MoveInProgress',
    'ResponseMetadata': {
        '...': '...',
    },
}
move_byoip_cidr_to_ipam(**kwargs)

Move an BYOIP IPv4 CIDR to IPAM from a public IPv4 pool.

If you already have an IPv4 BYOIP CIDR with Amazon Web Services, you can move the CIDR to IPAM from a public IPv4 pool. You cannot move an IPv6 CIDR to IPAM. If you are bringing a new IP address to Amazon Web Services for the first time, complete the steps in Tutorial: BYOIP address CIDRs to IPAM .

See also: AWS API Documentation

Request Syntax

response = client.move_byoip_cidr_to_ipam(
    DryRun=True|False,
    Cidr='string',
    IpamPoolId='string',
    IpamPoolOwner='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Cidr (string) --

    [REQUIRED]

    The BYOIP CIDR.

  • IpamPoolId (string) --

    [REQUIRED]

    The IPAM pool ID.

  • IpamPoolOwner (string) --

    [REQUIRED]

    The Amazon Web Services account ID of the owner of the IPAM pool.

Return type

dict

Returns

Response Syntax

{
    'ByoipCidr': {
        'Cidr': 'string',
        'Description': 'string',
        'StatusMessage': 'string',
        'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable'
    }
}

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about an address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP).

      • Cidr (string) --

        The address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

        Upon success, contains the ID of the address pool. Otherwise, contains an error message.

      • State (string) --

        The state of the address pool.

provision_byoip_cidr(**kwargs)

Provisions an IPv4 or IPv6 address range for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP) and creates a corresponding address pool. After the address range is provisioned, it is ready to be advertised using AdvertiseByoipCidr .

Amazon Web Services verifies that you own the address range and are authorized to advertise it. You must ensure that the address range is registered to you and that you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more information, see Bring your own IP addresses (BYOIP) in the Amazon Elastic Compute Cloud User Guide .

Provisioning an address range is an asynchronous operation, so the call returns immediately, but the address range is not ready to use until its status changes from pending-provision to provisioned . To monitor the status of an address range, use DescribeByoipCidrs . To allocate an Elastic IP address from your IPv4 address pool, use AllocateAddress with either the specific address from the address pool or the ID of the address pool.

See also: AWS API Documentation

Request Syntax

response = client.provision_byoip_cidr(
    Cidr='string',
    CidrAuthorizationContext={
        'Message': 'string',
        'Signature': 'string'
    },
    PubliclyAdvertisable=True|False,
    Description='string',
    DryRun=True|False,
    PoolTagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    MultiRegion=True|False
)
Parameters
  • Cidr (string) --

    [REQUIRED]

    The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 prefix that you can specify is /24. The most specific IPv6 prefix you can specify is /56. The address range cannot overlap with another address range that you've brought to this or another Region.

  • CidrAuthorizationContext (dict) --

    A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.

    • Message (string) -- [REQUIRED]

      The plain-text authorization message for the prefix and account.

    • Signature (string) -- [REQUIRED]

      The signed authorization message for the prefix and account.

  • PubliclyAdvertisable (boolean) --

    (IPv6 only) Indicate whether the address range will be publicly advertised to the internet.

    Default: true

  • Description (string) -- A description for the address range and the address pool.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PoolTagSpecifications (list) --

    The tags to apply to the address pool.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • MultiRegion (boolean) -- Reserved.
Return type

dict

Returns

Response Syntax

{
    'ByoipCidr': {
        'Cidr': 'string',
        'Description': 'string',
        'StatusMessage': 'string',
        'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable'
    }
}

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address range.

      • Cidr (string) --

        The address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

        Upon success, contains the ID of the address pool. Otherwise, contains an error message.

      • State (string) --

        The state of the address pool.

provision_ipam_pool_cidr(**kwargs)

Provision a CIDR to an IPAM pool. You can use this action to provision new CIDRs to a top-level pool or to transfer a CIDR from a top-level pool to a pool within it.

For more information, see Provision CIDRs to pools in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.provision_ipam_pool_cidr(
    DryRun=True|False,
    IpamPoolId='string',
    Cidr='string',
    CidrAuthorizationContext={
        'Message': 'string',
        'Signature': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool to which you want to assign a CIDR.

  • Cidr (string) -- The CIDR you want to assign to the IPAM pool.
  • CidrAuthorizationContext (dict) --

    A signed document that proves that you are authorized to bring a specified IP address range to Amazon using BYOIP. This option applies to public pools only.

    • Message (string) --

      The plain-text authorization message for the prefix and account.

    • Signature (string) --

      The signed authorization message for the prefix and account.

Return type

dict

Returns

Response Syntax

{
    'IpamPoolCidr': {
        'Cidr': 'string',
        'State': 'pending-provision'|'provisioned'|'failed-provision'|'pending-deprovision'|'deprovisioned'|'failed-deprovision'|'pending-import'|'failed-import',
        'FailureReason': {
            'Code': 'cidr-not-available',
            'Message': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • IpamPoolCidr (dict) --

      Information about the provisioned CIDR.

      • Cidr (string) --

        The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .

      • State (string) --

        The state of the CIDR.

      • FailureReason (dict) --

        Details related to why an IPAM pool CIDR failed to be provisioned.

        • Code (string) --

          An error code related to why an IPAM pool CIDR failed to be provisioned.

        • Message (string) --

          A message related to why an IPAM pool CIDR failed to be provisioned.

provision_public_ipv4_pool_cidr(**kwargs)

Provision a CIDR to a public IPv4 pool.

For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.provision_public_ipv4_pool_cidr(
    DryRun=True|False,
    IpamPoolId='string',
    PoolId='string',
    NetmaskLength=123
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool you would like to use to allocate this CIDR.

  • PoolId (string) --

    [REQUIRED]

    The ID of the public IPv4 pool you would like to use for this CIDR.

  • NetmaskLength (integer) --

    [REQUIRED]

    The netmask length of the CIDR you would like to allocate to the public IPv4 pool.

Return type

dict

Returns

Response Syntax

{
    'PoolId': 'string',
    'PoolAddressRange': {
        'FirstAddress': 'string',
        'LastAddress': 'string',
        'AddressCount': 123,
        'AvailableAddressCount': 123
    }
}

Response Structure

  • (dict) --

    • PoolId (string) --

      The ID of the pool that you want to provision the CIDR to.

    • PoolAddressRange (dict) --

      Describes an address range of an IPv4 address pool.

      • FirstAddress (string) --

        The first IP address in the range.

      • LastAddress (string) --

        The last IP address in the range.

      • AddressCount (integer) --

        The number of addresses in the range.

      • AvailableAddressCount (integer) --

        The number of available addresses in the range.

purchase_host_reservation(**kwargs)

Purchase a reservation with configurations that match those of your Dedicated Host. You must have active Dedicated Hosts in your account before you purchase a reservation. This action results in the specified reservation being purchased and charged to your account.

See also: AWS API Documentation

Request Syntax

response = client.purchase_host_reservation(
    ClientToken='string',
    CurrencyCode='USD',
    HostIdSet=[
        'string',
    ],
    LimitPrice='string',
    OfferingId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • ClientToken (string) -- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .
  • CurrencyCode (string) -- The currency in which the totalUpfrontPrice , LimitPrice , and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD .
  • HostIdSet (list) --

    [REQUIRED]

    The IDs of the Dedicated Hosts with which the reservation will be associated.

    • (string) --
  • LimitPrice (string) -- The specified limit is checked against the total upfront cost of the reservation (calculated as the offering's upfront cost multiplied by the host count). If the total upfront cost is greater than the specified price limit, the request fails. This is used to ensure that the purchase does not exceed the expected upfront cost of the purchase. At this time, the only supported currency is USD . For example, to indicate a limit price of USD 100, specify 100.00.
  • OfferingId (string) --

    [REQUIRED]

    The ID of the offering.

  • TagSpecifications (list) --

    The tags to apply to the Dedicated Host Reservation during purchase.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'ClientToken': 'string',
    'CurrencyCode': 'USD',
    'Purchase': [
        {
            'CurrencyCode': 'USD',
            'Duration': 123,
            'HostIdSet': [
                'string',
            ],
            'HostReservationId': 'string',
            'HourlyPrice': 'string',
            'InstanceFamily': 'string',
            'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
            'UpfrontPrice': 'string'
        },
    ],
    'TotalHourlyPrice': 'string',
    'TotalUpfrontPrice': 'string'
}

Response Structure

  • (dict) --

    • ClientToken (string) --

      Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .

    • CurrencyCode (string) --

      The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are specified. At this time, the only supported currency is USD .

    • Purchase (list) --

      Describes the details of the purchase.

      • (dict) --

        Describes the result of the purchase.

        • CurrencyCode (string) --

          The currency in which the UpfrontPrice and HourlyPrice amounts are specified. At this time, the only supported currency is USD .

        • Duration (integer) --

          The duration of the reservation's term in seconds.

        • HostIdSet (list) --

          The IDs of the Dedicated Hosts associated with the reservation.

          • (string) --
        • HostReservationId (string) --

          The ID of the reservation.

        • HourlyPrice (string) --

          The hourly price of the reservation per hour.

        • InstanceFamily (string) --

          The instance family on the Dedicated Host that the reservation can be associated with.

        • PaymentOption (string) --

          The payment option for the reservation.

        • UpfrontPrice (string) --

          The upfront price of the reservation.

    • TotalHourlyPrice (string) --

      The total hourly price of the reservation calculated per hour.

    • TotalUpfrontPrice (string) --

      The total amount charged to your account when you purchase the reservation.

purchase_reserved_instances_offering(**kwargs)

Purchases a Reserved Instance for use with your account. With Reserved Instances, you pay a lower hourly rate compared to On-Demand instance pricing.

Use DescribeReservedInstancesOfferings to get a list of Reserved Instance offerings that match your specifications. After you've purchased a Reserved Instance, you can check for your new Reserved Instance with DescribeReservedInstances .

To queue a purchase for a future date and time, specify a purchase time. If you do not specify a purchase time, the default is the current time.

For more information, see Reserved Instances and Reserved Instance Marketplace in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.purchase_reserved_instances_offering(
    InstanceCount=123,
    ReservedInstancesOfferingId='string',
    DryRun=True|False,
    LimitPrice={
        'Amount': 123.0,
        'CurrencyCode': 'USD'
    },
    PurchaseTime=datetime(2015, 1, 1)
)
Parameters
  • InstanceCount (integer) --

    [REQUIRED]

    The number of Reserved Instances to purchase.

  • ReservedInstancesOfferingId (string) --

    [REQUIRED]

    The ID of the Reserved Instance offering to purchase.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LimitPrice (dict) --

    Specified for Reserved Instance Marketplace offerings to limit the total order and ensure that the Reserved Instances are not purchased at unexpected prices.

    • Amount (float) --

      Used for Reserved Instance Marketplace offerings. Specifies the limit price on the total order (instanceCount * price).

    • CurrencyCode (string) --

      The currency in which the limitPrice amount is specified. At this time, the only supported currency is USD .

  • PurchaseTime (datetime) -- The time at which to purchase the Reserved Instance, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).
Return type

dict

Returns

Response Syntax

{
    'ReservedInstancesId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of PurchaseReservedInstancesOffering.

    • ReservedInstancesId (string) --

      The IDs of the purchased Reserved Instances. If your purchase crosses into a discounted pricing tier, the final Reserved Instances IDs might change. For more information, see Crossing pricing tiers in the Amazon Elastic Compute Cloud User Guide .

purchase_scheduled_instances(**kwargs)

Purchases the Scheduled Instances with the specified schedule.

Scheduled Instances enable you to purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you can purchase a Scheduled Instance, you must call DescribeScheduledInstanceAvailability to check for available schedules and obtain a purchase token. After you purchase a Scheduled Instance, you must call RunScheduledInstances during each scheduled time period.

After you purchase a Scheduled Instance, you can't cancel, modify, or resell your purchase.

See also: AWS API Documentation

Request Syntax

response = client.purchase_scheduled_instances(
    ClientToken='string',
    DryRun=True|False,
    PurchaseRequests=[
        {
            'InstanceCount': 123,
            'PurchaseToken': 'string'
        },
    ]
)
Parameters
  • ClientToken (string) --

    Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency .

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PurchaseRequests (list) --

    [REQUIRED]

    The purchase requests.

    • (dict) --

      Describes a request to purchase Scheduled Instances.

      • InstanceCount (integer) -- [REQUIRED]

        The number of instances.

      • PurchaseToken (string) -- [REQUIRED]

        The purchase token.

Return type

dict

Returns

Response Syntax

{
    'ScheduledInstanceSet': [
        {
            'AvailabilityZone': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'HourlyPrice': 'string',
            'InstanceCount': 123,
            'InstanceType': 'string',
            'NetworkPlatform': 'string',
            'NextSlotStartTime': datetime(2015, 1, 1),
            'Platform': 'string',
            'PreviousSlotEndTime': datetime(2015, 1, 1),
            'Recurrence': {
                'Frequency': 'string',
                'Interval': 123,
                'OccurrenceDaySet': [
                    123,
                ],
                'OccurrenceRelativeToEnd': True|False,
                'OccurrenceUnit': 'string'
            },
            'ScheduledInstanceId': 'string',
            'SlotDurationInHours': 123,
            'TermEndDate': datetime(2015, 1, 1),
            'TermStartDate': datetime(2015, 1, 1),
            'TotalScheduledInstanceHours': 123
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of PurchaseScheduledInstances.

    • ScheduledInstanceSet (list) --

      Information about the Scheduled Instances.

      • (dict) --

        Describes a Scheduled Instance.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        • AvailabilityZone (string) --

          The Availability Zone.

        • CreateDate (datetime) --

          The date when the Scheduled Instance was purchased.

        • HourlyPrice (string) --

          The hourly price for a single instance.

        • InstanceCount (integer) --

          The number of instances.

        • InstanceType (string) --

          The instance type.

        • NetworkPlatform (string) --

          The network platform (EC2-Classic or EC2-VPC ).

        • NextSlotStartTime (datetime) --

          The time for the next schedule to start.

        • Platform (string) --

          The platform (Linux/UNIX or Windows ).

        • PreviousSlotEndTime (datetime) --

          The time that the previous schedule ended or will end.

        • Recurrence (dict) --

          The schedule recurrence.

          • Frequency (string) --

            The frequency (Daily , Weekly , or Monthly ).

          • Interval (integer) --

            The interval quantity. The interval unit depends on the value of frequency . For example, every 2 weeks or every 2 months.

          • OccurrenceDaySet (list) --

            The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

            • (integer) --
          • OccurrenceRelativeToEnd (boolean) --

            Indicates whether the occurrence is relative to the end of the specified week or month.

          • OccurrenceUnit (string) --

            The unit for occurrenceDaySet (DayOfWeek or DayOfMonth ).

        • ScheduledInstanceId (string) --

          The Scheduled Instance ID.

        • SlotDurationInHours (integer) --

          The number of hours in the schedule.

        • TermEndDate (datetime) --

          The end date for the Scheduled Instance.

        • TermStartDate (datetime) --

          The start date for the Scheduled Instance.

        • TotalScheduledInstanceHours (integer) --

          The total number of hours for a single instance for the entire term.

Examples

This example purchases a Scheduled Instance.

response = client.purchase_scheduled_instances(
    PurchaseRequests=[
        {
            'InstanceCount': 1,
            'PurchaseToken': 'eyJ2IjoiMSIsInMiOjEsImMiOi...',
        },
    ],
)

print(response)

Expected Output:

{
    'ScheduledInstanceSet': [
        {
            'AvailabilityZone': 'us-west-2b',
            'CreateDate': datetime(2016, 1, 25, 21, 43, 38, 0, 25, 0),
            'HourlyPrice': '0.095',
            'InstanceCount': 1,
            'InstanceType': 'c4.large',
            'NetworkPlatform': 'EC2-VPC',
            'NextSlotStartTime': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
            'Platform': 'Linux/UNIX',
            'Recurrence': {
                'Frequency': 'Weekly',
                'Interval': 1,
                'OccurrenceDaySet': [
                    1,
                ],
                'OccurrenceRelativeToEnd': False,
                'OccurrenceUnit': '',
            },
            'ScheduledInstanceId': 'sci-1234-1234-1234-1234-123456789012',
            'SlotDurationInHours': 32,
            'TermEndDate': datetime(2017, 1, 31, 9, 0, 0, 1, 31, 0),
            'TermStartDate': datetime(2016, 1, 31, 9, 0, 0, 6, 31, 0),
            'TotalScheduledInstanceHours': 1696,
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
reboot_instances(**kwargs)

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Troubleshoot an unreachable instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.reboot_instances(
    InstanceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • InstanceIds (list) --

    [REQUIRED]

    The instance IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example reboots the specified EC2 instance.

response = client.reboot_instances(
    InstanceIds=[
        'i-1234567890abcdef5',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
register_image(**kwargs)

Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating your own AMIs in the Amazon Elastic Compute Cloud User Guide .

Note

For Amazon EBS-backed instances, CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself. We recommend that you always use CreateImage unless you have a specific reason to use RegisterImage.

If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.

Register a snapshot of a root device volume

You can use RegisterImage to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using a block device mapping. You can't set the encryption state of the volume using the block device mapping. If the snapshot is encrypted, or encryption by default is enabled, the root volume of an instance launched from the AMI is encrypted.

For more information, see Create a Linux AMI from a snapshot and Use encryption with Amazon EBS-backed AMIs in the Amazon Elastic Compute Cloud User Guide .

Amazon Web Services Marketplace product codes

If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new AMI.

Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the Amazon EC2 billing product code associated with an AMI to verify the subscription status for package updates. To create a new AMI for operating systems that require a billing product code, instead of registering the AMI, do the following to preserve the billing product code association:

  • Launch an instance from an existing AMI with that billing product code.
  • Customize the instance.
  • Create an AMI from the instance using CreateImage .

If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched from an AMI with a billing product code, make sure that the Reserved Instance has the matching billing product code. If you purchase a Reserved Instance without the matching billing product code, the Reserved Instance will not be applied to the On-Demand Instance. For information about how to obtain the platform details and billing information of an AMI, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.register_image(
    ImageLocation='string',
    Architecture='i386'|'x86_64'|'arm64'|'x86_64_mac',
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    Description='string',
    DryRun=True|False,
    EnaSupport=True|False,
    KernelId='string',
    Name='string',
    BillingProducts=[
        'string',
    ],
    RamdiskId='string',
    RootDeviceName='string',
    SriovNetSupport='string',
    VirtualizationType='string',
    BootMode='legacy-bios'|'uefi',
    TpmSupport='v2.0',
    UefiData='string'
)
Parameters
  • ImageLocation (string) -- The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the aws-exec-read canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see Canned ACLs in the Amazon S3 Service Developer Guide .
  • Architecture (string) --

    The architecture of the AMI.

    Default: For Amazon EBS-backed AMIs, i386 . For instance store-backed AMIs, the architecture specified in the manifest file.

  • BlockDeviceMappings (list) --

    The block device mapping entries.

    If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.

    If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

  • Description (string) -- A description for your AMI.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EnaSupport (boolean) --

    Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.

    This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

  • KernelId (string) -- The ID of the kernel.
  • Name (string) --

    [REQUIRED]

    A name for your AMI.

    Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

  • BillingProducts (list) --

    The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the Amazon Web Services Marketplace to bill for the use of an AMI.

    • (string) --
  • RamdiskId (string) -- The ID of the RAM disk.
  • RootDeviceName (string) -- The device name of the root device volume (for example, /dev/sda1 ).
  • SriovNetSupport (string) --

    Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.

    There is no way to disable sriovNetSupport at this time.

    This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

  • VirtualizationType (string) --

    The type of virtualization (hvm | paravirtual ).

    Default: paravirtual

  • BootMode (string) -- The boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide .
  • TpmSupport (string) -- Set to v2.0 to enable Trusted Platform Module (TPM) support. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide .
  • UefiData (string) -- Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot in the Amazon Elastic Compute Cloud User Guide .
Return type

dict

Returns

Response Syntax

{
    'ImageId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of RegisterImage.

    • ImageId (string) --

      The ID of the newly registered AMI.

register_instance_event_notification_attributes(**kwargs)

Registers a set of tag keys to include in scheduled event notifications for your resources.

To remove tags, use DeregisterInstanceEventNotificationAttributes .

See also: AWS API Documentation

Request Syntax

response = client.register_instance_event_notification_attributes(
    DryRun=True|False,
    InstanceTagAttribute={
        'IncludeAllTagsOfInstance': True|False,
        'InstanceTagKeys': [
            'string',
        ]
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTagAttribute (dict) --

    Information about the tag keys to register.

    • IncludeAllTagsOfInstance (boolean) --

      Indicates whether to register all tag keys in the current Region. Specify true to register all tag keys.

    • InstanceTagKeys (list) --

      The tag keys to register.

      • (string) --
Return type

dict

Returns

Response Syntax

{
    'InstanceTagAttribute': {
        'InstanceTagKeys': [
            'string',
        ],
        'IncludeAllTagsOfInstance': True|False
    }
}

Response Structure

  • (dict) --

    • InstanceTagAttribute (dict) --

      The resulting set of tag keys.

      • InstanceTagKeys (list) --

        The registered tag keys.

        • (string) --
      • IncludeAllTagsOfInstance (boolean) --

        Indicates wheter all tag keys in the current Region are registered to appear in scheduled event notifications. true indicates that all tag keys in the current Region are registered.

register_transit_gateway_multicast_group_members(**kwargs)

Registers members (network interfaces) with the transit gateway multicast group. A member is a network interface associated with a supported EC2 instance that receives multicast traffic. For information about supported instances, see Multicast Consideration in Amazon VPC Transit Gateways .

After you add the members, use SearchTransitGatewayMulticastGroups to verify that the members were added to the transit gateway multicast group.

See also: AWS API Documentation

Request Syntax

response = client.register_transit_gateway_multicast_group_members(
    TransitGatewayMulticastDomainId='string',
    GroupIpAddress='string',
    NetworkInterfaceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • GroupIpAddress (string) -- The IP address assigned to the transit gateway multicast group.
  • NetworkInterfaceIds (list) --

    The group members' network interface IDs to register with the transit gateway multicast group.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'RegisteredMulticastGroupMembers': {
        'TransitGatewayMulticastDomainId': 'string',
        'RegisteredNetworkInterfaceIds': [
            'string',
        ],
        'GroupIpAddress': 'string'
    }
}

Response Structure

  • (dict) --

    • RegisteredMulticastGroupMembers (dict) --

      Information about the registered transit gateway multicast group members.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • RegisteredNetworkInterfaceIds (list) --

        The ID of the registered network interfaces.

        • (string) --
      • GroupIpAddress (string) --

        The IP address assigned to the transit gateway multicast group.

register_transit_gateway_multicast_group_sources(**kwargs)

Registers sources (network interfaces) with the specified transit gateway multicast group.

A multicast source is a network interface attached to a supported instance that sends multicast traffic. For information about supported instances, see Multicast Considerations in Amazon VPC Transit Gateways .

After you add the source, use SearchTransitGatewayMulticastGroups to verify that the source was added to the multicast group.

See also: AWS API Documentation

Request Syntax

response = client.register_transit_gateway_multicast_group_sources(
    TransitGatewayMulticastDomainId='string',
    GroupIpAddress='string',
    NetworkInterfaceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • GroupIpAddress (string) -- The IP address assigned to the transit gateway multicast group.
  • NetworkInterfaceIds (list) --

    The group sources' network interface IDs to register with the transit gateway multicast group.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'RegisteredMulticastGroupSources': {
        'TransitGatewayMulticastDomainId': 'string',
        'RegisteredNetworkInterfaceIds': [
            'string',
        ],
        'GroupIpAddress': 'string'
    }
}

Response Structure

  • (dict) --

    • RegisteredMulticastGroupSources (dict) --

      Information about the transit gateway multicast group sources.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • RegisteredNetworkInterfaceIds (list) --

        The IDs of the network interfaces members registered with the transit gateway multicast group.

        • (string) --
      • GroupIpAddress (string) --

        The IP address assigned to the transit gateway multicast group.

reject_transit_gateway_multicast_domain_associations(**kwargs)

Rejects a request to associate cross-account subnets with a transit gateway multicast domain.

See also: AWS API Documentation

Request Syntax

response = client.reject_transit_gateway_multicast_domain_associations(
    TransitGatewayMulticastDomainId='string',
    TransitGatewayAttachmentId='string',
    SubnetIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • TransitGatewayAttachmentId (string) -- The ID of the transit gateway attachment.
  • SubnetIds (list) --

    The IDs of the subnets to associate with the transit gateway multicast domain.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Associations': {
        'TransitGatewayMulticastDomainId': 'string',
        'TransitGatewayAttachmentId': 'string',
        'ResourceId': 'string',
        'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
        'ResourceOwnerId': 'string',
        'Subnets': [
            {
                'SubnetId': 'string',
                'State': 'pendingAcceptance'|'associating'|'associated'|'disassociating'|'disassociated'|'rejected'|'failed'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Associations (dict) --

      Describes the multicast domain associations.

      • TransitGatewayMulticastDomainId (string) --

        The ID of the transit gateway multicast domain.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway attachment.

      • ResourceId (string) --

        The ID of the resource.

      • ResourceType (string) --

        The type of resource, for example a VPC attachment.

      • ResourceOwnerId (string) --

        The ID of the Amazon Web Services account that owns the resource.

      • Subnets (list) --

        The subnets associated with the multicast domain.

        • (dict) --

          Describes the subnet association with the transit gateway multicast domain.

          • SubnetId (string) --

            The ID of the subnet.

          • State (string) --

            The state of the subnet association.

reject_transit_gateway_peering_attachment(**kwargs)

Rejects a transit gateway peering attachment request.

See also: AWS API Documentation

Request Syntax

response = client.reject_transit_gateway_peering_attachment(
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the transit gateway peering attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPeeringAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'AccepterTransitGatewayAttachmentId': 'string',
        'RequesterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'AccepterTgwInfo': {
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'OwnerId': 'string',
            'Region': 'string'
        },
        'Options': {
            'DynamicRouting': 'enable'|'disable'
        },
        'Status': {
            'Code': 'string',
            'Message': 'string'
        },
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'CreationTime': datetime(2015, 1, 1),
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayPeeringAttachment (dict) --

      The transit gateway peering attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the transit gateway peering attachment.

      • AccepterTransitGatewayAttachmentId (string) --

        The ID of the accepter transit gateway attachment.

      • RequesterTgwInfo (dict) --

        Information about the requester transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • AccepterTgwInfo (dict) --

        Information about the accepter transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network where the transit gateway peer is located.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Region (string) --

          The Region of the transit gateway.

      • Options (dict) --

        Details about the transit gateway peering attachment.

        • DynamicRouting (string) --

          Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.

      • Status (dict) --

        The status of the transit gateway peering attachment.

        • Code (string) --

          The status code.

        • Message (string) --

          The status message, if applicable.

      • State (string) --

        The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

      • CreationTime (datetime) --

        The time the transit gateway peering attachment was created.

      • Tags (list) --

        The tags for the transit gateway peering attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

reject_transit_gateway_vpc_attachment(**kwargs)

Rejects a request to attach a VPC to a transit gateway.

The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment to accept a VPC attachment request.

See also: AWS API Documentation

Request Syntax

response = client.reject_transit_gateway_vpc_attachment(
    TransitGatewayAttachmentId='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TransitGatewayVpcAttachment': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayId': 'string',
        'VpcId': 'string',
        'VpcOwnerId': 'string',
        'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
        'SubnetIds': [
            'string',
        ],
        'CreationTime': datetime(2015, 1, 1),
        'Options': {
            'DnsSupport': 'enable'|'disable',
            'Ipv6Support': 'enable'|'disable',
            'ApplianceModeSupport': 'enable'|'disable'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • TransitGatewayVpcAttachment (dict) --

      Information about the attachment.

      • TransitGatewayAttachmentId (string) --

        The ID of the attachment.

      • TransitGatewayId (string) --

        The ID of the transit gateway.

      • VpcId (string) --

        The ID of the VPC.

      • VpcOwnerId (string) --

        The ID of the Amazon Web Services account that owns the VPC.

      • State (string) --

        The state of the VPC attachment. Note that the initiating state has been deprecated.

      • SubnetIds (list) --

        The IDs of the subnets.

        • (string) --
      • CreationTime (datetime) --

        The creation time.

      • Options (dict) --

        The VPC attachment options.

        • DnsSupport (string) --

          Indicates whether DNS support is enabled.

        • Ipv6Support (string) --

          Indicates whether IPv6 support is disabled.

        • ApplianceModeSupport (string) --

          Indicates whether appliance mode support is enabled.

      • Tags (list) --

        The tags for the VPC attachment.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

reject_vpc_endpoint_connections(**kwargs)

Rejects one or more VPC endpoint connection requests to your VPC endpoint service.

See also: AWS API Documentation

Request Syntax

response = client.reject_vpc_endpoint_connections(
    DryRun=True|False,
    ServiceId='string',
    VpcEndpointIds=[
        'string',
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the service.

  • VpcEndpointIds (list) --

    [REQUIRED]

    The IDs of one or more VPC endpoints.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Unsuccessful (list) --

      Information about the endpoints that were not rejected, if applicable.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

reject_vpc_peering_connection(**kwargs)

Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use DeleteVpcPeeringConnection .

See also: AWS API Documentation

Request Syntax

response = client.reject_vpc_peering_connection(
    DryRun=True|False,
    VpcPeeringConnectionId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionId (string) --

    [REQUIRED]

    The ID of the VPC peering connection.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

release_address(**kwargs)

Releases the specified Elastic IP address.

[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use DisassociateAddress .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

[Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse ).

After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another Amazon Web Services account.

[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see AllocateAddress .

For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.release_address(
    AllocationId='string',
    PublicIp='string',
    NetworkBorderGroup='string',
    DryRun=True|False
)
Parameters
  • AllocationId (string) -- [EC2-VPC] The allocation ID. Required for EC2-VPC.
  • PublicIp (string) -- [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
  • NetworkBorderGroup (string) --

    The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

    If you provide an incorrect network border group, you receive an InvalidAddress.NotFound error.

    You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you receive an InvalidParameterCombination error.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example releases an Elastic IP address for use with instances in a VPC.

response = client.release_address(
    AllocationId='eipalloc-64d5890a',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example releases an Elastic IP address for use with instances in EC2-Classic.

response = client.release_address(
    PublicIp='198.51.100.0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
release_hosts(**kwargs)

When you no longer want to use an On-Demand Dedicated Host it can be released. On-Demand billing is stopped and the host goes into released state. The host ID of Dedicated Hosts that have been released can no longer be specified in another request, for example, to modify the host. You must stop or terminate all instances on a host before it can be released.

When Dedicated Hosts are released, it may take some time for them to stop counting toward your limit and you may receive capacity errors when trying to allocate new Dedicated Hosts. Wait a few minutes and then try again.

Released hosts still appear in a DescribeHosts response.

See also: AWS API Documentation

Request Syntax

response = client.release_hosts(
    HostIds=[
        'string',
    ]
)
Parameters
HostIds (list) --

[REQUIRED]

The IDs of the Dedicated Hosts to release.

  • (string) --
Return type
dict
Returns
Response Syntax
{
    'Successful': [
        'string',
    ],
    'Unsuccessful': [
        {
            'Error': {
                'Code': 'string',
                'Message': 'string'
            },
            'ResourceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • Successful (list) --

      The IDs of the Dedicated Hosts that were successfully released.

      • (string) --
    • Unsuccessful (list) --

      The IDs of the Dedicated Hosts that could not be released, including an error message.

      • (dict) --

        Information about items that were not successfully processed in a batch call.

        • Error (dict) --

          Information about the error.

          • Code (string) --

            The error code.

          • Message (string) --

            The error message accompanying the error code.

        • ResourceId (string) --

          The ID of the resource.

release_ipam_pool_allocation(**kwargs)

Release an allocation within an IPAM pool. You can only use this action to release manual allocations. To remove an allocation for a resource without deleting the resource, set its monitored state to false using ModifyIpamResourceCidr . For more information, see Release an allocation in the Amazon VPC IPAM User Guide .

See also: AWS API Documentation

Request Syntax

response = client.release_ipam_pool_allocation(
    DryRun=True|False,
    IpamPoolId='string',
    Cidr='string',
    IpamPoolAllocationId='string'
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool which contains the allocation you want to release.

  • Cidr (string) --

    [REQUIRED]

    The CIDR of the allocation you want to release.

  • IpamPoolAllocationId (string) --

    [REQUIRED]

    The ID of the allocation.

Return type

dict

Returns

Response Syntax

{
    'Success': True|False
}

Response Structure

  • (dict) --

    • Success (boolean) --

      Indicates if the release was successful.

replace_iam_instance_profile_association(**kwargs)

Replaces an IAM instance profile for the specified running instance. You can use this action to change the IAM instance profile that's associated with an instance without having to disassociate the existing IAM instance profile first.

Use DescribeIamInstanceProfileAssociations to get the association ID.

See also: AWS API Documentation

Request Syntax

response = client.replace_iam_instance_profile_association(
    IamInstanceProfile={
        'Arn': 'string',
        'Name': 'string'
    },
    AssociationId='string'
)
Parameters
  • IamInstanceProfile (dict) --

    [REQUIRED]

    The IAM instance profile.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the instance profile.

    • Name (string) --

      The name of the instance profile.

  • AssociationId (string) --

    [REQUIRED]

    The ID of the existing IAM instance profile association.

Return type

dict

Returns

Response Syntax

{
    'IamInstanceProfileAssociation': {
        'AssociationId': 'string',
        'InstanceId': 'string',
        'IamInstanceProfile': {
            'Arn': 'string',
            'Id': 'string'
        },
        'State': 'associating'|'associated'|'disassociating'|'disassociated',
        'Timestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • IamInstanceProfileAssociation (dict) --

      Information about the IAM instance profile association.

      • AssociationId (string) --

        The ID of the association.

      • InstanceId (string) --

        The ID of the instance.

      • IamInstanceProfile (dict) --

        The IAM instance profile.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the instance profile.

        • Id (string) --

          The ID of the instance profile.

      • State (string) --

        The state of the association.

      • Timestamp (datetime) --

        The time the IAM instance profile was associated with the instance.

replace_network_acl_association(**kwargs)

Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

This is an idempotent operation.

See also: AWS API Documentation

Request Syntax

response = client.replace_network_acl_association(
    AssociationId='string',
    DryRun=True|False,
    NetworkAclId='string'
)
Parameters
  • AssociationId (string) --

    [REQUIRED]

    The ID of the current association between the original network ACL and the subnet.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkAclId (string) --

    [REQUIRED]

    The ID of the new network ACL to associate with the subnet.

Return type

dict

Returns

Response Syntax

{
    'NewAssociationId': 'string'
}

Response Structure

  • (dict) --

    • NewAssociationId (string) --

      The ID of the new association.

Examples

This example associates the specified network ACL with the subnet for the specified network ACL association.

response = client.replace_network_acl_association(
    AssociationId='aclassoc-e5b95c8c',
    NetworkAclId='acl-5fb85d36',
)

print(response)

Expected Output:

{
    'NewAssociationId': 'aclassoc-3999875b',
    'ResponseMetadata': {
        '...': '...',
    },
}
replace_network_acl_entry(**kwargs)

Replaces an entry (rule) in a network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.replace_network_acl_entry(
    CidrBlock='string',
    DryRun=True|False,
    Egress=True|False,
    IcmpTypeCode={
        'Code': 123,
        'Type': 123
    },
    Ipv6CidrBlock='string',
    NetworkAclId='string',
    PortRange={
        'From': 123,
        'To': 123
    },
    Protocol='string',
    RuleAction='allow'|'deny',
    RuleNumber=123
)
Parameters
  • CidrBlock (string) -- The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ).
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Egress (boolean) --

    [REQUIRED]

    Indicates whether to replace the egress rule.

    Default: If no value is specified, we replace the ingress rule.

  • IcmpTypeCode (dict) --

    ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

    • Code (integer) --

      The ICMP code. A value of -1 means all codes for the specified ICMP type.

    • Type (integer) --

      The ICMP type. A value of -1 means all types.

  • Ipv6CidrBlock (string) -- The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64 ).
  • NetworkAclId (string) --

    [REQUIRED]

    The ID of the ACL.

  • PortRange (dict) --

    TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

    • From (integer) --

      The first port in the range.

    • To (integer) --

      The last port in the range.

  • Protocol (string) --

    [REQUIRED]

    The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

  • RuleAction (string) --

    [REQUIRED]

    Indicates whether to allow or deny the traffic that matches the rule.

  • RuleNumber (integer) --

    [REQUIRED]

    The rule number of the entry to replace.

Returns

None

Examples

This example replaces an entry for the specified network ACL. The new rule 100 allows ingress traffic from 203.0.113.12/24 on UDP port 53 (DNS) into any associated subnet.

response = client.replace_network_acl_entry(
    CidrBlock='203.0.113.12/24',
    Egress=False,
    NetworkAclId='acl-5fb85d36',
    PortRange={
        'From': 53,
        'To': 53,
    },
    Protocol='17',
    RuleAction='allow',
    RuleNumber=100,
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
replace_route(**kwargs)

Replaces an existing route within a route table in a VPC.

You must specify either a destination CIDR block or a prefix list ID. You must also specify exactly one of the resources from the parameter list, or reset the local route to its default target.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.replace_route(
    DestinationCidrBlock='string',
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    VpcEndpointId='string',
    EgressOnlyInternetGatewayId='string',
    GatewayId='string',
    InstanceId='string',
    LocalTarget=True|False,
    NatGatewayId='string',
    TransitGatewayId='string',
    LocalGatewayId='string',
    CarrierGatewayId='string',
    NetworkInterfaceId='string',
    RouteTableId='string',
    VpcPeeringConnectionId='string',
    CoreNetworkArn='string'
)
Parameters
  • DestinationCidrBlock (string) -- The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.
  • DestinationIpv6CidrBlock (string) -- The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.
  • DestinationPrefixListId (string) -- The ID of the prefix list for the route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointId (string) -- The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
  • EgressOnlyInternetGatewayId (string) -- [IPv6 traffic only] The ID of an egress-only internet gateway.
  • GatewayId (string) -- The ID of an internet gateway or virtual private gateway.
  • InstanceId (string) -- The ID of a NAT instance in your VPC.
  • LocalTarget (boolean) -- Specifies whether to reset the local route to its default target (local ).
  • NatGatewayId (string) -- [IPv4 traffic only] The ID of a NAT gateway.
  • TransitGatewayId (string) -- The ID of a transit gateway.
  • LocalGatewayId (string) -- The ID of the local gateway.
  • CarrierGatewayId (string) -- [IPv4 traffic only] The ID of a carrier gateway.
  • NetworkInterfaceId (string) -- The ID of a network interface.
  • RouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

  • VpcPeeringConnectionId (string) -- The ID of a VPC peering connection.
  • CoreNetworkArn (string) -- The Amazon Resource Name (ARN) of the core network.
Returns

None

Examples

This example replaces the specified route in the specified table table. The new route matches the specified CIDR and sends the traffic to the specified virtual private gateway.

response = client.replace_route(
    DestinationCidrBlock='10.0.0.0/16',
    GatewayId='vgw-9a4cacf3',
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
replace_route_table_association(**kwargs)

Changes the route table associated with a given subnet, internet gateway, or virtual private gateway in a VPC. After the operation completes, the subnet or gateway uses the routes in the new route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

You can also use this operation to change which table is the main route table in the VPC. Specify the main route table's association ID and the route table ID of the new main route table.

See also: AWS API Documentation

Request Syntax

response = client.replace_route_table_association(
    AssociationId='string',
    DryRun=True|False,
    RouteTableId='string'
)
Parameters
  • AssociationId (string) --

    [REQUIRED]

    The association ID.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableId (string) --

    [REQUIRED]

    The ID of the new route table to associate with the subnet.

Return type

dict

Returns

Response Syntax

{
    'NewAssociationId': 'string',
    'AssociationState': {
        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failed',
        'StatusMessage': 'string'
    }
}

Response Structure

  • (dict) --

    • NewAssociationId (string) --

      The ID of the new association.

    • AssociationState (dict) --

      The state of the association.

      • State (string) --

        The state of the association.

      • StatusMessage (string) --

        The status message, if applicable.

Examples

This example associates the specified route table with the subnet for the specified route table association.

response = client.replace_route_table_association(
    AssociationId='rtbassoc-781d0d1a',
    RouteTableId='rtb-22574640',
)

print(response)

Expected Output:

{
    'NewAssociationId': 'rtbassoc-3a1f0f58',
    'ResponseMetadata': {
        '...': '...',
    },
}
replace_transit_gateway_route(**kwargs)

Replaces the specified route in the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.replace_transit_gateway_route(
    DestinationCidrBlock='string',
    TransitGatewayRouteTableId='string',
    TransitGatewayAttachmentId='string',
    Blackhole=True|False,
    DryRun=True|False
)
Parameters
  • DestinationCidrBlock (string) --

    [REQUIRED]

    The CIDR range used for the destination match. Routing decisions are based on the most specific match.

  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the route table.

  • TransitGatewayAttachmentId (string) -- The ID of the attachment.
  • Blackhole (boolean) -- Indicates whether traffic matching this route is to be dropped.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Route': {
        'DestinationCidrBlock': 'string',
        'PrefixListId': 'string',
        'TransitGatewayRouteTableAnnouncementId': 'string',
        'TransitGatewayAttachments': [
            {
                'ResourceId': 'string',
                'TransitGatewayAttachmentId': 'string',
                'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'
            },
        ],
        'Type': 'static'|'propagated',
        'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted'
    }
}

Response Structure

  • (dict) --

    • Route (dict) --

      Information about the modified route.

      • DestinationCidrBlock (string) --

        The CIDR block used for destination matches.

      • PrefixListId (string) --

        The ID of the prefix list used for destination matches.

      • TransitGatewayRouteTableAnnouncementId (string) --

        The ID of the transit gateway route table announcement.

      • TransitGatewayAttachments (list) --

        The attachments.

        • (dict) --

          Describes a route attachment.

          • ResourceId (string) --

            The ID of the resource.

          • TransitGatewayAttachmentId (string) --

            The ID of the attachment.

          • ResourceType (string) --

            The resource type. Note that the tgw-peering resource type has been deprecated.

      • Type (string) --

        The route type.

      • State (string) --

        The state of the route.

report_instance_status(**kwargs)

Submits feedback about the status of an instance. The instance must be in the running state. If your experience with the instance differs from the instance status returned by DescribeInstanceStatus , use ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

Use of this action does not change the value returned by DescribeInstanceStatus .

See also: AWS API Documentation

Request Syntax

response = client.report_instance_status(
    Description='string',
    DryRun=True|False,
    EndTime=datetime(2015, 1, 1),
    Instances=[
        'string',
    ],
    ReasonCodes=[
        'instance-stuck-in-state'|'unresponsive'|'not-accepting-credentials'|'password-not-available'|'performance-network'|'performance-instance-store'|'performance-ebs-volume'|'performance-other'|'other',
    ],
    StartTime=datetime(2015, 1, 1),
    Status='ok'|'impaired'
)
Parameters
  • Description (string) -- Descriptive text about the health state of your instance.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EndTime (datetime) -- The time at which the reported instance health state ended.
  • Instances (list) --

    [REQUIRED]

    The instances.

    • (string) --
  • ReasonCodes (list) --

    [REQUIRED]

    The reason codes that describe the health state of your instance.

    • instance-stuck-in-state : My instance is stuck in a state.
    • unresponsive : My instance is unresponsive.
    • not-accepting-credentials : My instance is not accepting my credentials.
    • password-not-available : A password is not available for my instance.
    • performance-network : My instance is experiencing performance problems that I believe are network related.
    • performance-instance-store : My instance is experiencing performance problems that I believe are related to the instance stores.
    • performance-ebs-volume : My instance is experiencing performance problems that I believe are related to an EBS volume.
    • performance-other : My instance is experiencing performance problems.
    • other : [explain using the description parameter]
    • (string) --
  • StartTime (datetime) -- The time at which the reported instance health state began.
  • Status (string) --

    [REQUIRED]

    The status of all instances listed.

Returns

None

request_spot_fleet(**kwargs)

Creates a Spot Fleet request.

The Spot Fleet request specifies the total target capacity and the On-Demand target capacity. Amazon EC2 calculates the difference between the total capacity and On-Demand capacity, and launches the difference as Spot capacity.

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 Instance 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.

You can specify tags for the Spot Fleet request and instances launched by the fleet. You cannot tag other resource types in a Spot Fleet request because only the spot-fleet-request and instance resource types are supported.

For more information, see Spot Fleet requests in the Amazon EC2 User Guide for Linux Instances .

Warning

We strongly discourage using the RequestSpotFleet API because it is a legacy API with no planned investment. For options for requesting Spot Instances, see Which is the best Spot request method to use? in the Amazon EC2 User Guide for Linux Instances .

See also: AWS API Documentation

Request Syntax

response = client.request_spot_fleet(
    DryRun=True|False,
    SpotFleetRequestConfig={
        'AllocationStrategy': 'lowestPrice'|'diversified'|'capacityOptimized'|'capacityOptimizedPrioritized',
        'OnDemandAllocationStrategy': 'lowestPrice'|'prioritized',
        'SpotMaintenanceStrategies': {
            'CapacityRebalance': {
                'ReplacementStrategy': 'launch'|'launch-before-terminate',
                'TerminationDelay': 123
            }
        },
        'ClientToken': 'string',
        'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
        'FulfilledCapacity': 123.0,
        'OnDemandFulfilledCapacity': 123.0,
        'IamFleetRole': 'string',
        'LaunchSpecifications': [
            {
                'SecurityGroups': [
                    {
                        'GroupName': 'string',
                        'GroupId': 'string'
                    },
                ],
                'AddressingType': 'string',
                'BlockDeviceMappings': [
                    {
                        'DeviceName': 'string',
                        'VirtualName': 'string',
                        'Ebs': {
                            'DeleteOnTermination': True|False,
                            'Iops': 123,
                            'SnapshotId': 'string',
                            'VolumeSize': 123,
                            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                            'KmsKeyId': 'string',
                            'Throughput': 123,
                            'OutpostArn': 'string',
                            'Encrypted': True|False
                        },
                        'NoDevice': 'string'
                    },
                ],
                'EbsOptimized': True|False,
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Name': 'string'
                },
                'ImageId': 'string',
                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                'KernelId': 'string',
                'KeyName': 'string',
                'Monitoring': {
                    'Enabled': True|False
                },
                'NetworkInterfaces': [
                    {
                        'AssociatePublicIpAddress': True|False,
                        'DeleteOnTermination': True|False,
                        'Description': 'string',
                        'DeviceIndex': 123,
                        'Groups': [
                            'string',
                        ],
                        'Ipv6AddressCount': 123,
                        'Ipv6Addresses': [
                            {
                                'Ipv6Address': 'string'
                            },
                        ],
                        'NetworkInterfaceId': 'string',
                        'PrivateIpAddress': 'string',
                        'PrivateIpAddresses': [
                            {
                                'Primary': True|False,
                                'PrivateIpAddress': 'string'
                            },
                        ],
                        'SecondaryPrivateIpAddressCount': 123,
                        'SubnetId': 'string',
                        'AssociateCarrierIpAddress': True|False,
                        'InterfaceType': 'string',
                        'NetworkCardIndex': 123,
                        'Ipv4Prefixes': [
                            {
                                'Ipv4Prefix': 'string'
                            },
                        ],
                        'Ipv4PrefixCount': 123,
                        'Ipv6Prefixes': [
                            {
                                'Ipv6Prefix': 'string'
                            },
                        ],
                        'Ipv6PrefixCount': 123
                    },
                ],
                'Placement': {
                    'AvailabilityZone': 'string',
                    'GroupName': 'string',
                    'Tenancy': 'default'|'dedicated'|'host'
                },
                'RamdiskId': 'string',
                'SpotPrice': 'string',
                'SubnetId': 'string',
                'UserData': 'string',
                'WeightedCapacity': 123.0,
                'TagSpecifications': [
                    {
                        'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                        'Tags': [
                            {
                                'Key': 'string',
                                'Value': 'string'
                            },
                        ]
                    },
                ],
                'InstanceRequirements': {
                    'VCpuCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'MemoryMiB': {
                        'Min': 123,
                        'Max': 123
                    },
                    'CpuManufacturers': [
                        'intel'|'amd'|'amazon-web-services',
                    ],
                    'MemoryGiBPerVCpu': {
                        'Min': 123.0,
                        'Max': 123.0
                    },
                    'ExcludedInstanceTypes': [
                        'string',
                    ],
                    'InstanceGenerations': [
                        'current'|'previous',
                    ],
                    'SpotMaxPricePercentageOverLowestPrice': 123,
                    'OnDemandMaxPricePercentageOverLowestPrice': 123,
                    'BareMetal': 'included'|'required'|'excluded',
                    'BurstablePerformance': 'included'|'required'|'excluded',
                    'RequireHibernateSupport': True|False,
                    'NetworkInterfaceCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'LocalStorage': 'included'|'required'|'excluded',
                    'LocalStorageTypes': [
                        'hdd'|'ssd',
                    ],
                    'TotalLocalStorageGB': {
                        'Min': 123.0,
                        'Max': 123.0
                    },
                    'BaselineEbsBandwidthMbps': {
                        'Min': 123,
                        'Max': 123
                    },
                    'AcceleratorTypes': [
                        'gpu'|'fpga'|'inference',
                    ],
                    'AcceleratorCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'AcceleratorManufacturers': [
                        'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                    ],
                    'AcceleratorNames': [
                        'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                    ],
                    'AcceleratorTotalMemoryMiB': {
                        'Min': 123,
                        'Max': 123
                    }
                }
            },
        ],
        'LaunchTemplateConfigs': [
            {
                'LaunchTemplateSpecification': {
                    'LaunchTemplateId': 'string',
                    'LaunchTemplateName': 'string',
                    'Version': 'string'
                },
                'Overrides': [
                    {
                        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                        'SpotPrice': 'string',
                        'SubnetId': 'string',
                        'AvailabilityZone': 'string',
                        'WeightedCapacity': 123.0,
                        'Priority': 123.0,
                        'InstanceRequirements': {
                            'VCpuCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'MemoryMiB': {
                                'Min': 123,
                                'Max': 123
                            },
                            'CpuManufacturers': [
                                'intel'|'amd'|'amazon-web-services',
                            ],
                            'MemoryGiBPerVCpu': {
                                'Min': 123.0,
                                'Max': 123.0
                            },
                            'ExcludedInstanceTypes': [
                                'string',
                            ],
                            'InstanceGenerations': [
                                'current'|'previous',
                            ],
                            'SpotMaxPricePercentageOverLowestPrice': 123,
                            'OnDemandMaxPricePercentageOverLowestPrice': 123,
                            'BareMetal': 'included'|'required'|'excluded',
                            'BurstablePerformance': 'included'|'required'|'excluded',
                            'RequireHibernateSupport': True|False,
                            'NetworkInterfaceCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'LocalStorage': 'included'|'required'|'excluded',
                            'LocalStorageTypes': [
                                'hdd'|'ssd',
                            ],
                            'TotalLocalStorageGB': {
                                'Min': 123.0,
                                'Max': 123.0
                            },
                            'BaselineEbsBandwidthMbps': {
                                'Min': 123,
                                'Max': 123
                            },
                            'AcceleratorTypes': [
                                'gpu'|'fpga'|'inference',
                            ],
                            'AcceleratorCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'AcceleratorManufacturers': [
                                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                            ],
                            'AcceleratorNames': [
                                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                            ],
                            'AcceleratorTotalMemoryMiB': {
                                'Min': 123,
                                'Max': 123
                            }
                        }
                    },
                ]
            },
        ],
        'SpotPrice': 'string',
        'TargetCapacity': 123,
        'OnDemandTargetCapacity': 123,
        'OnDemandMaxTotalPrice': 'string',
        'SpotMaxTotalPrice': 'string',
        'TerminateInstancesWithExpiration': True|False,
        'Type': 'request'|'maintain'|'instant',
        'ValidFrom': datetime(2015, 1, 1),
        'ValidUntil': datetime(2015, 1, 1),
        'ReplaceUnhealthyInstances': True|False,
        'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate',
        'LoadBalancersConfig': {
            'ClassicLoadBalancersConfig': {
                'ClassicLoadBalancers': [
                    {
                        'Name': 'string'
                    },
                ]
            },
            'TargetGroupsConfig': {
                'TargetGroups': [
                    {
                        'Arn': 'string'
                    },
                ]
            }
        },
        'InstancePoolsToUseCount': 123,
        'Context': 'string',
        'TargetCapacityUnitType': 'vcpu'|'memory-mib'|'units',
        'TagSpecifications': [
            {
                'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
        ]
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotFleetRequestConfig (dict) --

    [REQUIRED]

    The configuration for the Spot Fleet request.

    • AllocationStrategy (string) --

      Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet request.

      If the allocation strategy is lowestPrice , Spot Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.

      If the allocation strategy is diversified , Spot Fleet launches instances from all the Spot Instance pools that you specify.

      If the allocation strategy is capacityOptimized (recommended), Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacityOptimizedPrioritized . Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides . You can assign the same priority to different LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized is supported only if your Spot Fleet uses a launch template. Note that if the OnDemandAllocationStrategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity.

    • OnDemandAllocationStrategy (string) --

      The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice , Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized , Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice .

    • SpotMaintenanceStrategies (dict) --

      The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.

      • CapacityRebalance (dict) --

        The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see Capacity rebalancing in the Amazon EC2 User Guide for Linux Instances .

        • ReplacementStrategy (string) --

          The replacement strategy to use. Only available for fleets of type maintain .

          launch - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

          launch-before-terminate - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay ), terminates the instances that received a rebalance notification.

        • TerminationDelay (integer) --

          The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

          Required when ReplacementStrategy is set to launch-before-terminate .

          Not valid when ReplacementStrategy is set to launch .

          Valid values: Minimum value of 120 seconds. Maximum value of 7200 seconds.

    • ClientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency .

    • ExcessCapacityTerminationPolicy (string) --

      Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.

    • FulfilledCapacity (float) --

      The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.

    • OnDemandFulfilledCapacity (float) --

      The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.

    • IamFleetRole (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide for Linux Instances . Spot Fleet can 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) --

      The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications , you can't specify LaunchTemplateConfigs . If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs .

      • (dict) --

        Describes the launch specification for one or more Spot Instances. If you include On-Demand capacity in your fleet request or want to specify an EFA network device, you can't use SpotFleetLaunchSpecification ; you must use LaunchTemplateConfig .

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide for Linux Instances .

        • 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.

        • AddressingType (string) --

          Deprecated.

        • BlockDeviceMappings (list) --

          One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.

          • (dict) --

            Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

            • DeviceName (string) --

              The device name (for example, /dev/sdh or xvdh ).

            • 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.

              NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

              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.

            • Ebs (dict) --

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • DeleteOnTermination (boolean) --

                Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

              • Iops (integer) --

                The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                The following are the supported values for each volume type:

                • gp3 : 3,000-16,000 IOPS
                • io1 : 100-64,000 IOPS
                • io2 : 100-64,000 IOPS

                For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

                This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

              • SnapshotId (string) --

                The ID of the snapshot.

              • VolumeSize (integer) --

                The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                The following are the supported volumes sizes for each volume type:

                • gp2 and gp3 :1-16,384
                • io1 and io2 : 4-16,384
                • st1 and sc1 : 125-16,384
                • standard : 1-1,024
              • VolumeType (string) --

                The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

              • KmsKeyId (string) --

                Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

              • Throughput (integer) --

                The throughput that the volume supports, in MiB/s.

                This parameter is valid only for gp3 volumes.

                Valid Range: Minimum value of 125. Maximum value of 1000.

              • OutpostArn (string) --

                The ARN of the Outpost on which the snapshot is stored.

                This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

              • Encrypted (boolean) --

                Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

                In no case can you remove encryption from an encrypted volume.

                Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

                This parameter is not returned by DescribeImageAttribute .

            • NoDevice (string) --

              To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

        • 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

        • 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.

        • ImageId (string) --

          The ID of the AMI.

        • InstanceType (string) --

          The instance type.

        • KernelId (string) --

          The ID of the kernel.

        • KeyName (string) --

          The name of the key pair.

        • Monitoring (dict) --

          Enable or disable monitoring for the instances.

          • Enabled (boolean) --

            Enables monitoring for the instance.

            Default: false

        • NetworkInterfaces (list) --

          One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

          Note

          SpotFleetLaunchSpecification currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig .

          • (dict) --

            Describes a network interface.

            • AssociatePublicIpAddress (boolean) --

              Indicates whether to assign a public IPv4 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 .

            • 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.

            • Description (string) --

              The description of the network interface. Applies only if creating a network interface when launching an instance.

            • DeviceIndex (integer) --

              The position of the network interface in the attachment order. A primary network interface has a device index of 0.

              If you specify a network interface when launching an instance, you must specify the device index.

            • Groups (list) --

              The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

              • (string) --
            • Ipv6AddressCount (integer) --

              A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

            • Ipv6Addresses (list) --

              One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

              • (dict) --

                Describes an IPv6 address.

                • Ipv6Address (string) --

                  The IPv6 address.

            • NetworkInterfaceId (string) --

              The ID of the network interface.

              If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

            • PrivateIpAddress (string) --

              The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • PrivateIpAddresses (list) --

              One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • (dict) --

                Describes a secondary private IPv4 address for a network interface.

                • Primary (boolean) --

                  Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                • PrivateIpAddress (string) --

                  The private IPv4 addresses.

            • SecondaryPrivateIpAddressCount (integer) --

              The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

            • SubnetId (string) --

              The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

            • AssociateCarrierIpAddress (boolean) --

              Indicates whether to assign a carrier IP address to the network interface.

              You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

            • InterfaceType (string) --

              The type of network interface.

              Valid values: interface | efa

            • NetworkCardIndex (integer) --

              The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

              If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

            • Ipv4Prefixes (list) --

              One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

            • Ipv4PrefixCount (integer) --

              The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

            • Ipv6Prefixes (list) --

              One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

              • (dict) --

                Describes the IPv4 prefix option for a network interface.

                • Ipv6Prefix (string) --

                  The IPv6 prefix.

            • Ipv6PrefixCount (integer) --

              The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

        • 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.

          • 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 Spot Instances.

        • RamdiskId (string) --

          The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.

        • SpotPrice (string) --

          The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • SubnetId (string) --

          The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".

        • UserData (string) --

          The Base64-encoded user data that instances use when starting up.

        • 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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.

        • TagSpecifications (list) --

          The tags to apply during creation.

          • (dict) --

            The tags for a Spot Fleet resource.

            • ResourceType (string) --

              The type of resource. Currently, the only resource type that is supported is instance . To tag the Spot Fleet request on creation, use the TagSpecifications parameter in ` SpotFleetRequestConfigData https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html`__ .

            • Tags (list) --

              The tags.

              • (dict) --

                Describes a tag.

                • Key (string) --

                  The key of the tag.

                  Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

                • Value (string) --

                  The value of the tag.

                  Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • InstanceRequirements (dict) --

          The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

          Note

          If you specify InstanceRequirements , you can't specify InstanceTypes .

          • VCpuCount (dict) --

            The minimum and maximum number of vCPUs.

            • Min (integer) --

              The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

            • Max (integer) --

              The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

          • MemoryMiB (dict) --

            The minimum and maximum amount of memory, in MiB.

            • Min (integer) --

              The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • CpuManufacturers (list) --

            The CPU manufacturers to include.

            • For instance types with Intel CPUs, specify intel .
            • For instance types with AMD CPUs, specify amd .
            • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

            Note

            Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

            Default: Any manufacturer

            • (string) --
          • MemoryGiBPerVCpu (dict) --

            The minimum and maximum amount of memory per vCPU, in GiB.

            Default: No minimum or maximum limits

            • Min (float) --

              The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

            • Max (float) --

              The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

          • ExcludedInstanceTypes (list) --

            The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

            For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

            Default: No excluded instance types

            • (string) --
          • InstanceGenerations (list) --

            Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

            For current generation instance types, specify current .

            For previous generation instance types, specify previous .

            Default: Current and previous generation instance types

            • (string) --
          • SpotMaxPricePercentageOverLowestPrice (integer) --

            The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999 .

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

            Note

            If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

            Default: 100

          • OnDemandMaxPricePercentageOverLowestPrice (integer) --

            The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

            The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

            To turn off price protection, specify a high value, such as 999999 .

            This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

            Note

            If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

            Default: 20

          • BareMetal (string) --

            Indicates whether bare metal instance types must be included, excluded, or required.

            • To include bare metal instance types, specify included .
            • To require only bare metal instance types, specify required .
            • To exclude bare metal instance types, specify excluded .

            Default: excluded

          • BurstablePerformance (string) --

            Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

            • To include burstable performance instance types, specify included .
            • To require only burstable performance instance types, specify required .
            • To exclude burstable performance instance types, specify excluded .

            Default: excluded

          • RequireHibernateSupport (boolean) --

            Indicates whether instance types must support hibernation for On-Demand Instances.

            This parameter is not supported for GetSpotPlacementScores .

            Default: false

          • NetworkInterfaceCount (dict) --

            The minimum and maximum number of network interfaces.

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

          • LocalStorage (string) --

            Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

            • To include instance types with instance store volumes, specify included .
            • To require only instance types with instance store volumes, specify required .
            • To exclude instance types with instance store volumes, specify excluded .

            Default: included

          • LocalStorageTypes (list) --

            The type of local storage that is required.

            • For instance types with hard disk drive (HDD) storage, specify hdd .
            • For instance types with solid state drive (SSD) storage, specify ssd .

            Default: hdd and ssd

            • (string) --
          • TotalLocalStorageGB (dict) --

            The minimum and maximum amount of total local storage, in GB.

            Default: No minimum or maximum limits

            • Min (float) --

              The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

            • Max (float) --

              The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

          • BaselineEbsBandwidthMbps (dict) --

            The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

          • AcceleratorTypes (list) --

            The accelerator types that must be on the instance type.

            • For instance types with GPU accelerators, specify gpu .
            • For instance types with FPGA accelerators, specify fpga .
            • For instance types with inference accelerators, specify inference .

            Default: Any accelerator type

            • (string) --
          • AcceleratorCount (dict) --

            The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

            To exclude accelerator-enabled instance types, set Max to 0 .

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

          • AcceleratorManufacturers (list) --

            Indicates whether instance types must have accelerators by specific manufacturers.

            • For instance types with NVIDIA devices, specify nvidia .
            • For instance types with AMD devices, specify amd .
            • For instance types with Amazon Web Services devices, specify amazon-web-services .
            • For instance types with Xilinx devices, specify xilinx .

            Default: Any manufacturer

            • (string) --
          • AcceleratorNames (list) --

            The accelerators that must be on the instance type.

            • For instance types with NVIDIA A100 GPUs, specify a100 .
            • For instance types with NVIDIA V100 GPUs, specify v100 .
            • For instance types with NVIDIA K80 GPUs, specify k80 .
            • For instance types with NVIDIA T4 GPUs, specify t4 .
            • For instance types with NVIDIA M60 GPUs, specify m60 .
            • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
            • For instance types with Xilinx VU9P FPGAs, specify vu9p .

            Default: Any accelerator

            • (string) --
          • AcceleratorTotalMemoryMiB (dict) --

            The minimum and maximum amount of total accelerator memory, in MiB.

            Default: No minimum or maximum limits

            • Min (integer) --

              The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

            • Max (integer) --

              The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

    • LaunchTemplateConfigs (list) --

      The launch template and overrides. If you specify LaunchTemplateConfigs , you can't specify LaunchSpecifications . If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs .

      • (dict) --

        Describes a launch template and overrides.

        • LaunchTemplateSpecification (dict) --

          The launch template.

          • LaunchTemplateId (string) --

            The ID of the launch template.

            You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

          • LaunchTemplateName (string) --

            The name of the launch template.

            You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

          • Version (string) --

            The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

            If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

            If the value is $Default , Amazon EC2 uses the default version of the launch template.

        • Overrides (list) --

          Any parameters that you specify override the same parameters in the launch template.

          • (dict) --

            Describes overrides for a launch template.

            • InstanceType (string) --

              The instance type.

            • SpotPrice (string) --

              The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

              Warning

              If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

            • SubnetId (string) --

              The ID of the subnet in which to launch the instances.

            • AvailabilityZone (string) --

              The Availability Zone in which to launch the instances.

            • WeightedCapacity (float) --

              The number of units provided by the specified instance type.

            • Priority (float) --

              The priority for the launch template override. The highest priority is launched first.

              If OnDemandAllocationStrategy is set to prioritized , Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

              If the Spot AllocationStrategy is set to capacityOptimizedPrioritized , Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

              Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

            • InstanceRequirements (dict) --

              The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.

              Note

              If you specify InstanceRequirements , you can't specify InstanceTypes .

              • VCpuCount (dict) --

                The minimum and maximum number of vCPUs.

                • Min (integer) --

                  The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                • Max (integer) --

                  The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

              • MemoryMiB (dict) --

                The minimum and maximum amount of memory, in MiB.

                • Min (integer) --

                  The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

              • CpuManufacturers (list) --

                The CPU manufacturers to include.

                • For instance types with Intel CPUs, specify intel .
                • For instance types with AMD CPUs, specify amd .
                • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                Note

                Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                Default: Any manufacturer

                • (string) --
              • MemoryGiBPerVCpu (dict) --

                The minimum and maximum amount of memory per vCPU, in GiB.

                Default: No minimum or maximum limits

                • Min (float) --

                  The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                • Max (float) --

                  The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

              • ExcludedInstanceTypes (list) --

                The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                Default: No excluded instance types

                • (string) --
              • InstanceGenerations (list) --

                Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                For current generation instance types, specify current .

                For previous generation instance types, specify previous .

                Default: Current and previous generation instance types

                • (string) --
              • SpotMaxPricePercentageOverLowestPrice (integer) --

                The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999 .

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                Note

                If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                Default: 100

              • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                To turn off price protection, specify a high value, such as 999999 .

                This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                Note

                If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                Default: 20

              • BareMetal (string) --

                Indicates whether bare metal instance types must be included, excluded, or required.

                • To include bare metal instance types, specify included .
                • To require only bare metal instance types, specify required .
                • To exclude bare metal instance types, specify excluded .

                Default: excluded

              • BurstablePerformance (string) --

                Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                • To include burstable performance instance types, specify included .
                • To require only burstable performance instance types, specify required .
                • To exclude burstable performance instance types, specify excluded .

                Default: excluded

              • RequireHibernateSupport (boolean) --

                Indicates whether instance types must support hibernation for On-Demand Instances.

                This parameter is not supported for GetSpotPlacementScores .

                Default: false

              • NetworkInterfaceCount (dict) --

                The minimum and maximum number of network interfaces.

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

              • LocalStorage (string) --

                Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                • To include instance types with instance store volumes, specify included .
                • To require only instance types with instance store volumes, specify required .
                • To exclude instance types with instance store volumes, specify excluded .

                Default: included

              • LocalStorageTypes (list) --

                The type of local storage that is required.

                • For instance types with hard disk drive (HDD) storage, specify hdd .
                • For instance types with solid state drive (SSD) storage, specify ssd .

                Default: hdd and ssd

                • (string) --
              • TotalLocalStorageGB (dict) --

                The minimum and maximum amount of total local storage, in GB.

                Default: No minimum or maximum limits

                • Min (float) --

                  The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                • Max (float) --

                  The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

              • BaselineEbsBandwidthMbps (dict) --

                The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

              • AcceleratorTypes (list) --

                The accelerator types that must be on the instance type.

                • For instance types with GPU accelerators, specify gpu .
                • For instance types with FPGA accelerators, specify fpga .
                • For instance types with inference accelerators, specify inference .

                Default: Any accelerator type

                • (string) --
              • AcceleratorCount (dict) --

                The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                To exclude accelerator-enabled instance types, set Max to 0 .

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

              • AcceleratorManufacturers (list) --

                Indicates whether instance types must have accelerators by specific manufacturers.

                • For instance types with NVIDIA devices, specify nvidia .
                • For instance types with AMD devices, specify amd .
                • For instance types with Amazon Web Services devices, specify amazon-web-services .
                • For instance types with Xilinx devices, specify xilinx .

                Default: Any manufacturer

                • (string) --
              • AcceleratorNames (list) --

                The accelerators that must be on the instance type.

                • For instance types with NVIDIA A100 GPUs, specify a100 .
                • For instance types with NVIDIA V100 GPUs, specify v100 .
                • For instance types with NVIDIA K80 GPUs, specify k80 .
                • For instance types with NVIDIA T4 GPUs, specify t4 .
                • For instance types with NVIDIA M60 GPUs, specify m60 .
                • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                Default: Any accelerator

                • (string) --
              • AcceleratorTotalMemoryMiB (dict) --

                The minimum and maximum amount of total accelerator memory, in MiB.

                Default: No minimum or maximum limits

                • Min (integer) --

                  The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                • Max (integer) --

                  The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

    • SpotPrice (string) --

      The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

      Warning

      If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

    • TargetCapacity (integer) -- [REQUIRED]

      The number of units to request for the Spot Fleet. 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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

    • OnDemandTargetCapacity (integer) --

      The number of On-Demand 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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

    • OnDemandMaxTotalPrice (string) --

      The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice parameter, the spotMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

    • SpotMaxTotalPrice (string) --

      The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotdMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

    • TerminateInstancesWithExpiration (boolean) --

      Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.

    • Type (string) --

      The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request , the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain , the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain . instant is listed but is not used by Spot Fleet.

    • ValidFrom (datetime) --

      The start date and time of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). By default, Amazon EC2 starts fulfilling the request immediately.

    • ValidUntil (datetime) --

      The end date and time of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.

    • ReplaceUnhealthyInstances (boolean) --

      Indicates whether Spot Fleet should replace unhealthy instances.

    • InstanceInterruptionBehavior (string) --

      The behavior when a Spot Instance is interrupted. The default is terminate .

    • LoadBalancersConfig (dict) --

      One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.

      With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.

      • ClassicLoadBalancersConfig (dict) --

        The Classic Load Balancers.

        • ClassicLoadBalancers (list) --

          One or more Classic Load Balancers.

          • (dict) --

            Describes a Classic Load Balancer.

            • Name (string) --

              The name of the load balancer.

      • TargetGroupsConfig (dict) --

        The target groups.

        • TargetGroups (list) --

          One or more target groups.

          • (dict) --

            Describes a load balancer target group.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the target group.

    • InstancePoolsToUseCount (integer) --

      The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price . Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

      Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

    • Context (string) --

      Reserved.

    • TargetCapacityUnitType (string) --

      The unit for the target capacity.

      Default: units (translates to number of instances)

    • TagSpecifications (list) --

      The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType must be spot-fleet-request , otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs ) or in the ` SpotFleetTagSpecification https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html`__ (valid only if you use LaunchSpecifications ). For information about tagging after launch, see Tagging Your Resources .

      • (dict) --

        The tags to apply to a resource when the resource is being created.

        Note

        The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

        • ResourceType (string) --

          The type of resource to tag on creation.

        • Tags (list) --

          The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'SpotFleetRequestId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of RequestSpotFleet.

    • SpotFleetRequestId (string) --

      The ID of the Spot Fleet request.

Examples

This example creates a Spot fleet request with two launch specifications that differ only by subnet. The Spot fleet launches the instances in the specified subnet with the lowest price. If the instances are launched in a default VPC, they receive a public IP address by default. If the instances are launched in a nondefault VPC, they do not receive a public IP address by default. Note that you can't specify different subnets from the same Availability Zone in a Spot fleet request.

response = client.request_spot_fleet(
    SpotFleetRequestConfig={
        'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
        'LaunchSpecifications': [
            {
                'IamInstanceProfile': {
                    'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
                },
                'ImageId': 'ami-1a2b3c4d',
                'InstanceType': 'm3.medium',
                'KeyName': 'my-key-pair',
                'SecurityGroups': [
                    {
                        'GroupId': 'sg-1a2b3c4d',
                    },
                ],
                'SubnetId': 'subnet-1a2b3c4d, subnet-3c4d5e6f',
            },
        ],
        'SpotPrice': '0.04',
        'TargetCapacity': 2,
    },
)

print(response)

Expected Output:

{
    'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example creates a Spot fleet request with two launch specifications that differ only by Availability Zone. The Spot fleet launches the instances in the specified Availability Zone with the lowest price. If your account supports EC2-VPC only, Amazon EC2 launches the Spot instances in the default subnet of the Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the Availability Zone.

response = client.request_spot_fleet(
    SpotFleetRequestConfig={
        'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
        'LaunchSpecifications': [
            {
                'IamInstanceProfile': {
                    'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
                },
                'ImageId': 'ami-1a2b3c4d',
                'InstanceType': 'm3.medium',
                'KeyName': 'my-key-pair',
                'Placement': {
                    'AvailabilityZone': 'us-west-2a, us-west-2b',
                },
                'SecurityGroups': [
                    {
                        'GroupId': 'sg-1a2b3c4d',
                    },
                ],
            },
        ],
        'SpotPrice': '0.04',
        'TargetCapacity': 2,
    },
)

print(response)

Expected Output:

{
    'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example assigns public addresses to instances launched in a nondefault VPC. Note that when you specify a network interface, you must include the subnet ID and security group ID using the network interface.

response = client.request_spot_fleet(
    SpotFleetRequestConfig={
        'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
        'LaunchSpecifications': [
            {
                'IamInstanceProfile': {
                    'Arn': 'arn:aws:iam::880185128111:instance-profile/my-iam-role',
                },
                'ImageId': 'ami-1a2b3c4d',
                'InstanceType': 'm3.medium',
                'KeyName': 'my-key-pair',
                'NetworkInterfaces': [
                    {
                        'AssociatePublicIpAddress': True,
                        'DeviceIndex': 0,
                        'Groups': [
                            'sg-1a2b3c4d',
                        ],
                        'SubnetId': 'subnet-1a2b3c4d',
                    },
                ],
            },
        ],
        'SpotPrice': '0.04',
        'TargetCapacity': 2,
    },
)

print(response)

Expected Output:

{
    'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    'ResponseMetadata': {
        '...': '...',
    },
}

This example creates a Spot fleet request that launches 30 instances using the diversified allocation strategy. The launch specifications differ by instance type. The Spot fleet distributes the instances across the launch specifications such that there are 10 instances of each type.

response = client.request_spot_fleet(
    SpotFleetRequestConfig={
        'AllocationStrategy': 'diversified',
        'IamFleetRole': 'arn:aws:iam::123456789012:role/my-spot-fleet-role',
        'LaunchSpecifications': [
            {
                'ImageId': 'ami-1a2b3c4d',
                'InstanceType': 'c4.2xlarge',
                'SubnetId': 'subnet-1a2b3c4d',
            },
            {
                'ImageId': 'ami-1a2b3c4d',
                'InstanceType': 'm3.2xlarge',
                'SubnetId': 'subnet-1a2b3c4d',
            },
            {
                'ImageId': 'ami-1a2b3c4d',
                'InstanceType': 'r3.2xlarge',
                'SubnetId': 'subnet-1a2b3c4d',
            },
        ],
        'SpotPrice': '0.70',
        'TargetCapacity': 30,
    },
)

print(response)

Expected Output:

{
    'SpotFleetRequestId': 'sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE',
    'ResponseMetadata': {
        '...': '...',
    },
}
request_spot_instances(**kwargs)

Creates a Spot Instance request.

For more information, see Spot Instance requests in the Amazon EC2 User Guide for Linux Instances .

Warning

We strongly discourage using the RequestSpotInstances API because it is a legacy API with no planned investment. For options for requesting Spot Instances, see Which is the best Spot request method to use? in the Amazon EC2 User Guide for Linux Instances .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide for Linux Instances .

See also: AWS API Documentation

Request Syntax

response = client.request_spot_instances(
    AvailabilityZoneGroup='string',
    BlockDurationMinutes=123,
    ClientToken='string',
    DryRun=True|False,
    InstanceCount=123,
    LaunchGroup='string',
    LaunchSpecification={
        'SecurityGroupIds': [
            'string',
        ],
        'SecurityGroups': [
            'string',
        ],
        'AddressingType': 'string',
        'BlockDeviceMappings': [
            {
                'DeviceName': 'string',
                'VirtualName': 'string',
                'Ebs': {
                    'DeleteOnTermination': True|False,
                    'Iops': 123,
                    'SnapshotId': 'string',
                    'VolumeSize': 123,
                    'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                    'KmsKeyId': 'string',
                    'Throughput': 123,
                    'OutpostArn': 'string',
                    'Encrypted': True|False
                },
                'NoDevice': 'string'
            },
        ],
        'EbsOptimized': True|False,
        'IamInstanceProfile': {
            'Arn': 'string',
            'Name': 'string'
        },
        'ImageId': 'string',
        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
        'KernelId': 'string',
        'KeyName': 'string',
        'Monitoring': {
            'Enabled': True|False
        },
        'NetworkInterfaces': [
            {
                'AssociatePublicIpAddress': True|False,
                'DeleteOnTermination': True|False,
                'Description': 'string',
                'DeviceIndex': 123,
                'Groups': [
                    'string',
                ],
                'Ipv6AddressCount': 123,
                'Ipv6Addresses': [
                    {
                        'Ipv6Address': 'string'
                    },
                ],
                'NetworkInterfaceId': 'string',
                'PrivateIpAddress': 'string',
                'PrivateIpAddresses': [
                    {
                        'Primary': True|False,
                        'PrivateIpAddress': 'string'
                    },
                ],
                'SecondaryPrivateIpAddressCount': 123,
                'SubnetId': 'string',
                'AssociateCarrierIpAddress': True|False,
                'InterfaceType': 'string',
                'NetworkCardIndex': 123,
                'Ipv4Prefixes': [
                    {
                        'Ipv4Prefix': 'string'
                    },
                ],
                'Ipv4PrefixCount': 123,
                'Ipv6Prefixes': [
                    {
                        'Ipv6Prefix': 'string'
                    },
                ],
                'Ipv6PrefixCount': 123
            },
        ],
        'Placement': {
            'AvailabilityZone': 'string',
            'GroupName': 'string',
            'Tenancy': 'default'|'dedicated'|'host'
        },
        'RamdiskId': 'string',
        'SubnetId': 'string',
        'UserData': 'string'
    },
    SpotPrice='string',
    Type='one-time'|'persistent',
    ValidFrom=datetime(2015, 1, 1),
    ValidUntil=datetime(2015, 1, 1),
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    InstanceInterruptionBehavior='hibernate'|'stop'|'terminate'
)
Parameters
  • AvailabilityZoneGroup (string) --

    The user-specified name for a logical grouping of requests.

    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 requests 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 request is expired, or the maximum price you specified falls below current Spot price), 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.

  • BlockDurationMinutes (integer) -- Deprecated.
  • ClientToken (string) -- 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 EC2 User Guide for Linux Instances .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceCount (integer) --

    The maximum number of Spot Instances to launch.

    Default: 1

  • LaunchGroup (string) --

    The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

    Default: Instances are launched and terminated individually

  • LaunchSpecification (dict) --

    The launch specification.

    • SecurityGroupIds (list) --

      One or more security group IDs.

      • (string) --
    • 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.

      • (string) --
    • AddressingType (string) --

      Deprecated.

    • BlockDeviceMappings (list) --

      One or more block device mapping entries. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.

      • (dict) --

        Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh ).

        • 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.

          NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

          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.

        • Ebs (dict) --

          Parameters used to automatically set up EBS volumes when the instance is launched.

          • DeleteOnTermination (boolean) --

            Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

          • Iops (integer) --

            The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3 : 3,000-16,000 IOPS
            • io1 : 100-64,000 IOPS
            • io2 : 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

          • SnapshotId (string) --

            The ID of the snapshot.

          • VolumeSize (integer) --

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

            The following are the supported volumes sizes for each volume type:

            • gp2 and gp3 :1-16,384
            • io1 and io2 : 4-16,384
            • st1 and sc1 : 125-16,384
            • standard : 1-1,024
          • VolumeType (string) --

            The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

          • KmsKeyId (string) --

            Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

            This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

          • Throughput (integer) --

            The throughput that the volume supports, in MiB/s.

            This parameter is valid only for gp3 volumes.

            Valid Range: Minimum value of 125. Maximum value of 1000.

          • OutpostArn (string) --

            The ARN of the Outpost on which the snapshot is stored.

            This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

          • Encrypted (boolean) --

            Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

            In no case can you remove encryption from an encrypted volume.

            Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

            This parameter is not returned by DescribeImageAttribute .

        • NoDevice (string) --

          To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

    • 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

    • 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.

    • ImageId (string) --

      The ID of the AMI.

    • InstanceType (string) --

      The instance type. Only one instance type can be specified.

    • KernelId (string) --

      The ID of the kernel.

    • KeyName (string) --

      The name of the key pair.

    • Monitoring (dict) --

      Indicates whether basic or detailed monitoring is enabled for the instance.

      Default: Disabled

      • Enabled (boolean) -- [REQUIRED]

        Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

    • NetworkInterfaces (list) --

      One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

      • (dict) --

        Describes a network interface.

        • AssociatePublicIpAddress (boolean) --

          Indicates whether to assign a public IPv4 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 .

        • 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.

        • Description (string) --

          The description of the network interface. Applies only if creating a network interface when launching an instance.

        • DeviceIndex (integer) --

          The position of the network interface in the attachment order. A primary network interface has a device index of 0.

          If you specify a network interface when launching an instance, you must specify the device index.

        • Groups (list) --

          The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

          • (string) --
        • Ipv6AddressCount (integer) --

          A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

        • Ipv6Addresses (list) --

          One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

          • (dict) --

            Describes an IPv6 address.

            • Ipv6Address (string) --

              The IPv6 address.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

          If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

        • PrivateIpAddress (string) --

          The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • PrivateIpAddresses (list) --

          One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

          • (dict) --

            Describes a secondary private IPv4 address for a network interface.

            • Primary (boolean) --

              Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

            • PrivateIpAddress (string) --

              The private IPv4 addresses.

        • SecondaryPrivateIpAddressCount (integer) --

          The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • SubnetId (string) --

          The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

        • AssociateCarrierIpAddress (boolean) --

          Indicates whether to assign a carrier IP address to the network interface.

          You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

        • InterfaceType (string) --

          The type of network interface.

          Valid values: interface | efa

        • NetworkCardIndex (integer) --

          The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

          If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

        • Ipv4Prefixes (list) --

          One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

        • Ipv4PrefixCount (integer) --

          The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

        • Ipv6Prefixes (list) --

          One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

          • (dict) --

            Describes the IPv4 prefix option for a network interface.

            • Ipv6Prefix (string) --

              The IPv6 prefix.

        • Ipv6PrefixCount (integer) --

          The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

    • 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.

      • 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 Spot Instances.

    • RamdiskId (string) --

      The ID of the RAM disk.

    • SubnetId (string) --

      The ID of the subnet in which to launch the instance.

    • UserData (string) --

      The Base64-encoded user data for the instance. User data is limited to 16 KB.

  • SpotPrice (string) --

    The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

    Warning

    If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

  • Type (string) --

    The Spot Instance request type.

    Default: one-time

  • ValidFrom (datetime) --

    The start date of the request. If this is a one-time request, the request becomes active at this date and time and remains active until all instances launch, the request expires, or the request is canceled. If the request is persistent, the request becomes active at this date and time and remains active until it expires or is canceled.

    The specified start date and time cannot be equal to the current date and time. You must specify a start date and time that occurs after the current date and time.

  • ValidUntil (datetime) --

    The end date of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z).

    • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.
    • For a one-time request, the request remains active until all instances launch, the request is canceled, or the ValidUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.
  • TagSpecifications (list) --

    The key-value pair for tagging the Spot Instance request on creation. The value for ResourceType must be spot-instances-request , otherwise the Spot Instance request fails. To tag the Spot Instance request after it has been created, see CreateTags .

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • InstanceInterruptionBehavior (string) -- The behavior when a Spot Instance is interrupted. The default is terminate .
Return type

dict

Returns

Response Syntax

{
    'SpotInstanceRequests': [
        {
            'ActualBlockHourlyPrice': 'string',
            'AvailabilityZoneGroup': 'string',
            'BlockDurationMinutes': 123,
            'CreateTime': datetime(2015, 1, 1),
            'Fault': {
                'Code': 'string',
                'Message': 'string'
            },
            'InstanceId': 'string',
            'LaunchGroup': 'string',
            'LaunchSpecification': {
                'UserData': 'string',
                'SecurityGroups': [
                    {
                        'GroupName': 'string',
                        'GroupId': 'string'
                    },
                ],
                'AddressingType': 'string',
                'BlockDeviceMappings': [
                    {
                        'DeviceName': 'string',
                        'VirtualName': 'string',
                        'Ebs': {
                            'DeleteOnTermination': True|False,
                            'Iops': 123,
                            'SnapshotId': 'string',
                            'VolumeSize': 123,
                            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                            'KmsKeyId': 'string',
                            'Throughput': 123,
                            'OutpostArn': 'string',
                            'Encrypted': True|False
                        },
                        'NoDevice': 'string'
                    },
                ],
                'EbsOptimized': True|False,
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Name': 'string'
                },
                'ImageId': 'string',
                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                'KernelId': 'string',
                'KeyName': 'string',
                'NetworkInterfaces': [
                    {
                        'AssociatePublicIpAddress': True|False,
                        'DeleteOnTermination': True|False,
                        'Description': 'string',
                        'DeviceIndex': 123,
                        'Groups': [
                            'string',
                        ],
                        'Ipv6AddressCount': 123,
                        'Ipv6Addresses': [
                            {
                                'Ipv6Address': 'string'
                            },
                        ],
                        'NetworkInterfaceId': 'string',
                        'PrivateIpAddress': 'string',
                        'PrivateIpAddresses': [
                            {
                                'Primary': True|False,
                                'PrivateIpAddress': 'string'
                            },
                        ],
                        'SecondaryPrivateIpAddressCount': 123,
                        'SubnetId': 'string',
                        'AssociateCarrierIpAddress': True|False,
                        'InterfaceType': 'string',
                        'NetworkCardIndex': 123,
                        'Ipv4Prefixes': [
                            {
                                'Ipv4Prefix': 'string'
                            },
                        ],
                        'Ipv4PrefixCount': 123,
                        'Ipv6Prefixes': [
                            {
                                'Ipv6Prefix': 'string'
                            },
                        ],
                        'Ipv6PrefixCount': 123
                    },
                ],
                'Placement': {
                    'AvailabilityZone': 'string',
                    'GroupName': 'string',
                    'Tenancy': 'default'|'dedicated'|'host'
                },
                'RamdiskId': 'string',
                'SubnetId': 'string',
                'Monitoring': {
                    'Enabled': True|False
                }
            },
            'LaunchedAvailabilityZone': 'string',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'SpotInstanceRequestId': 'string',
            'SpotPrice': 'string',
            'State': 'open'|'active'|'closed'|'cancelled'|'failed',
            'Status': {
                'Code': 'string',
                'Message': 'string',
                'UpdateTime': datetime(2015, 1, 1)
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Type': 'one-time'|'persistent',
            'ValidFrom': datetime(2015, 1, 1),
            'ValidUntil': datetime(2015, 1, 1),
            'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of RequestSpotInstances.

    • SpotInstanceRequests (list) --

      One or more Spot Instance requests.

      • (dict) --

        Describes a Spot Instance request.

        • ActualBlockHourlyPrice (string) --

          Deprecated.

        • 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.

        • BlockDurationMinutes (integer) --

          Deprecated.

        • 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).

        • 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.

        • InstanceId (string) --

          The instance ID, if an instance has been launched to fulfill the Spot Instance request.

        • LaunchGroup (string) --

          The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

        • LaunchSpecification (dict) --

          Additional information for launching instances.

          • UserData (string) --

            The Base64-encoded user data for the instance.

          • 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.

          • AddressingType (string) --

            Deprecated.

          • BlockDeviceMappings (list) --

            One or more block device mapping entries.

            • (dict) --

              Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

              • DeviceName (string) --

                The device name (for example, /dev/sdh or xvdh ).

              • 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.

                NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

                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.

              • Ebs (dict) --

                Parameters used to automatically set up EBS volumes when the instance is launched.

                • DeleteOnTermination (boolean) --

                  Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

                • Iops (integer) --

                  The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                  The following are the supported values for each volume type:

                  • gp3 : 3,000-16,000 IOPS
                  • io1 : 100-64,000 IOPS
                  • io2 : 100-64,000 IOPS

                  For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

                  This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

                • SnapshotId (string) --

                  The ID of the snapshot.

                • VolumeSize (integer) --

                  The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                  The following are the supported volumes sizes for each volume type:

                  • gp2 and gp3 :1-16,384
                  • io1 and io2 : 4-16,384
                  • st1 and sc1 : 125-16,384
                  • standard : 1-1,024
                • VolumeType (string) --

                  The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

                • KmsKeyId (string) --

                  Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                  This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

                • Throughput (integer) --

                  The throughput that the volume supports, in MiB/s.

                  This parameter is valid only for gp3 volumes.

                  Valid Range: Minimum value of 125. Maximum value of 1000.

                • OutpostArn (string) --

                  The ARN of the Outpost on which the snapshot is stored.

                  This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

                • Encrypted (boolean) --

                  Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

                  In no case can you remove encryption from an encrypted volume.

                  Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

                  This parameter is not returned by DescribeImageAttribute .

              • NoDevice (string) --

                To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

          • 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

          • 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.

          • ImageId (string) --

            The ID of the AMI.

          • InstanceType (string) --

            The instance type. Only one instance type can be specified.

          • KernelId (string) --

            The ID of the kernel.

          • KeyName (string) --

            The name of the key pair.

          • NetworkInterfaces (list) --

            One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

            • (dict) --

              Describes a network interface.

              • AssociatePublicIpAddress (boolean) --

                Indicates whether to assign a public IPv4 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 .

              • 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.

              • Description (string) --

                The description of the network interface. Applies only if creating a network interface when launching an instance.

              • DeviceIndex (integer) --

                The position of the network interface in the attachment order. A primary network interface has a device index of 0.

                If you specify a network interface when launching an instance, you must specify the device index.

              • Groups (list) --

                The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                • (string) --
              • Ipv6AddressCount (integer) --

                A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

              • Ipv6Addresses (list) --

                One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                • (dict) --

                  Describes an IPv6 address.

                  • Ipv6Address (string) --

                    The IPv6 address.

              • NetworkInterfaceId (string) --

                The ID of the network interface.

                If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

              • PrivateIpAddress (string) --

                The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • PrivateIpAddresses (list) --

                One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                • (dict) --

                  Describes a secondary private IPv4 address for a network interface.

                  • Primary (boolean) --

                    Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                  • PrivateIpAddress (string) --

                    The private IPv4 addresses.

              • SecondaryPrivateIpAddressCount (integer) --

                The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • SubnetId (string) --

                The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

              • AssociateCarrierIpAddress (boolean) --

                Indicates whether to assign a carrier IP address to the network interface.

                You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

              • InterfaceType (string) --

                The type of network interface.

                Valid values: interface | efa

              • NetworkCardIndex (integer) --

                The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

                If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

              • Ipv4Prefixes (list) --

                One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

              • Ipv4PrefixCount (integer) --

                The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

              • Ipv6Prefixes (list) --

                One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

                • (dict) --

                  Describes the IPv4 prefix option for a network interface.

                  • Ipv6Prefix (string) --

                    The IPv6 prefix.

              • Ipv6PrefixCount (integer) --

                The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

          • 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.

            • 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 Spot Instances.

          • RamdiskId (string) --

            The ID of the RAM disk.

          • SubnetId (string) --

            The ID of the subnet in which to launch the instance.

          • Monitoring (dict) --

            Describes the monitoring of an instance.

            • Enabled (boolean) --

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • LaunchedAvailabilityZone (string) --

          The Availability Zone in which the request is launched.

        • ProductDescription (string) --

          The product description associated with the Spot Instance.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • SpotPrice (string) --

          The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • State (string) --

          The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances .

        • 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 request status codes in the Amazon EC2 User Guide for Linux Instances .

          • Message (string) --

            The description for the status code.

          • 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).

        • 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 256 Unicode characters.

        • Type (string) --

          The Spot Instance request type.

        • 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 (YYYY -MM -DD T*HH* :MM :SS Z).

          • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.
          • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.
        • InstanceInterruptionBehavior (string) --

          The behavior when a Spot Instance is interrupted.

Examples

This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone.

response = client.request_spot_instances(
    InstanceCount=5,
    LaunchSpecification={
        'IamInstanceProfile': {
            'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
        },
        'ImageId': 'ami-1a2b3c4d',
        'InstanceType': 'm3.medium',
        'KeyName': 'my-key-pair',
        'Placement': {
            'AvailabilityZone': 'us-west-2a',
        },
        'SecurityGroupIds': [
            'sg-1a2b3c4d',
        ],
    },
    SpotPrice='0.03',
    Type='one-time',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}

This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default.

response = client.request_spot_instances(
    InstanceCount=5,
    LaunchSpecification={
        'IamInstanceProfile': {
            'Arn': 'arn:aws:iam::123456789012:instance-profile/my-iam-role',
        },
        'ImageId': 'ami-1a2b3c4d',
        'InstanceType': 'm3.medium',
        'SecurityGroupIds': [
            'sg-1a2b3c4d',
        ],
        'SubnetId': 'subnet-1a2b3c4d',
    },
    SpotPrice='0.050',
    Type='one-time',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
reset_address_attribute(**kwargs)

Resets the attribute of the specified IP address. For requirements, see Using reverse DNS for email applications .

See also: AWS API Documentation

Request Syntax

response = client.reset_address_attribute(
    AllocationId='string',
    Attribute='domain-name',
    DryRun=True|False
)
Parameters
  • AllocationId (string) --

    [REQUIRED]

    [EC2-VPC] The allocation ID.

  • Attribute (string) --

    [REQUIRED]

    The attribute of the IP address.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Address': {
        'PublicIp': 'string',
        'AllocationId': 'string',
        'PtrRecord': 'string',
        'PtrRecordUpdate': {
            'Value': 'string',
            'Status': 'string',
            'Reason': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Address (dict) --

      Information about the IP address.

      • PublicIp (string) --

        The public IP address.

      • AllocationId (string) --

        [EC2-VPC] The allocation ID.

      • PtrRecord (string) --

        The pointer (PTR) record for the IP address.

      • PtrRecordUpdate (dict) --

        The updated PTR record for the IP address.

        • Value (string) --

          The value for the PTR record update.

        • Status (string) --

          The status of the PTR record update.

        • Reason (string) --

          The reason for the PTR record update.

reset_ebs_default_kms_key_id(**kwargs)

Resets the default KMS key for EBS encryption for your account in this Region to the Amazon Web Services managed KMS key for EBS.

After resetting the default KMS key to the Amazon Web Services managed KMS key, you can continue to encrypt by a customer managed KMS key by specifying it when you create the volume. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.reset_ebs_default_kms_key_id(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'KmsKeyId': 'string'
}

Response Structure

  • (dict) --
    • KmsKeyId (string) --

      The Amazon Resource Name (ARN) of the default KMS key for EBS encryption by default.

reset_fpga_image_attribute(**kwargs)

Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its default value. You can only reset the load permission attribute.

See also: AWS API Documentation

Request Syntax

response = client.reset_fpga_image_attribute(
    DryRun=True|False,
    FpgaImageId='string',
    Attribute='loadPermission'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FpgaImageId (string) --

    [REQUIRED]

    The ID of the AFI.

  • Attribute (string) -- The attribute.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Is true if the request succeeds, and an error otherwise.

reset_image_attribute(**kwargs)

Resets an attribute of an AMI to its default value.

See also: AWS API Documentation

Request Syntax

response = client.reset_image_attribute(
    Attribute='launchPermission',
    ImageId='string',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute to reset (currently you can only reset the launch permission attribute).

  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example resets the launchPermission attribute for the specified AMI. By default, AMIs are private.

response = client.reset_image_attribute(
    Attribute='launchPermission',
    ImageId='ami-5731123e',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
reset_instance_attribute(**kwargs)

Resets an attribute of an instance to its default value. To reset the kernel or ramdisk , the instance must be in a stopped state. To reset the sourceDestCheck , the instance can be either running or stopped.

The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true , which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon VPC User Guide .

See also: AWS API Documentation

Request Syntax

response = client.reset_instance_attribute(
    Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop',
    DryRun=True|False,
    InstanceId='string'
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute to reset.

    Warning

    You can only reset the following attributes: kernel | ramdisk | sourceDestCheck .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

Returns

None

Examples

This example resets the sourceDestCheck attribute for the specified instance.

response = client.reset_instance_attribute(
    Attribute='sourceDestCheck',
    InstanceId='i-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
reset_network_interface_attribute(**kwargs)

Resets a network interface attribute. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = client.reset_network_interface_attribute(
    DryRun=True|False,
    NetworkInterfaceId='string',
    SourceDestCheck='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

  • SourceDestCheck (string) -- The source/destination checking attribute. Resets the value to true .
Returns

None

reset_snapshot_attribute(**kwargs)

Resets permission settings for the specified snapshot.

For more information about modifying snapshot permissions, see Share a snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.reset_snapshot_attribute(
    Attribute='productCodes'|'createVolumePermission',
    SnapshotId='string',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.

  • SnapshotId (string) --

    [REQUIRED]

    The ID of the snapshot.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Examples

This example resets the create volume permissions for snapshot snap-1234567890abcdef0. If the command succeeds, no output is returned.

response = client.reset_snapshot_attribute(
    Attribute='createVolumePermission',
    SnapshotId='snap-1234567890abcdef0',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
restore_address_to_classic(**kwargs)

Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.restore_address_to_classic(
    DryRun=True|False,
    PublicIp='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PublicIp (string) --

    [REQUIRED]

    The Elastic IP address.

Return type

dict

Returns

Response Syntax

{
    'PublicIp': 'string',
    'Status': 'MoveInProgress'|'InVpc'|'InClassic'
}

Response Structure

  • (dict) --

    • PublicIp (string) --

      The Elastic IP address.

    • Status (string) --

      The move status for the IP address.

Examples

This example restores the specified Elastic IP address to the EC2-Classic platform.

response = client.restore_address_to_classic(
    PublicIp='198.51.100.0',
)

print(response)

Expected Output:

{
    'PublicIp': '198.51.100.0',
    'Status': 'MoveInProgress',
    'ResponseMetadata': {
        '...': '...',
    },
}
restore_image_from_recycle_bin(**kwargs)

Restores an AMI from the Recycle Bin. For more information, see Recycle Bin in the Amazon Elastic Compute Cloud User Guide.

See also: AWS API Documentation

Request Syntax

response = client.restore_image_from_recycle_bin(
    ImageId='string',
    DryRun=True|False
)
Parameters
  • ImageId (string) --

    [REQUIRED]

    The ID of the AMI to restore.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

restore_managed_prefix_list_version(**kwargs)

Restores the entries from a previous version of a managed prefix list to a new version of the prefix list.

See also: AWS API Documentation

Request Syntax

response = client.restore_managed_prefix_list_version(
    DryRun=True|False,
    PrefixListId='string',
    PreviousVersion=123,
    CurrentVersion=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • PreviousVersion (integer) --

    [REQUIRED]

    The version to restore.

  • CurrentVersion (integer) --

    [REQUIRED]

    The current version number for the prefix list.

Return type

dict

Returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The current state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

      • OwnerId (string) --

        The ID of the owner of the prefix list.

restore_snapshot_from_recycle_bin(**kwargs)

Restores a snapshot from the Recycle Bin. For more information, see Restore snapshots from the Recycle Bin in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.restore_snapshot_from_recycle_bin(
    SnapshotId='string',
    DryRun=True|False
)
Parameters
  • SnapshotId (string) --

    [REQUIRED]

    The ID of the snapshot to restore.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'SnapshotId': 'string',
    'OutpostArn': 'string',
    'Description': 'string',
    'Encrypted': True|False,
    'OwnerId': 'string',
    'Progress': 'string',
    'StartTime': datetime(2015, 1, 1),
    'State': 'pending'|'completed'|'error'|'recoverable'|'recovering',
    'VolumeId': 'string',
    'VolumeSize': 123
}

Response Structure

  • (dict) --

    • SnapshotId (string) --

      The ID of the snapshot.

    • OutpostArn (string) --

      The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

    • Description (string) --

      The description for the snapshot.

    • Encrypted (boolean) --

      Indicates whether the snapshot is encrypted.

    • OwnerId (string) --

      The ID of the Amazon Web Services account that owns the EBS snapshot.

    • Progress (string) --

      The progress of the snapshot, as a percentage.

    • StartTime (datetime) --

      The time stamp when the snapshot was initiated.

    • State (string) --

      The state of the snapshot.

    • VolumeId (string) --

      The ID of the volume that was used to create the snapshot.

    • VolumeSize (integer) --

      The size of the volume, in GiB.

restore_snapshot_tier(**kwargs)

Restores an archived Amazon EBS snapshot for use temporarily or permanently, or modifies the restore period or restore type for a snapshot that was previously temporarily restored.

For more information see Restore an archived snapshot and modify the restore period or restore type for a temporarily restored snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.restore_snapshot_tier(
    SnapshotId='string',
    TemporaryRestoreDays=123,
    PermanentRestore=True|False,
    DryRun=True|False
)
Parameters
  • SnapshotId (string) --

    [REQUIRED]

    The ID of the snapshot to restore.

  • TemporaryRestoreDays (integer) --

    Specifies the number of days for which to temporarily restore an archived snapshot. Required for temporary restores only. The snapshot will be automatically re-archived after this period.

    To temporarily restore an archived snapshot, specify the number of days and omit the PermanentRestore parameter or set it to false .

  • PermanentRestore (boolean) -- Indicates whether to permanently restore an archived snapshot. To permanently restore an archived snapshot, specify true and omit the RestoreSnapshotTierRequest$TemporaryRestoreDays parameter.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'SnapshotId': 'string',
    'RestoreStartTime': datetime(2015, 1, 1),
    'RestoreDuration': 123,
    'IsPermanentRestore': True|False
}

Response Structure

  • (dict) --

    • SnapshotId (string) --

      The ID of the snapshot.

    • RestoreStartTime (datetime) --

      The date and time when the snapshot restore process started.

    • RestoreDuration (integer) --

      For temporary restores only. The number of days for which the archived snapshot is temporarily restored.

    • IsPermanentRestore (boolean) --

      Indicates whether the snapshot is permanently restored. true indicates a permanent restore. false indicates a temporary restore.

revoke_client_vpn_ingress(**kwargs)

Removes an ingress authorization rule from a Client VPN endpoint.

See also: AWS API Documentation

Request Syntax

response = client.revoke_client_vpn_ingress(
    ClientVpnEndpointId='string',
    TargetNetworkCidr='string',
    AccessGroupId='string',
    RevokeAllGroups=True|False,
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint with which the authorization rule is associated.

  • TargetNetworkCidr (string) --

    [REQUIRED]

    The IPv4 address range, in CIDR notation, of the network for which access is being removed.

  • AccessGroupId (string) -- The ID of the Active Directory group for which to revoke access.
  • RevokeAllGroups (boolean) -- Indicates whether access should be revoked for all clients.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Status': {
        'Code': 'authorizing'|'active'|'failed'|'revoking',
        'Message': 'string'
    }
}

Response Structure

  • (dict) --

    • Status (dict) --

      The current state of the authorization rule.

      • Code (string) --

        The state of the authorization rule.

      • Message (string) --

        A message about the status of the authorization rule, if applicable.

revoke_security_group_egress(**kwargs)

[VPC only] Removes the specified outbound (egress) rules from a security group for EC2-VPC. This action does not apply to security groups for use in EC2-Classic.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and destination (CIDR range, security group, or prefix list). 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. If the security group rule has a description, you do not need to specify the description to revoke the rule.

[Default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

See also: AWS API Documentation

Request Syntax

response = client.revoke_security_group_egress(
    DryRun=True|False,
    GroupId='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    SecurityGroupRuleIds=[
        'string',
    ],
    CidrIp='string',
    FromPort=123,
    IpProtocol='string',
    ToPort=123,
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupId (string) --

    [REQUIRED]

    The ID of the security group.

  • IpPermissions (list) --

    The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • SecurityGroupRuleIds (list) --

    The IDs of the security group rules.

    • (string) --
  • CidrIp (string) -- Not supported. Use a set of IP permissions to specify the CIDR.
  • FromPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • IpProtocol (string) -- Not supported. Use a set of IP permissions to specify the protocol name or number.
  • ToPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • SourceSecurityGroupName (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
  • SourceSecurityGroupOwnerId (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'UnknownIpPermissions': [
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • UnknownIpPermissions (list) --

      The outbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.

      • (dict) --

        Describes a set of permissions for a security group rule.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

        • IpRanges (list) --

          The IPv4 ranges.

          • (dict) --

            Describes an IPv4 range.

            • CidrIp (string) --

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • Ipv6Ranges (list) --

          [VPC only] The IPv6 ranges.

          • (dict) --

            [EC2-VPC only] Describes an IPv6 range.

            • CidrIpv6 (string) --

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • PrefixListIds (list) --

          [VPC only] The prefix list IDs.

          • (dict) --

            Describes a prefix list ID.

            • Description (string) --

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId (string) --

              The ID of the prefix.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • UserIdGroupPairs (list) --

          The security group and Amazon Web Services account ID pairs.

          • (dict) --

            Describes a security group and Amazon Web Services account ID pair.

            Note

            We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

            • Description (string) --

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId (string) --

              The ID of the security group.

            • 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 the security group ID.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus (string) --

              The status of a VPC peering connection, if applicable.

            • UserId (string) --

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

revoke_security_group_ingress(**kwargs)

Removes the specified inbound (ingress) rules from a security group.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and source (CIDR range, security group, or prefix list). 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. If the security group rule has a description, you do not need to specify the description to revoke the rule.

[EC2-Classic, default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.revoke_security_group_ingress(
    CidrIp='string',
    FromPort=123,
    GroupId='string',
    GroupName='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    IpProtocol='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    ToPort=123,
    DryRun=True|False,
    SecurityGroupRuleIds=[
        'string',
    ]
)
Parameters
  • CidrIp (string) -- The CIDR IP address range. You can't specify this parameter when specifying a source security group.
  • FromPort (integer) -- 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.
  • GroupId (string) -- The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
  • GroupName (string) -- [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.
  • IpPermissions (list) --

    The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • IpProtocol (string) -- The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ). Use -1 to specify all.
  • SourceSecurityGroupName (string) -- [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. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.
  • SourceSecurityGroupOwnerId (string) -- [EC2-Classic] The Amazon Web Services account ID of the source security group, if the source security group is in a different account. 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.
  • ToPort (integer) -- 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.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SecurityGroupRuleIds (list) --

    The IDs of the security group rules.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'UnknownIpPermissions': [
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • UnknownIpPermissions (list) --

      The inbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.

      • (dict) --

        Describes a set of permissions for a security group rule.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

        • IpRanges (list) --

          The IPv4 ranges.

          • (dict) --

            Describes an IPv4 range.

            • CidrIp (string) --

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • Ipv6Ranges (list) --

          [VPC only] The IPv6 ranges.

          • (dict) --

            [EC2-VPC only] Describes an IPv6 range.

            • CidrIpv6 (string) --

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • PrefixListIds (list) --

          [VPC only] The prefix list IDs.

          • (dict) --

            Describes a prefix list ID.

            • Description (string) --

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId (string) --

              The ID of the prefix.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • UserIdGroupPairs (list) --

          The security group and Amazon Web Services account ID pairs.

          • (dict) --

            Describes a security group and Amazon Web Services account ID pair.

            Note

            We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

            • Description (string) --

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId (string) --

              The ID of the security group.

            • 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 the security group ID.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus (string) --

              The status of a VPC peering connection, if applicable.

            • UserId (string) --

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

run_instances(**kwargs)

Launches the specified number of instances using an AMI for which you have permissions.

You can specify a number of options, or leave the default options. The following rules apply:

  • [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.
  • [EC2-Classic] If don't specify an Availability Zone, we choose one for you.
  • Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see Instance types available only in a VPC .
  • [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet.
  • Not all instance types support IPv6 addresses. For more information, see Instance types .
  • If you don't specify a security group ID, we use the default security group. For more information, see Security groups .
  • If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.

You can create a launch template , which is a resource that contains the parameters to launch an instance. When you launch an instance using RunInstances , you can specify the launch template instead of specifying the launch parameters.

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.

An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging your Amazon EC2 resources .

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 .

For troubleshooting, see What to do if an instance immediately terminates , and Troubleshooting connecting to your instance .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.run_instances(
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    ImageId='string',
    InstanceType='a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    Ipv6AddressCount=123,
    Ipv6Addresses=[
        {
            'Ipv6Address': 'string'
        },
    ],
    KernelId='string',
    KeyName='string',
    MaxCount=123,
    MinCount=123,
    Monitoring={
        'Enabled': True|False
    },
    Placement={
        'AvailabilityZone': 'string',
        'Affinity': 'string',
        'GroupName': 'string',
        'PartitionNumber': 123,
        'HostId': 'string',
        'Tenancy': 'default'|'dedicated'|'host',
        'SpreadDomain': 'string',
        'HostResourceGroupArn': 'string'
    },
    RamdiskId='string',
    SecurityGroupIds=[
        'string',
    ],
    SecurityGroups=[
        'string',
    ],
    SubnetId='string',
    UserData='string',
    AdditionalInfo='string',
    ClientToken='string',
    DisableApiTermination=True|False,
    DryRun=True|False,
    EbsOptimized=True|False,
    IamInstanceProfile={
        'Arn': 'string',
        'Name': 'string'
    },
    InstanceInitiatedShutdownBehavior='stop'|'terminate',
    NetworkInterfaces=[
        {
            'AssociatePublicIpAddress': True|False,
            'DeleteOnTermination': True|False,
            'Description': 'string',
            'DeviceIndex': 123,
            'Groups': [
                'string',
            ],
            'Ipv6AddressCount': 123,
            'Ipv6Addresses': [
                {
                    'Ipv6Address': 'string'
                },
            ],
            'NetworkInterfaceId': 'string',
            'PrivateIpAddress': 'string',
            'PrivateIpAddresses': [
                {
                    'Primary': True|False,
                    'PrivateIpAddress': 'string'
                },
            ],
            'SecondaryPrivateIpAddressCount': 123,
            'SubnetId': 'string',
            'AssociateCarrierIpAddress': True|False,
            'InterfaceType': 'string',
            'NetworkCardIndex': 123,
            'Ipv4Prefixes': [
                {
                    'Ipv4Prefix': 'string'
                },
            ],
            'Ipv4PrefixCount': 123,
            'Ipv6Prefixes': [
                {
                    'Ipv6Prefix': 'string'
                },
            ],
            'Ipv6PrefixCount': 123
        },
    ],
    PrivateIpAddress='string',
    ElasticGpuSpecification=[
        {
            'Type': 'string'
        },
    ],
    ElasticInferenceAccelerators=[
        {
            'Type': 'string',
            'Count': 123
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    LaunchTemplate={
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'Version': 'string'
    },
    InstanceMarketOptions={
        'MarketType': 'spot',
        'SpotOptions': {
            'MaxPrice': 'string',
            'SpotInstanceType': 'one-time'|'persistent',
            'BlockDurationMinutes': 123,
            'ValidUntil': datetime(2015, 1, 1),
            'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
        }
    },
    CreditSpecification={
        'CpuCredits': 'string'
    },
    CpuOptions={
        'CoreCount': 123,
        'ThreadsPerCore': 123
    },
    CapacityReservationSpecification={
        'CapacityReservationPreference': 'open'|'none',
        'CapacityReservationTarget': {
            'CapacityReservationId': 'string',
            'CapacityReservationResourceGroupArn': 'string'
        }
    },
    HibernationOptions={
        'Configured': True|False
    },
    LicenseSpecifications=[
        {
            'LicenseConfigurationArn': 'string'
        },
    ],
    MetadataOptions={
        'HttpTokens': 'optional'|'required',
        'HttpPutResponseHopLimit': 123,
        'HttpEndpoint': 'disabled'|'enabled',
        'HttpProtocolIpv6': 'disabled'|'enabled',
        'InstanceMetadataTags': 'disabled'|'enabled'
    },
    EnclaveOptions={
        'Enabled': True|False
    },
    PrivateDnsNameOptions={
        'HostnameType': 'ip-name'|'resource-name',
        'EnableResourceNameDnsARecord': True|False,
        'EnableResourceNameDnsAAAARecord': True|False
    },
    MaintenanceOptions={
        'AutoRecovery': 'disabled'|'default'
    },
    DisableApiStop=True|False
)
Parameters
  • BlockDeviceMappings (list) --

    The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide .

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

  • ImageId (string) -- The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
  • InstanceType (string) --

    The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

    Default: m1.small

  • Ipv6AddressCount (integer) --

    [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

  • Ipv6Addresses (list) --

    [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

    • (dict) --

      Describes an IPv6 address.

      • Ipv6Address (string) --

        The IPv6 address.

  • KernelId (string) --

    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 EC2 User Guide .

  • KeyName (string) --

    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.

  • MaxCount (integer) --

    [REQUIRED]

    The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount .

    Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.

  • MinCount (integer) --

    [REQUIRED]

    The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

    Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.

  • Monitoring (dict) --

    Specifies whether detailed monitoring is enabled for the instance.

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

  • Placement (dict) --

    The placement for the instance.

    • AvailabilityZone (string) --

      The Availability Zone of the instance.

      If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

      This parameter is not supported by CreateFleet .

    • Affinity (string) --

      The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • GroupName (string) --

      The name of the placement group the instance is in.

    • PartitionNumber (integer) --

      The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

      This parameter is not supported by CreateFleet .

    • HostId (string) --

      The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • 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.

      This parameter is not supported by CreateFleet .

      T3 instances that use the unlimited CPU credit option do not support host tenancy.

    • SpreadDomain (string) --

      Reserved for future use.

      This parameter is not supported by CreateFleet .

    • HostResourceGroupArn (string) --

      The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

      This parameter is not supported by CreateFleet .

  • RamdiskId (string) --

    The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the kernel ID.

    Warning

    We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide .

  • SecurityGroupIds (list) --

    The IDs of the security groups. You can create a security group using CreateSecurityGroup .

    If you specify a network interface, you must specify any security groups as part of the network interface.

    • (string) --
  • SecurityGroups (list) --

    [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.

    If you specify a network interface, you must specify any security groups as part of the network interface.

    Default: Amazon EC2 uses the default security group.

    • (string) --
  • SubnetId (string) --

    [EC2-VPC] The ID of the subnet to launch the instance into.

    If you specify a network interface, you must specify any subnets as part of the network interface.

  • UserData (string) --

    The user data script to make available to the instance. For more information, see Run commands on your Linux instance at launch and Run commands on your Windows instance at launch . If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.

    This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.
  • AdditionalInfo (string) -- Reserved.
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

    For more information, see Ensuring Idempotency .

    Constraints: Maximum 64 ASCII characters

    This field is autopopulated if not provided.

  • DisableApiTermination (boolean) --

    If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from the instance.

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EbsOptimized (boolean) --

    Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

    Default: false

  • IamInstanceProfile (dict) --

    The name or Amazon Resource Name (ARN) of an IAM instance profile.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the instance profile.

    • Name (string) --

      The name of the instance profile.

  • InstanceInitiatedShutdownBehavior (string) --

    Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

    Default: stop

  • NetworkInterfaces (list) --

    The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

    • (dict) --

      Describes a network interface.

      • AssociatePublicIpAddress (boolean) --

        Indicates whether to assign a public IPv4 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 .

      • 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.

      • Description (string) --

        The description of the network interface. Applies only if creating a network interface when launching an instance.

      • DeviceIndex (integer) --

        The position of the network interface in the attachment order. A primary network interface has a device index of 0.

        If you specify a network interface when launching an instance, you must specify the device index.

      • Groups (list) --

        The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

        • (string) --
      • Ipv6AddressCount (integer) --

        A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      • Ipv6Addresses (list) --

        One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

        • (dict) --

          Describes an IPv6 address.

          • Ipv6Address (string) --

            The IPv6 address.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

        If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

      • PrivateIpAddress (string) --

        The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • PrivateIpAddresses (list) --

        One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • (dict) --

          Describes a secondary private IPv4 address for a network interface.

          • Primary (boolean) --

            Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

          • PrivateIpAddress (string) --

            The private IPv4 addresses.

      • SecondaryPrivateIpAddressCount (integer) --

        The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • SubnetId (string) --

        The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

      • AssociateCarrierIpAddress (boolean) --

        Indicates whether to assign a carrier IP address to the network interface.

        You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

      • InterfaceType (string) --

        The type of network interface.

        Valid values: interface | efa

      • NetworkCardIndex (integer) --

        The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

      • Ipv4Prefixes (list) --

        One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

      • Ipv4PrefixCount (integer) --

        The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

      • Ipv6Prefixes (list) --

        One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

        • (dict) --

          Describes the IPv4 prefix option for a network interface.

          • Ipv6Prefix (string) --

            The IPv6 prefix.

      • Ipv6PrefixCount (integer) --

        The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

  • PrivateIpAddress (string) --

    [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

    Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

    You cannot specify this option and the network interfaces option in the same request.

  • ElasticGpuSpecification (list) --

    An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide .

    • (dict) --

      A specification for an Elastic Graphics accelerator.

      • Type (string) -- [REQUIRED]

        The type of Elastic Graphics accelerator. For more information about the values to specify for Type , see Elastic Graphics Basics , specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances .

  • ElasticInferenceAccelerators (list) --

    An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.

    You cannot specify accelerators from different generations in the same request.

    • (dict) --

      Describes an elastic inference accelerator.

      • Type (string) -- [REQUIRED]

        The type of elastic inference accelerator. The possible values are eia1.medium , eia1.large , eia1.xlarge , eia2.medium , eia2.large , and eia2.xlarge .

      • Count (integer) --

        The number of elastic inference accelerators to attach to the instance.

        Default: 1

  • TagSpecifications (list) --

    The tags to apply to the resources that are created during instance launch.

    You can specify tags for the following resources only:

    • Instances
    • Volumes
    • Elastic graphics
    • Spot Instance requests
    • Network interfaces

    To tag a resource after it has been created, see CreateTags .

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • LaunchTemplate (dict) --

    The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.

    • LaunchTemplateId (string) --

      The ID of the launch template.

      You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

    • LaunchTemplateName (string) --

      The name of the launch template.

      You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

    • Version (string) --

      The launch template version number, $Latest , or $Default .

      If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

      If the value is $Default , Amazon EC2 uses the default version of the launch template.

      Default: The default version of the launch template.

  • InstanceMarketOptions (dict) --

    The market (purchasing) option for the instances.

    For RunInstances , persistent Spot Instance requests are only supported when InstanceInterruptionBehavior is set to either hibernate or stop .

    • MarketType (string) --

      The market type.

    • SpotOptions (dict) --

      The options for Spot Instances.

      • MaxPrice (string) --

        The maximum hourly price that you're willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

        Warning

        If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

      • SpotInstanceType (string) --

        The Spot Instance request type. For RunInstances , persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop .

      • BlockDurationMinutes (integer) --

        Deprecated.

      • ValidUntil (datetime) --

        The end date of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). Supported only for persistent requests.

        • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.
        • For a one-time request, ValidUntil is not supported. The request remains active until all instances launch or you cancel the request.
      • InstanceInterruptionBehavior (string) --

        The behavior when a Spot Instance is interrupted. The default is terminate .

  • CreditSpecification (dict) --

    The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited . To change this attribute after launch, use ModifyInstanceCreditSpecification . For more information, see Burstable performance instances in the Amazon EC2 User Guide .

    Default: standard (T2 instances) or unlimited (T3/T3a/T4g instances)

    For T3 instances with host tenancy, only standard is supported.

    • CpuCredits (string) -- [REQUIRED]

      The credit option for CPU usage of a T instance.

      Valid values: standard | unlimited

  • CpuOptions (dict) --

    The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide .

    • CoreCount (integer) --

      The number of CPU cores for the instance.

    • ThreadsPerCore (integer) --

      The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1 . Otherwise, specify the default value of 2 .

  • CapacityReservationSpecification (dict) --

    Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open , which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

    • CapacityReservationPreference (string) --

      Indicates the instance's Capacity Reservation preferences. Possible preferences include:

      • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
      • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.
    • CapacityReservationTarget (dict) --

      Information about the target Capacity Reservation or Capacity Reservation group.

      • CapacityReservationId (string) --

        The ID of the Capacity Reservation in which to run the instance.

      • CapacityReservationResourceGroupArn (string) --

        The ARN of the Capacity Reservation resource group in which to run the instance.

  • HibernationOptions (dict) --

    Indicates whether an instance is enabled for hibernation. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.

    • Configured (boolean) --

      If you set this parameter to true , your instance is enabled for hibernation.

      Default: false

  • LicenseSpecifications (list) --

    The license configurations.

    • (dict) --

      Describes a license configuration.

      • LicenseConfigurationArn (string) --

        The Amazon Resource Name (ARN) of the license configuration.

  • MetadataOptions (dict) --

    The metadata options for the instance. For more information, see Instance metadata and user data .

    • HttpTokens (string) --

      The state of token usage for your instance metadata requests.

      If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

      If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

      Default: optional

    • HttpPutResponseHopLimit (integer) --

      The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

      Default: 1

      Possible values: Integers from 1 to 64

    • HttpEndpoint (string) --

      Enables or disables the HTTP metadata endpoint on your instances.

      If you specify a value of disabled , you cannot access your instance metadata.

      Default: enabled

    • HttpProtocolIpv6 (string) --

      Enables or disables the IPv6 endpoint for the instance metadata service.

    • InstanceMetadataTags (string) --

      Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

      Default: disabled

  • EnclaveOptions (dict) --

    Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide .

    You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

    • Enabled (boolean) --

      To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true .

  • PrivateDnsNameOptions (dict) --

    The options for the instance hostname. The default values are inherited from the subnet.

    • HostnameType (string) --

      The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

    • EnableResourceNameDnsARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

    • EnableResourceNameDnsAAAARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

  • MaintenanceOptions (dict) --

    The maintenance and recovery options for the instance.

    • AutoRecovery (string) --

      Disables the automatic recovery behavior of your instance or sets it to default. For more information, see Simplified automatic recovery .

  • DisableApiStop (boolean) -- Indicates whether an instance is enabled for stop protection. For more information, see Stop protection .
Return type

dict

Returns

Response Syntax

{
    'Groups': [
        {
            'GroupName': 'string',
            'GroupId': 'string'
        },
    ],
    'Instances': [
        {
            'AmiLaunchIndex': 123,
            'ImageId': 'string',
            'InstanceId': 'string',
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'KernelId': 'string',
            'KeyName': 'string',
            'LaunchTime': datetime(2015, 1, 1),
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            },
            'Placement': {
                'AvailabilityZone': 'string',
                'Affinity': 'string',
                'GroupName': 'string',
                'PartitionNumber': 123,
                'HostId': 'string',
                'Tenancy': 'default'|'dedicated'|'host',
                'SpreadDomain': 'string',
                'HostResourceGroupArn': 'string'
            },
            'Platform': 'Windows',
            'PrivateDnsName': 'string',
            'PrivateIpAddress': 'string',
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'PublicDnsName': 'string',
            'PublicIpAddress': 'string',
            'RamdiskId': 'string',
            'State': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'StateTransitionReason': 'string',
            'SubnetId': 'string',
            'VpcId': 'string',
            'Architecture': 'i386'|'x86_64'|'arm64'|'x86_64_mac',
            'BlockDeviceMappings': [
                {
                    'DeviceName': 'string',
                    'Ebs': {
                        'AttachTime': datetime(2015, 1, 1),
                        'DeleteOnTermination': True|False,
                        'Status': 'attaching'|'attached'|'detaching'|'detached',
                        'VolumeId': 'string'
                    }
                },
            ],
            'ClientToken': 'string',
            'EbsOptimized': True|False,
            'EnaSupport': True|False,
            'Hypervisor': 'ovm'|'xen',
            'IamInstanceProfile': {
                'Arn': 'string',
                'Id': 'string'
            },
            'InstanceLifecycle': 'spot'|'scheduled',
            'ElasticGpuAssociations': [
                {
                    'ElasticGpuId': 'string',
                    'ElasticGpuAssociationId': 'string',
                    'ElasticGpuAssociationState': 'string',
                    'ElasticGpuAssociationTime': 'string'
                },
            ],
            'ElasticInferenceAcceleratorAssociations': [
                {
                    'ElasticInferenceAcceleratorArn': 'string',
                    'ElasticInferenceAcceleratorAssociationId': 'string',
                    'ElasticInferenceAcceleratorAssociationState': 'string',
                    'ElasticInferenceAcceleratorAssociationTime': datetime(2015, 1, 1)
                },
            ],
            'NetworkInterfaces': [
                {
                    'Association': {
                        'CarrierIp': 'string',
                        'CustomerOwnedIp': 'string',
                        'IpOwnerId': 'string',
                        'PublicDnsName': 'string',
                        'PublicIp': 'string'
                    },
                    'Attachment': {
                        'AttachTime': datetime(2015, 1, 1),
                        'AttachmentId': 'string',
                        'DeleteOnTermination': True|False,
                        'DeviceIndex': 123,
                        'Status': 'attaching'|'attached'|'detaching'|'detached',
                        'NetworkCardIndex': 123
                    },
                    'Description': 'string',
                    'Groups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'Ipv6Addresses': [
                        {
                            'Ipv6Address': 'string'
                        },
                    ],
                    'MacAddress': 'string',
                    'NetworkInterfaceId': 'string',
                    'OwnerId': 'string',
                    'PrivateDnsName': 'string',
                    'PrivateIpAddress': 'string',
                    'PrivateIpAddresses': [
                        {
                            'Association': {
                                'CarrierIp': 'string',
                                'CustomerOwnedIp': 'string',
                                'IpOwnerId': 'string',
                                'PublicDnsName': 'string',
                                'PublicIp': 'string'
                            },
                            'Primary': True|False,
                            'PrivateDnsName': 'string',
                            'PrivateIpAddress': 'string'
                        },
                    ],
                    'SourceDestCheck': True|False,
                    'Status': 'available'|'associated'|'attaching'|'in-use'|'detaching',
                    'SubnetId': 'string',
                    'VpcId': 'string',
                    'InterfaceType': 'string',
                    'Ipv4Prefixes': [
                        {
                            'Ipv4Prefix': 'string'
                        },
                    ],
                    'Ipv6Prefixes': [
                        {
                            'Ipv6Prefix': 'string'
                        },
                    ]
                },
            ],
            'OutpostArn': 'string',
            'RootDeviceName': 'string',
            'RootDeviceType': 'ebs'|'instance-store',
            'SecurityGroups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'SourceDestCheck': True|False,
            'SpotInstanceRequestId': 'string',
            'SriovNetSupport': 'string',
            'StateReason': {
                'Code': 'string',
                'Message': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VirtualizationType': 'hvm'|'paravirtual',
            'CpuOptions': {
                'CoreCount': 123,
                'ThreadsPerCore': 123
            },
            'CapacityReservationId': 'string',
            'CapacityReservationSpecification': {
                'CapacityReservationPreference': 'open'|'none',
                'CapacityReservationTarget': {
                    'CapacityReservationId': 'string',
                    'CapacityReservationResourceGroupArn': 'string'
                }
            },
            'HibernationOptions': {
                'Configured': True|False
            },
            'Licenses': [
                {
                    'LicenseConfigurationArn': 'string'
                },
            ],
            'MetadataOptions': {
                'State': 'pending'|'applied',
                'HttpTokens': 'optional'|'required',
                'HttpPutResponseHopLimit': 123,
                'HttpEndpoint': 'disabled'|'enabled',
                'HttpProtocolIpv6': 'disabled'|'enabled',
                'InstanceMetadataTags': 'disabled'|'enabled'
            },
            'EnclaveOptions': {
                'Enabled': True|False
            },
            'BootMode': 'legacy-bios'|'uefi',
            'PlatformDetails': 'string',
            'UsageOperation': 'string',
            'UsageOperationUpdateTime': datetime(2015, 1, 1),
            'PrivateDnsNameOptions': {
                'HostnameType': 'ip-name'|'resource-name',
                'EnableResourceNameDnsARecord': True|False,
                'EnableResourceNameDnsAAAARecord': True|False
            },
            'Ipv6Address': 'string',
            'TpmSupport': 'string',
            'MaintenanceOptions': {
                'AutoRecovery': 'disabled'|'default'
            }
        },
    ],
    'OwnerId': 'string',
    'RequesterId': 'string',
    'ReservationId': 'string'
}

Response Structure

  • (dict) --

    Describes a launch request for one or more instances, and includes owner, requester, and security group information that applies to all instances in the launch request.

    Note

    We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

    • Groups (list) --

      [EC2-Classic only] The 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) --

      The instances.

      • (dict) --

        Describes an instance.

        • AmiLaunchIndex (integer) --

          The AMI launch index, which can be used to find this instance in the launch group.

        • ImageId (string) --

          The ID of the AMI used to launch the instance.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceType (string) --

          The instance type.

        • KernelId (string) --

          The kernel associated with this instance, if applicable.

        • KeyName (string) --

          The name of the key pair, if this instance was launched with an associated key pair.

        • LaunchTime (datetime) --

          The time the instance was launched.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • Placement (dict) --

          The location where the instance launched, if applicable.

          • AvailabilityZone (string) --

            The Availability Zone of the instance.

            If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

            This parameter is not supported by CreateFleet .

          • Affinity (string) --

            The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet .

          • GroupName (string) --

            The name of the placement group the instance is in.

          • PartitionNumber (integer) --

            The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

            This parameter is not supported by CreateFleet .

          • HostId (string) --

            The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

            This parameter is not supported by CreateFleet .

          • 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.

            This parameter is not supported by CreateFleet .

            T3 instances that use the unlimited CPU credit option do not support host tenancy.

          • SpreadDomain (string) --

            Reserved for future use.

            This parameter is not supported by CreateFleet .

          • HostResourceGroupArn (string) --

            The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

            This parameter is not supported by CreateFleet .

        • Platform (string) --

          The value is Windows for Windows instances; otherwise blank.

        • PrivateDnsName (string) --

          (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

          [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

        • PrivateIpAddress (string) --

          The private IPv4 address assigned to the instance.

        • 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.

        • PublicDnsName (string) --

          (IPv4 only) 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.

        • PublicIpAddress (string) --

          The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

          A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

        • RamdiskId (string) --

          The RAM disk associated with this instance, if applicable.

        • State (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • StateTransitionReason (string) --

          The reason for the most recent state transition. This might be an empty string.

        • 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.

        • Architecture (string) --

          The architecture of the image.

        • BlockDeviceMappings (list) --

          Any block device mapping entries for the instance.

          • (dict) --

            Describes a block device mapping.

            • DeviceName (string) --

              The device name (for example, /dev/sdh or xvdh ).

            • Ebs (dict) --

              Parameters used to automatically set up EBS volumes when the instance is launched.

              • AttachTime (datetime) --

                The time stamp when the attachment initiated.

              • DeleteOnTermination (boolean) --

                Indicates whether the volume is deleted on instance termination.

              • Status (string) --

                The attachment state.

              • VolumeId (string) --

                The ID of the EBS volume.

        • ClientToken (string) --

          The idempotency token you provided when you launched the instance, if applicable.

        • EbsOptimized (boolean) --

          Indicates whether the instance is optimized for Amazon 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.

        • EnaSupport (boolean) --

          Specifies whether enhanced networking with ENA is enabled.

        • Hypervisor (string) --

          The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

        • 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.

        • InstanceLifecycle (string) --

          Indicates whether this is a Spot Instance or a Scheduled Instance.

        • ElasticGpuAssociations (list) --

          The Elastic GPU associated with the instance.

          • (dict) --

            Describes the association between an instance and an Elastic Graphics accelerator.

            • ElasticGpuId (string) --

              The ID of the Elastic Graphics accelerator.

            • ElasticGpuAssociationId (string) --

              The ID of the association.

            • ElasticGpuAssociationState (string) --

              The state of the association between the instance and the Elastic Graphics accelerator.

            • ElasticGpuAssociationTime (string) --

              The time the Elastic Graphics accelerator was associated with the instance.

        • ElasticInferenceAcceleratorAssociations (list) --

          The elastic inference accelerator associated with the instance.

          • (dict) --

            Describes the association between an instance and an elastic inference accelerator.

            • ElasticInferenceAcceleratorArn (string) --

              The Amazon Resource Name (ARN) of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationId (string) --

              The ID of the association.

            • ElasticInferenceAcceleratorAssociationState (string) --

              The state of the elastic inference accelerator.

            • ElasticInferenceAcceleratorAssociationTime (datetime) --

              The time at which the elastic inference accelerator is associated with an instance.

        • NetworkInterfaces (list) --

          [EC2-VPC] The network interfaces for the instance.

          • (dict) --

            Describes a network interface.

            • Association (dict) --

              The association information for an Elastic IPv4 associated with the network interface.

              • CarrierIp (string) --

                The carrier IP address associated with the network interface.

              • CustomerOwnedIp (string) --

                The customer-owned IP address associated with the network interface.

              • IpOwnerId (string) --

                The ID of the owner of the Elastic IP address.

              • PublicDnsName (string) --

                The public DNS name.

              • PublicIp (string) --

                The public IP address or Elastic IP address bound to the network interface.

            • Attachment (dict) --

              The network interface attachment.

              • AttachTime (datetime) --

                The time stamp when the attachment initiated.

              • AttachmentId (string) --

                The ID of the network interface attachment.

              • DeleteOnTermination (boolean) --

                Indicates whether the network interface is deleted when the instance is terminated.

              • DeviceIndex (integer) --

                The index of the device on the instance for the network interface attachment.

              • Status (string) --

                The attachment state.

              • NetworkCardIndex (integer) --

                The index of the network card.

            • Description (string) --

              The description.

            • 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.

            • Ipv6Addresses (list) --

              One or more IPv6 addresses associated with the network interface.

              • (dict) --

                Describes an IPv6 address.

                • Ipv6Address (string) --

                  The IPv6 address.

            • MacAddress (string) --

              The MAC address.

            • NetworkInterfaceId (string) --

              The ID of the network interface.

            • OwnerId (string) --

              The ID of the Amazon Web Services account that created the network interface.

            • PrivateDnsName (string) --

              The private DNS name.

            • PrivateIpAddress (string) --

              The IPv4 address of the network interface within the subnet.

            • PrivateIpAddresses (list) --

              One or more private IPv4 addresses associated with the network interface.

              • (dict) --

                Describes a private IPv4 address.

                • Association (dict) --

                  The association information for an Elastic IP address for the network interface.

                  • CarrierIp (string) --

                    The carrier IP address associated with the network interface.

                  • CustomerOwnedIp (string) --

                    The customer-owned IP address associated with the network interface.

                  • IpOwnerId (string) --

                    The ID of the owner of the Elastic IP address.

                  • PublicDnsName (string) --

                    The public DNS name.

                  • PublicIp (string) --

                    The public IP address or Elastic IP address bound to the network interface.

                • Primary (boolean) --

                  Indicates whether this IPv4 address is the primary private IP address of the network interface.

                • PrivateDnsName (string) --

                  The private IPv4 DNS name.

                • PrivateIpAddress (string) --

                  The private IPv4 address of the network interface.

            • SourceDestCheck (boolean) --

              Indicates whether source/destination checking is enabled.

            • Status (string) --

              The status of the network interface.

            • SubnetId (string) --

              The ID of the subnet.

            • VpcId (string) --

              The ID of the VPC.

            • InterfaceType (string) --

              The type of network interface.

              Valid values: interface | efa | trunk

            • Ipv4Prefixes (list) --

              The IPv4 delegated prefixes that are assigned to the network interface.

              • (dict) --

                Information about an IPv4 prefix.

                • Ipv4Prefix (string) --

                  One or more IPv4 prefixes assigned to the network interface.

            • Ipv6Prefixes (list) --

              The IPv6 delegated prefixes that are assigned to the network interface.

              • (dict) --

                Information about an IPv6 prefix.

                • Ipv6Prefix (string) --

                  One or more IPv6 prefixes assigned to the network interface.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • RootDeviceName (string) --

          The device name of the root device volume (for example, /dev/sda1 ).

        • RootDeviceType (string) --

          The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

        • SecurityGroups (list) --

          The 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) --

          Indicates whether source/destination checking is enabled.

        • SpotInstanceRequestId (string) --

          If the request is a Spot Instance request, the ID of the request.

        • SriovNetSupport (string) --

          Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

        • 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.InsufficientInstanceCapacity : There was insufficient capacity available to satisfy the launch request.
            • Server.InternalError : An internal error caused the instance to terminate during launch.
            • Server.ScheduledStop : The instance was stopped due to a scheduled retirement.
            • Server.SpotInstanceShutdown : The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
            • Server.SpotInstanceTermination : The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
            • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.
            • Client.InstanceTerminated : The instance was terminated or rebooted during AMI creation.
            • Client.InternalError : A client error caused the instance to terminate during launch.
            • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.
            • Client.UserInitiatedHibernate : Hibernation was initiated on 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 account limits.
        • 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 256 Unicode characters.

        • VirtualizationType (string) --

          The virtualization type of the instance.

        • CpuOptions (dict) --

          The CPU options for the instance.

          • CoreCount (integer) --

            The number of CPU cores for the instance.

          • ThreadsPerCore (integer) --

            The number of threads per CPU core.

        • CapacityReservationId (string) --

          The ID of the Capacity Reservation.

        • CapacityReservationSpecification (dict) --

          Information about the Capacity Reservation targeting option.

          • CapacityReservationPreference (string) --

            Describes the instance's Capacity Reservation preferences. Possible preferences include:

            • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
            • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
          • CapacityReservationTarget (dict) --

            Information about the targeted Capacity Reservation or Capacity Reservation group.

            • CapacityReservationId (string) --

              The ID of the targeted Capacity Reservation.

            • CapacityReservationResourceGroupArn (string) --

              The ARN of the targeted Capacity Reservation group.

        • HibernationOptions (dict) --

          Indicates whether the instance is enabled for hibernation.

          • Configured (boolean) --

            If this parameter is set to true , your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

        • Licenses (list) --

          The license configurations for the instance.

          • (dict) --

            Describes a license configuration.

            • LicenseConfigurationArn (string) --

              The Amazon Resource Name (ARN) of the license configuration.

        • MetadataOptions (dict) --

          The metadata options for the instance.

          • State (string) --

            The state of the metadata option changes.

            pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

            applied - The metadata options have been successfully applied on the instance.

          • HttpTokens (string) --

            The state of token usage for your instance metadata requests.

            If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

            If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

            Default: optional

          • HttpPutResponseHopLimit (integer) --

            The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

            Default: 1

            Possible values: Integers from 1 to 64

          • HttpEndpoint (string) --

            Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

            If the value is disabled , you cannot access your instance metadata.

          • HttpProtocolIpv6 (string) --

            Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

          • InstanceMetadataTags (string) --

            Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see Work with instance tags using the instance metadata .

        • EnclaveOptions (dict) --

          Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

          • Enabled (boolean) --

            If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

        • BootMode (string) --

          The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide .

        • PlatformDetails (string) --

          The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide .

        • UsageOperation (string) --

          The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide .

        • UsageOperationUpdateTime (datetime) --

          The time that the usage operation was last updated.

        • PrivateDnsNameOptions (dict) --

          The options for the instance hostname.

          • HostnameType (string) --

            The type of hostname to assign to an instance.

          • EnableResourceNameDnsARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

          • EnableResourceNameDnsAAAARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

        • Ipv6Address (string) --

          The IPv6 address assigned to the instance.

        • TpmSupport (string) --

          If the instance is configured for NitroTPM support, the value is v2.0 . For more information, see NitroTPM in the Amazon EC2 User Guide .

        • MaintenanceOptions (dict) --

          Provides information on the recovery and maintenance options of your instance.

          • AutoRecovery (string) --

            Provides information on the current automatic recovery behavior of your instance.

    • OwnerId (string) --

      The ID of the Amazon Web Services account that owns the reservation.

    • RequesterId (string) --

      The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

    • ReservationId (string) --

      The ID of the reservation.

Examples

This example launches an instance using the specified AMI, instance type, security group, subnet, block device mapping, and tags.

response = client.run_instances(
    BlockDeviceMappings=[
        {
            'DeviceName': '/dev/sdh',
            'Ebs': {
                'VolumeSize': 100,
            },
        },
    ],
    ImageId='ami-abc12345',
    InstanceType='t2.micro',
    KeyName='my-key-pair',
    MaxCount=1,
    MinCount=1,
    SecurityGroupIds=[
        'sg-1a2b3c4d',
    ],
    SubnetId='subnet-6e7f829e',
    TagSpecifications=[
        {
            'ResourceType': 'instance',
            'Tags': [
                {
                    'Key': 'Purpose',
                    'Value': 'test',
                },
            ],
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
run_scheduled_instances(**kwargs)

Launches the specified Scheduled Instances.

Before you can launch a Scheduled Instance, you must purchase it and obtain an identifier using PurchaseScheduledInstances .

You must launch a Scheduled Instance during its scheduled time period. You can't stop or reboot a Scheduled Instance, but you can terminate it as needed. If you terminate a Scheduled Instance before the current scheduled time period ends, you can launch it again after a few minutes. For more information, see Scheduled Instances in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.run_scheduled_instances(
    ClientToken='string',
    DryRun=True|False,
    InstanceCount=123,
    LaunchSpecification={
        'BlockDeviceMappings': [
            {
                'DeviceName': 'string',
                'Ebs': {
                    'DeleteOnTermination': True|False,
                    'Encrypted': True|False,
                    'Iops': 123,
                    'SnapshotId': 'string',
                    'VolumeSize': 123,
                    'VolumeType': 'string'
                },
                'NoDevice': 'string',
                'VirtualName': 'string'
            },
        ],
        'EbsOptimized': True|False,
        'IamInstanceProfile': {
            'Arn': 'string',
            'Name': 'string'
        },
        'ImageId': 'string',
        'InstanceType': 'string',
        'KernelId': 'string',
        'KeyName': 'string',
        'Monitoring': {
            'Enabled': True|False
        },
        'NetworkInterfaces': [
            {
                'AssociatePublicIpAddress': True|False,
                'DeleteOnTermination': True|False,
                'Description': 'string',
                'DeviceIndex': 123,
                'Groups': [
                    'string',
                ],
                'Ipv6AddressCount': 123,
                'Ipv6Addresses': [
                    {
                        'Ipv6Address': 'string'
                    },
                ],
                'NetworkInterfaceId': 'string',
                'PrivateIpAddress': 'string',
                'PrivateIpAddressConfigs': [
                    {
                        'Primary': True|False,
                        'PrivateIpAddress': 'string'
                    },
                ],
                'SecondaryPrivateIpAddressCount': 123,
                'SubnetId': 'string'
            },
        ],
        'Placement': {
            'AvailabilityZone': 'string',
            'GroupName': 'string'
        },
        'RamdiskId': 'string',
        'SecurityGroupIds': [
            'string',
        ],
        'SubnetId': 'string',
        'UserData': 'string'
    },
    ScheduledInstanceId='string'
)
Parameters
  • ClientToken (string) --

    Unique, case-sensitive identifier that ensures the idempotency of the request. For more information, see Ensuring Idempotency .

    This field is autopopulated if not provided.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceCount (integer) --

    The number of instances.

    Default: 1

  • LaunchSpecification (dict) --

    [REQUIRED]

    The launch specification. You must match the instance type, Availability Zone, network, and platform of the schedule that you purchased.

    • BlockDeviceMappings (list) --

      The block device mapping entries.

      • (dict) --

        Describes a block device mapping for a Scheduled Instance.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh ).

        • Ebs (dict) --

          Parameters used to set up EBS volumes automatically when the instance is launched.

          • DeleteOnTermination (boolean) --

            Indicates whether the volume is deleted on instance termination.

          • Encrypted (boolean) --

            Indicates whether the volume is encrypted. You can attached encrypted volumes only to instances that support them.

          • Iops (integer) --

            The number of I/O operations per second (IOPS) to provision for an io1 or io2 volume, with a maximum ratio of 50 IOPS/GiB for io1 , and 500 IOPS/GiB for io2 . Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum IOPS of 64,000 is guaranteed only on instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide .

            This parameter is valid only for Provisioned IOPS SSD (io1 and io2 ) volumes.

          • SnapshotId (string) --

            The ID of the snapshot.

          • VolumeSize (integer) --

            The size of the volume, in GiB.

            Default: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.

          • VolumeType (string) --

            The volume type. gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, Throughput Optimized HDD for st1 , Cold HDD for sc1 , or standard for Magnetic.

            Default: gp2

        • NoDevice (string) --

          To omit the device from the block device mapping, specify an empty string.

        • VirtualName (string) --

          The virtual device name (ephemeral N). Instance store volumes are numbered starting from 0. An instance type with two 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.

    • 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

    • IamInstanceProfile (dict) --

      The IAM instance profile.

      • Arn (string) --

        The Amazon Resource Name (ARN).

      • Name (string) --

        The name.

    • ImageId (string) -- [REQUIRED]

      The ID of the Amazon Machine Image (AMI).

    • InstanceType (string) --

      The instance type.

    • KernelId (string) --

      The ID of the kernel.

    • KeyName (string) --

      The name of the key pair.

    • Monitoring (dict) --

      Enable or disable monitoring for the instances.

      • Enabled (boolean) --

        Indicates whether monitoring is enabled.

    • NetworkInterfaces (list) --

      The network interfaces.

      • (dict) --

        Describes a network interface for a Scheduled Instance.

        • AssociatePublicIpAddress (boolean) --

          Indicates whether to assign a public IPv4 address to instances launched in a VPC. The public IPv4 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 .

        • DeleteOnTermination (boolean) --

          Indicates whether to delete the interface when the instance is terminated.

        • Description (string) --

          The description.

        • DeviceIndex (integer) --

          The index of the device for the network interface attachment.

        • Groups (list) --

          The IDs of the security groups.

          • (string) --
        • Ipv6AddressCount (integer) --

          The number of IPv6 addresses to assign to the network interface. The IPv6 addresses are automatically selected from the subnet range.

        • Ipv6Addresses (list) --

          The specific IPv6 addresses from the subnet range.

          • (dict) --

            Describes an IPv6 address.

            • Ipv6Address (string) --

              The IPv6 address.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • PrivateIpAddress (string) --

          The IPv4 address of the network interface within the subnet.

        • PrivateIpAddressConfigs (list) --

          The private IPv4 addresses.

          • (dict) --

            Describes a private IPv4 address for a Scheduled Instance.

            • Primary (boolean) --

              Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary IPv4 address.

            • PrivateIpAddress (string) --

              The IPv4 address.

        • SecondaryPrivateIpAddressCount (integer) --

          The number of secondary private IPv4 addresses.

        • SubnetId (string) --

          The ID of the subnet.

    • Placement (dict) --

      The placement information.

      • AvailabilityZone (string) --

        The Availability Zone.

      • GroupName (string) --

        The name of the placement group.

    • RamdiskId (string) --

      The ID of the RAM disk.

    • SecurityGroupIds (list) --

      The IDs of the security groups.

      • (string) --
    • SubnetId (string) --

      The ID of the subnet in which to launch the instances.

    • UserData (string) --

      The base64-encoded MIME user data.

  • ScheduledInstanceId (string) --

    [REQUIRED]

    The Scheduled Instance ID.

Return type

dict

Returns

Response Syntax

{
    'InstanceIdSet': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Contains the output of RunScheduledInstances.

    • InstanceIdSet (list) --

      The IDs of the newly launched instances.

      • (string) --

Examples

This example launches the specified Scheduled Instance in a VPC.

response = client.run_scheduled_instances(
    InstanceCount=1,
    LaunchSpecification={
        'IamInstanceProfile': {
            'Name': 'my-iam-role',
        },
        'ImageId': 'ami-12345678',
        'InstanceType': 'c4.large',
        'KeyName': 'my-key-pair',
        'NetworkInterfaces': [
            {
                'AssociatePublicIpAddress': True,
                'DeviceIndex': 0,
                'Groups': [
                    'sg-12345678',
                ],
                'SubnetId': 'subnet-12345678',
            },
        ],
    },
    ScheduledInstanceId='sci-1234-1234-1234-1234-123456789012',
)

print(response)

Expected Output:

{
    'InstanceIdSet': [
        'i-1234567890abcdef0',
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}

This example launches the specified Scheduled Instance in EC2-Classic.

response = client.run_scheduled_instances(
    InstanceCount=1,
    LaunchSpecification={
        'IamInstanceProfile': {
            'Name': 'my-iam-role',
        },
        'ImageId': 'ami-12345678',
        'InstanceType': 'c4.large',
        'KeyName': 'my-key-pair',
        'Placement': {
            'AvailabilityZone': 'us-west-2b',
        },
        'SecurityGroupIds': [
            'sg-12345678',
        ],
    },
    ScheduledInstanceId='sci-1234-1234-1234-1234-123456789012',
)

print(response)

Expected Output:

{
    'InstanceIdSet': [
        'i-1234567890abcdef0',
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
search_local_gateway_routes(**kwargs)

Searches for routes in the specified local gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.search_local_gateway_routes(
    LocalGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • LocalGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the local gateway route table.

  • Filters (list) --

    One or more filters.

    • route-search.exact-match - The exact match of the specified filter.
    • route-search.longest-prefix-match - The longest prefix that matches the route.
    • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.
    • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.
    • state - The state of the route.
    • type - The route type.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Routes': [
        {
            'DestinationCidrBlock': 'string',
            'LocalGatewayVirtualInterfaceGroupId': 'string',
            'Type': 'static'|'propagated',
            'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted',
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'OwnerId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Routes (list) --

      Information about the routes.

      • (dict) --

        Describes a route for a local gateway route table.

        • DestinationCidrBlock (string) --

          The CIDR block used for destination matches.

        • LocalGatewayVirtualInterfaceGroupId (string) --

          The ID of the virtual interface group.

        • Type (string) --

          The route type.

        • State (string) --

          The state of the route.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway route.

    • 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.

search_transit_gateway_multicast_groups(**kwargs)

Searches one or more transit gateway multicast groups and returns the group membership information.

See also: AWS API Documentation

Request Syntax

response = client.search_transit_gateway_multicast_groups(
    TransitGatewayMulticastDomainId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • Filters (list) --

    One or more filters. The possible values are:

    • group-ip-address - The IP address of the transit gateway multicast group.
    • is-group-member - The resource is a group member. Valid values are true | false .
    • is-group-source - The resource is a group source. Valid values are true | false .
    • member-type - The member type. Valid values are igmp | static .
    • resource-id - The ID of the resource.
    • resource-type - The type of resource. Valid values are vpc | vpn | direct-connect-gateway | tgw-peering .
    • source-type - The source type. Valid values are igmp | static .
    • subnet-id - The ID of the subnet.
    • transit-gateway-attachment-id - The id of the transit gateway attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NextToken (string) -- The token for the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'MulticastGroups': [
        {
            'GroupIpAddress': 'string',
            'TransitGatewayAttachmentId': 'string',
            'SubnetId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceOwnerId': 'string',
            'NetworkInterfaceId': 'string',
            'GroupMember': True|False,
            'GroupSource': True|False,
            'MemberType': 'static'|'igmp',
            'SourceType': 'static'|'igmp'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • MulticastGroups (list) --

      Information about the transit gateway multicast group.

      • (dict) --

        Describes the transit gateway multicast group resources.

        • GroupIpAddress (string) --

          The IP address assigned to the transit gateway multicast group.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway attachment.

        • SubnetId (string) --

          The ID of the subnet.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of resource, for example a VPC attachment.

        • ResourceOwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain group resource.

        • NetworkInterfaceId (string) --

          The ID of the transit gateway attachment.

        • GroupMember (boolean) --

          Indicates that the resource is a transit gateway multicast group member.

        • GroupSource (boolean) --

          Indicates that the resource is a transit gateway multicast group member.

        • MemberType (string) --

          The member type (for example, static ).

        • SourceType (string) --

          The source type.

    • 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.

search_transit_gateway_routes(**kwargs)

Searches for routes in the specified transit gateway route table.

See also: AWS API Documentation

Request Syntax

response = client.search_transit_gateway_routes(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    DryRun=True|False
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • Filters (list) --

    [REQUIRED]

    One or more filters. The possible values are:

    • attachment.transit-gateway-attachment-id - The id of the transit gateway attachment.
    • attachment.resource-id - The resource id of the transit gateway attachment.
    • attachment.resource-type - The attachment resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect .
    • prefix-list-id - The ID of the prefix list.
    • route-search.exact-match - The exact match of the specified filter.
    • route-search.longest-prefix-match - The longest prefix that matches the route.
    • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.
    • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.
    • state - The state of the route (active | blackhole ).
    • type - The type of route (propagated | static ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of routes to return.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Routes': [
        {
            'DestinationCidrBlock': 'string',
            'PrefixListId': 'string',
            'TransitGatewayRouteTableAnnouncementId': 'string',
            'TransitGatewayAttachments': [
                {
                    'ResourceId': 'string',
                    'TransitGatewayAttachmentId': 'string',
                    'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering'
                },
            ],
            'Type': 'static'|'propagated',
            'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted'
        },
    ],
    'AdditionalRoutesAvailable': True|False
}

Response Structure

  • (dict) --

    • Routes (list) --

      Information about the routes.

      • (dict) --

        Describes a route for a transit gateway route table.

        • DestinationCidrBlock (string) --

          The CIDR block used for destination matches.

        • PrefixListId (string) --

          The ID of the prefix list used for destination matches.

        • TransitGatewayRouteTableAnnouncementId (string) --

          The ID of the transit gateway route table announcement.

        • TransitGatewayAttachments (list) --

          The attachments.

          • (dict) --

            Describes a route attachment.

            • ResourceId (string) --

              The ID of the resource.

            • TransitGatewayAttachmentId (string) --

              The ID of the attachment.

            • ResourceType (string) --

              The resource type. Note that the tgw-peering resource type has been deprecated.

        • Type (string) --

          The route type.

        • State (string) --

          The state of the route.

    • AdditionalRoutesAvailable (boolean) --

      Indicates whether there are additional routes available.

send_diagnostic_interrupt(**kwargs)

Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a kernel panic (on Linux instances), or a blue screen /stop error (on Windows instances). For instances based on Intel and AMD processors, the interrupt is received as a non-maskable interrupt (NMI).

In general, the operating system crashes and reboots when a kernel panic or stop error is triggered. The operating system can also be configured to perform diagnostic tasks, such as generating a memory dump file, loading a secondary kernel, or obtaining a call trace.

Before sending a diagnostic interrupt to your instance, ensure that its operating system is configured to perform the required diagnostic tasks.

For more information about configuring your operating system to generate a crash dump when a kernel panic or stop error occurs, see Send a diagnostic interrupt (for advanced users) (Linux instances) or Send a diagnostic interrupt (for advanced users) (Windows instances).

See also: AWS API Documentation

Request Syntax

response = client.send_diagnostic_interrupt(
    InstanceId='string',
    DryRun=True|False
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

start_instances(**kwargs)

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

If you attempt to start a T3 instance with host tenancy and the unlimted CPU credit option, the request fails. The unlimited CPU credit option is not supported on Dedicated Hosts. Before you start the instance, either change its CPU credit option to standard , or change its tenancy to default or dedicated .

For more information, see Stop and start your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.start_instances(
    InstanceIds=[
        'string',
    ],
    AdditionalInfo='string',
    DryRun=True|False
)
Parameters
  • InstanceIds (list) --

    [REQUIRED]

    The IDs of the instances.

    • (string) --
  • AdditionalInfo (string) -- Reserved.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'StartingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StartingInstances (list) --

      Information about the started instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

Examples

This example starts the specified EC2 instance.

response = client.start_instances(
    InstanceIds=[
        'i-1234567890abcdef0',
    ],
)

print(response)

Expected Output:

{
    'StartingInstances': [
        {
            'CurrentState': {
                'Code': 0,
                'Name': 'pending',
            },
            'InstanceId': 'i-1234567890abcdef0',
            'PreviousState': {
                'Code': 80,
                'Name': 'stopped',
            },
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
start_network_insights_access_scope_analysis(**kwargs)

Starts analyzing the specified Network Access Scope.

See also: AWS API Documentation

Request Syntax

response = client.start_network_insights_access_scope_analysis(
    NetworkInsightsAccessScopeId='string',
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters
  • NetworkInsightsAccessScopeId (string) --

    [REQUIRED]

    The ID of the Network Access Scope.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to apply.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

    [REQUIRED]

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency .

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopeAnalysis': {
        'NetworkInsightsAccessScopeAnalysisId': 'string',
        'NetworkInsightsAccessScopeAnalysisArn': 'string',
        'NetworkInsightsAccessScopeId': 'string',
        'Status': 'running'|'succeeded'|'failed',
        'StatusMessage': 'string',
        'WarningMessage': 'string',
        'StartDate': datetime(2015, 1, 1),
        'EndDate': datetime(2015, 1, 1),
        'FindingsFound': 'true'|'false'|'unknown',
        'AnalyzedEniCount': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopeAnalysis (dict) --

      The Network Access Scope analysis.

      • NetworkInsightsAccessScopeAnalysisId (string) --

        The ID of the Network Access Scope analysis.

      • NetworkInsightsAccessScopeAnalysisArn (string) --

        The Amazon Resource Name (ARN) of the Network Access Scope analysis.

      • NetworkInsightsAccessScopeId (string) --

        The ID of the Network Access Scope.

      • Status (string) --

        The status.

      • StatusMessage (string) --

        The status message.

      • WarningMessage (string) --

        The warning message.

      • StartDate (datetime) --

        The analysis start date.

      • EndDate (datetime) --

        The analysis end date.

      • FindingsFound (string) --

        Indicates whether there are findings.

      • AnalyzedEniCount (integer) --

        The number of network interfaces analyzed.

      • Tags (list) --

        The tags.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

start_network_insights_analysis(**kwargs)

Starts analyzing the specified path. If the path is reachable, the operation returns the shortest feasible path.

See also: AWS API Documentation

Request Syntax

response = client.start_network_insights_analysis(
    NetworkInsightsPathId='string',
    FilterInArns=[
        'string',
    ],
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters
  • NetworkInsightsPathId (string) --

    [REQUIRED]

    The ID of the path.

  • FilterInArns (list) --

    The Amazon Resource Names (ARN) of the resources that the path must traverse.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to apply.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

    [REQUIRED]

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to ensure idempotency .

    This field is autopopulated if not provided.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAnalysis': {
        'NetworkInsightsAnalysisId': 'string',
        'NetworkInsightsAnalysisArn': 'string',
        'NetworkInsightsPathId': 'string',
        'FilterInArns': [
            'string',
        ],
        'StartDate': datetime(2015, 1, 1),
        'Status': 'running'|'succeeded'|'failed',
        'StatusMessage': 'string',
        'WarningMessage': 'string',
        'NetworkPathFound': True|False,
        'ForwardPathComponents': [
            {
                'SequenceNumber': 123,
                'AclRule': {
                    'Cidr': 'string',
                    'Egress': True|False,
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'Protocol': 'string',
                    'RuleAction': 'string',
                    'RuleNumber': 123
                },
                'AttachedTo': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Component': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'DestinationVpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'OutboundHeader': {
                    'DestinationAddresses': [
                        'string',
                    ],
                    'DestinationPortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ],
                    'Protocol': 'string',
                    'SourceAddresses': [
                        'string',
                    ],
                    'SourcePortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ]
                },
                'InboundHeader': {
                    'DestinationAddresses': [
                        'string',
                    ],
                    'DestinationPortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ],
                    'Protocol': 'string',
                    'SourceAddresses': [
                        'string',
                    ],
                    'SourcePortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ]
                },
                'RouteTableRoute': {
                    'DestinationCidr': 'string',
                    'DestinationPrefixListId': 'string',
                    'EgressOnlyInternetGatewayId': 'string',
                    'GatewayId': 'string',
                    'InstanceId': 'string',
                    'NatGatewayId': 'string',
                    'NetworkInterfaceId': 'string',
                    'Origin': 'string',
                    'TransitGatewayId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
                'SecurityGroupRule': {
                    'Cidr': 'string',
                    'Direction': 'string',
                    'SecurityGroupId': 'string',
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'PrefixListId': 'string',
                    'Protocol': 'string'
                },
                'SourceVpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Subnet': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Vpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'AdditionalDetails': [
                    {
                        'AdditionalDetailType': 'string',
                        'Component': {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        }
                    },
                ],
                'TransitGateway': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'TransitGatewayRouteTableRoute': {
                    'DestinationCidr': 'string',
                    'State': 'string',
                    'RouteOrigin': 'string',
                    'PrefixListId': 'string',
                    'AttachmentId': 'string',
                    'ResourceId': 'string',
                    'ResourceType': 'string'
                }
            },
        ],
        'ReturnPathComponents': [
            {
                'SequenceNumber': 123,
                'AclRule': {
                    'Cidr': 'string',
                    'Egress': True|False,
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'Protocol': 'string',
                    'RuleAction': 'string',
                    'RuleNumber': 123
                },
                'AttachedTo': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Component': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'DestinationVpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'OutboundHeader': {
                    'DestinationAddresses': [
                        'string',
                    ],
                    'DestinationPortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ],
                    'Protocol': 'string',
                    'SourceAddresses': [
                        'string',
                    ],
                    'SourcePortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ]
                },
                'InboundHeader': {
                    'DestinationAddresses': [
                        'string',
                    ],
                    'DestinationPortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ],
                    'Protocol': 'string',
                    'SourceAddresses': [
                        'string',
                    ],
                    'SourcePortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ]
                },
                'RouteTableRoute': {
                    'DestinationCidr': 'string',
                    'DestinationPrefixListId': 'string',
                    'EgressOnlyInternetGatewayId': 'string',
                    'GatewayId': 'string',
                    'InstanceId': 'string',
                    'NatGatewayId': 'string',
                    'NetworkInterfaceId': 'string',
                    'Origin': 'string',
                    'TransitGatewayId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
                'SecurityGroupRule': {
                    'Cidr': 'string',
                    'Direction': 'string',
                    'SecurityGroupId': 'string',
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'PrefixListId': 'string',
                    'Protocol': 'string'
                },
                'SourceVpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Subnet': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Vpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'AdditionalDetails': [
                    {
                        'AdditionalDetailType': 'string',
                        'Component': {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        }
                    },
                ],
                'TransitGateway': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'TransitGatewayRouteTableRoute': {
                    'DestinationCidr': 'string',
                    'State': 'string',
                    'RouteOrigin': 'string',
                    'PrefixListId': 'string',
                    'AttachmentId': 'string',
                    'ResourceId': 'string',
                    'ResourceType': 'string'
                }
            },
        ],
        'Explanations': [
            {
                'Acl': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'AclRule': {
                    'Cidr': 'string',
                    'Egress': True|False,
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'Protocol': 'string',
                    'RuleAction': 'string',
                    'RuleNumber': 123
                },
                'Address': 'string',
                'Addresses': [
                    'string',
                ],
                'AttachedTo': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'AvailabilityZones': [
                    'string',
                ],
                'Cidrs': [
                    'string',
                ],
                'Component': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'CustomerGateway': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Destination': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'DestinationVpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Direction': 'string',
                'ExplanationCode': 'string',
                'IngressRouteTable': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'InternetGateway': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'LoadBalancerArn': 'string',
                'ClassicLoadBalancerListener': {
                    'LoadBalancerPort': 123,
                    'InstancePort': 123
                },
                'LoadBalancerListenerPort': 123,
                'LoadBalancerTarget': {
                    'Address': 'string',
                    'AvailabilityZone': 'string',
                    'Instance': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Port': 123
                },
                'LoadBalancerTargetGroup': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'LoadBalancerTargetGroups': [
                    {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                ],
                'LoadBalancerTargetPort': 123,
                'ElasticLoadBalancerListener': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'MissingComponent': 'string',
                'NatGateway': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'NetworkInterface': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'PacketField': 'string',
                'VpcPeeringConnection': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Port': 123,
                'PortRanges': [
                    {
                        'From': 123,
                        'To': 123
                    },
                ],
                'PrefixList': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Protocols': [
                    'string',
                ],
                'RouteTableRoute': {
                    'DestinationCidr': 'string',
                    'DestinationPrefixListId': 'string',
                    'EgressOnlyInternetGatewayId': 'string',
                    'GatewayId': 'string',
                    'InstanceId': 'string',
                    'NatGatewayId': 'string',
                    'NetworkInterfaceId': 'string',
                    'Origin': 'string',
                    'TransitGatewayId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
                'RouteTable': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'SecurityGroup': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'SecurityGroupRule': {
                    'Cidr': 'string',
                    'Direction': 'string',
                    'SecurityGroupId': 'string',
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'PrefixListId': 'string',
                    'Protocol': 'string'
                },
                'SecurityGroups': [
                    {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                ],
                'SourceVpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'State': 'string',
                'Subnet': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'SubnetRouteTable': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'Vpc': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'VpcEndpoint': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'VpnConnection': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'VpnGateway': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'TransitGateway': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'TransitGatewayRouteTable': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                },
                'TransitGatewayRouteTableRoute': {
                    'DestinationCidr': 'string',
                    'State': 'string',
                    'RouteOrigin': 'string',
                    'PrefixListId': 'string',
                    'AttachmentId': 'string',
                    'ResourceId': 'string',
                    'ResourceType': 'string'
                },
                'TransitGatewayAttachment': {
                    'Id': 'string',
                    'Arn': 'string',
                    'Name': 'string'
                }
            },
        ],
        'AlternatePathHints': [
            {
                'ComponentId': 'string',
                'ComponentArn': 'string'
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • NetworkInsightsAnalysis (dict) --

      Information about the network insights analysis.

      • NetworkInsightsAnalysisId (string) --

        The ID of the network insights analysis.

      • NetworkInsightsAnalysisArn (string) --

        The Amazon Resource Name (ARN) of the network insights analysis.

      • NetworkInsightsPathId (string) --

        The ID of the path.

      • FilterInArns (list) --

        The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.

        • (string) --
      • StartDate (datetime) --

        The time the analysis started.

      • Status (string) --

        The status of the network insights analysis.

      • StatusMessage (string) --

        The status message, if the status is failed .

      • WarningMessage (string) --

        The warning message.

      • NetworkPathFound (boolean) --

        Indicates whether the destination is reachable from the source.

      • ForwardPathComponents (list) --

        The components in the path from source to destination.

        • (dict) --

          Describes a path component.

          • SequenceNumber (integer) --

            The sequence number.

          • AclRule (dict) --

            The network ACL rule.

            • Cidr (string) --

              The IPv4 address range, in CIDR notation.

            • Egress (boolean) --

              Indicates whether the rule is an outbound rule.

            • PortRange (dict) --

              The range of ports.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • Protocol (string) --

              The protocol.

            • RuleAction (string) --

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber (integer) --

              The rule number.

          • AttachedTo (dict) --

            The resource to which the path component is attached.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Component (dict) --

            The component.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • DestinationVpc (dict) --

            The destination VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • OutboundHeader (dict) --

            The outbound header.

            • DestinationAddresses (list) --

              The destination addresses.

              • (string) --
            • DestinationPortRanges (list) --

              The destination port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

            • Protocol (string) --

              The protocol.

            • SourceAddresses (list) --

              The source addresses.

              • (string) --
            • SourcePortRanges (list) --

              The source port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

          • InboundHeader (dict) --

            The inbound header.

            • DestinationAddresses (list) --

              The destination addresses.

              • (string) --
            • DestinationPortRanges (list) --

              The destination port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

            • Protocol (string) --

              The protocol.

            • SourceAddresses (list) --

              The source addresses.

              • (string) --
            • SourcePortRanges (list) --

              The source port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

          • RouteTableRoute (dict) --

            The route table route.

            • DestinationCidr (string) --

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId (string) --

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId (string) --

              The ID of an egress-only internet gateway.

            • GatewayId (string) --

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId (string) --

              The ID of the instance, such as a NAT instance.

            • NatGatewayId (string) --

              The ID of a NAT gateway.

            • NetworkInterfaceId (string) --

              The ID of a network interface.

            • Origin (string) --

              Describes how the route was created. The following are the possible values:

              • CreateRouteTable - The route was automatically created when the route table was created.
              • CreateRoute - The route was manually added to the route table.
              • EnableVgwRoutePropagation - The route was propagated by route propagation.
            • TransitGatewayId (string) --

              The ID of a transit gateway.

            • VpcPeeringConnectionId (string) --

              The ID of a VPC peering connection.

          • SecurityGroupRule (dict) --

            The security group rule.

            • Cidr (string) --

              The IPv4 address range, in CIDR notation.

            • Direction (string) --

              The direction. The following are the possible values:

              • egress
              • ingress
            • SecurityGroupId (string) --

              The security group ID.

            • PortRange (dict) --

              The port range.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • PrefixListId (string) --

              The prefix list ID.

            • Protocol (string) --

              The protocol name.

          • SourceVpc (dict) --

            The source VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Subnet (dict) --

            The subnet.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Vpc (dict) --

            The component VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • AdditionalDetails (list) --

            The additional details.

            • (dict) --

              Describes an additional detail for a path analysis.

              • AdditionalDetailType (string) --

                The information type.

              • Component (dict) --

                The path component.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

          • TransitGateway (dict) --

            The transit gateway.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • TransitGatewayRouteTableRoute (dict) --

            The route in a transit gateway route table.

            • DestinationCidr (string) --

              The CIDR block used for destination matches.

            • State (string) --

              The state of the route.

            • RouteOrigin (string) --

              The route origin. The following are the possible values:

              • static
              • propagated
            • PrefixListId (string) --

              The ID of the prefix list.

            • AttachmentId (string) --

              The ID of the route attachment.

            • ResourceId (string) --

              The ID of the resource for the route attachment.

            • ResourceType (string) --

              The resource type for the route attachment.

      • ReturnPathComponents (list) --

        The components in the path from destination to source.

        • (dict) --

          Describes a path component.

          • SequenceNumber (integer) --

            The sequence number.

          • AclRule (dict) --

            The network ACL rule.

            • Cidr (string) --

              The IPv4 address range, in CIDR notation.

            • Egress (boolean) --

              Indicates whether the rule is an outbound rule.

            • PortRange (dict) --

              The range of ports.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • Protocol (string) --

              The protocol.

            • RuleAction (string) --

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber (integer) --

              The rule number.

          • AttachedTo (dict) --

            The resource to which the path component is attached.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Component (dict) --

            The component.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • DestinationVpc (dict) --

            The destination VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • OutboundHeader (dict) --

            The outbound header.

            • DestinationAddresses (list) --

              The destination addresses.

              • (string) --
            • DestinationPortRanges (list) --

              The destination port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

            • Protocol (string) --

              The protocol.

            • SourceAddresses (list) --

              The source addresses.

              • (string) --
            • SourcePortRanges (list) --

              The source port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

          • InboundHeader (dict) --

            The inbound header.

            • DestinationAddresses (list) --

              The destination addresses.

              • (string) --
            • DestinationPortRanges (list) --

              The destination port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

            • Protocol (string) --

              The protocol.

            • SourceAddresses (list) --

              The source addresses.

              • (string) --
            • SourcePortRanges (list) --

              The source port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

          • RouteTableRoute (dict) --

            The route table route.

            • DestinationCidr (string) --

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId (string) --

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId (string) --

              The ID of an egress-only internet gateway.

            • GatewayId (string) --

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId (string) --

              The ID of the instance, such as a NAT instance.

            • NatGatewayId (string) --

              The ID of a NAT gateway.

            • NetworkInterfaceId (string) --

              The ID of a network interface.

            • Origin (string) --

              Describes how the route was created. The following are the possible values:

              • CreateRouteTable - The route was automatically created when the route table was created.
              • CreateRoute - The route was manually added to the route table.
              • EnableVgwRoutePropagation - The route was propagated by route propagation.
            • TransitGatewayId (string) --

              The ID of a transit gateway.

            • VpcPeeringConnectionId (string) --

              The ID of a VPC peering connection.

          • SecurityGroupRule (dict) --

            The security group rule.

            • Cidr (string) --

              The IPv4 address range, in CIDR notation.

            • Direction (string) --

              The direction. The following are the possible values:

              • egress
              • ingress
            • SecurityGroupId (string) --

              The security group ID.

            • PortRange (dict) --

              The port range.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • PrefixListId (string) --

              The prefix list ID.

            • Protocol (string) --

              The protocol name.

          • SourceVpc (dict) --

            The source VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Subnet (dict) --

            The subnet.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Vpc (dict) --

            The component VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • AdditionalDetails (list) --

            The additional details.

            • (dict) --

              Describes an additional detail for a path analysis.

              • AdditionalDetailType (string) --

                The information type.

              • Component (dict) --

                The path component.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

          • TransitGateway (dict) --

            The transit gateway.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • TransitGatewayRouteTableRoute (dict) --

            The route in a transit gateway route table.

            • DestinationCidr (string) --

              The CIDR block used for destination matches.

            • State (string) --

              The state of the route.

            • RouteOrigin (string) --

              The route origin. The following are the possible values:

              • static
              • propagated
            • PrefixListId (string) --

              The ID of the prefix list.

            • AttachmentId (string) --

              The ID of the route attachment.

            • ResourceId (string) --

              The ID of the resource for the route attachment.

            • ResourceType (string) --

              The resource type for the route attachment.

      • Explanations (list) --

        The explanations. For more information, see Reachability Analyzer explanation codes .

        • (dict) --

          Describes an explanation code for an unreachable path. For more information, see Reachability Analyzer explanation codes .

          • Acl (dict) --

            The network ACL.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • AclRule (dict) --

            The network ACL rule.

            • Cidr (string) --

              The IPv4 address range, in CIDR notation.

            • Egress (boolean) --

              Indicates whether the rule is an outbound rule.

            • PortRange (dict) --

              The range of ports.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • Protocol (string) --

              The protocol.

            • RuleAction (string) --

              Indicates whether to allow or deny traffic that matches the rule.

            • RuleNumber (integer) --

              The rule number.

          • Address (string) --

            The IPv4 address, in CIDR notation.

          • Addresses (list) --

            The IPv4 addresses, in CIDR notation.

            • (string) --
          • AttachedTo (dict) --

            The resource to which the component is attached.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • AvailabilityZones (list) --

            The Availability Zones.

            • (string) --
          • Cidrs (list) --

            The CIDR ranges.

            • (string) --
          • Component (dict) --

            The component.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • CustomerGateway (dict) --

            The customer gateway.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Destination (dict) --

            The destination.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • DestinationVpc (dict) --

            The destination VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Direction (string) --

            The direction. The following are the possible values:

            • egress
            • ingress
          • ExplanationCode (string) --

            The explanation code.

          • IngressRouteTable (dict) --

            The route table.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • InternetGateway (dict) --

            The internet gateway.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • LoadBalancerArn (string) --

            The Amazon Resource Name (ARN) of the load balancer.

          • ClassicLoadBalancerListener (dict) --

            The listener for a Classic Load Balancer.

            • LoadBalancerPort (integer) --

              The port on which the load balancer is listening.

            • InstancePort (integer) --

              [Classic Load Balancers] The back-end port for the listener.

          • LoadBalancerListenerPort (integer) --

            The listener port of the load balancer.

          • LoadBalancerTarget (dict) --

            The target.

            • Address (string) --

              The IP address.

            • AvailabilityZone (string) --

              The Availability Zone.

            • Instance (dict) --

              Information about the instance.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Port (integer) --

              The port on which the target is listening.

          • LoadBalancerTargetGroup (dict) --

            The target group.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • LoadBalancerTargetGroups (list) --

            The target groups.

            • (dict) --

              Describes a path component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

          • LoadBalancerTargetPort (integer) --

            The target port.

          • ElasticLoadBalancerListener (dict) --

            The load balancer listener.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • MissingComponent (string) --

            The missing component.

          • NatGateway (dict) --

            The NAT gateway.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • NetworkInterface (dict) --

            The network interface.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • PacketField (string) --

            The packet field.

          • VpcPeeringConnection (dict) --

            The VPC peering connection.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Port (integer) --

            The port.

          • PortRanges (list) --

            The port ranges.

            • (dict) --

              Describes a range of ports.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

          • PrefixList (dict) --

            The prefix list.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Protocols (list) --

            The protocols.

            • (string) --
          • RouteTableRoute (dict) --

            The route table route.

            • DestinationCidr (string) --

              The destination IPv4 address, in CIDR notation.

            • DestinationPrefixListId (string) --

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId (string) --

              The ID of an egress-only internet gateway.

            • GatewayId (string) --

              The ID of the gateway, such as an internet gateway or virtual private gateway.

            • InstanceId (string) --

              The ID of the instance, such as a NAT instance.

            • NatGatewayId (string) --

              The ID of a NAT gateway.

            • NetworkInterfaceId (string) --

              The ID of a network interface.

            • Origin (string) --

              Describes how the route was created. The following are the possible values:

              • CreateRouteTable - The route was automatically created when the route table was created.
              • CreateRoute - The route was manually added to the route table.
              • EnableVgwRoutePropagation - The route was propagated by route propagation.
            • TransitGatewayId (string) --

              The ID of a transit gateway.

            • VpcPeeringConnectionId (string) --

              The ID of a VPC peering connection.

          • RouteTable (dict) --

            The route table.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • SecurityGroup (dict) --

            The security group.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • SecurityGroupRule (dict) --

            The security group rule.

            • Cidr (string) --

              The IPv4 address range, in CIDR notation.

            • Direction (string) --

              The direction. The following are the possible values:

              • egress
              • ingress
            • SecurityGroupId (string) --

              The security group ID.

            • PortRange (dict) --

              The port range.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • PrefixListId (string) --

              The prefix list ID.

            • Protocol (string) --

              The protocol name.

          • SecurityGroups (list) --

            The security groups.

            • (dict) --

              Describes a path component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

          • SourceVpc (dict) --

            The source VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • State (string) --

            The state.

          • Subnet (dict) --

            The subnet.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • SubnetRouteTable (dict) --

            The route table for the subnet.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • Vpc (dict) --

            The component VPC.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • VpcEndpoint (dict) --

            The VPC endpoint.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • VpnConnection (dict) --

            The VPN connection.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • VpnGateway (dict) --

            The VPN gateway.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • TransitGateway (dict) --

            The transit gateway.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • TransitGatewayRouteTable (dict) --

            The transit gateway route table.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

          • TransitGatewayRouteTableRoute (dict) --

            The transit gateway route table route.

            • DestinationCidr (string) --

              The CIDR block used for destination matches.

            • State (string) --

              The state of the route.

            • RouteOrigin (string) --

              The route origin. The following are the possible values:

              • static
              • propagated
            • PrefixListId (string) --

              The ID of the prefix list.

            • AttachmentId (string) --

              The ID of the route attachment.

            • ResourceId (string) --

              The ID of the resource for the route attachment.

            • ResourceType (string) --

              The resource type for the route attachment.

          • TransitGatewayAttachment (dict) --

            The transit gateway attachment.

            • Id (string) --

              The ID of the component.

            • Arn (string) --

              The Amazon Resource Name (ARN) of the component.

            • Name (string) --

              The name of the analysis component.

      • AlternatePathHints (list) --

        Potential intermediate components.

        • (dict) --

          Describes an potential intermediate component of a feasible path.

          • ComponentId (string) --

            The ID of the component.

          • ComponentArn (string) --

            The Amazon Resource Name (ARN) of the component.

      • Tags (list) --

        The tags.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

            Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

          • Value (string) --

            The value of the tag.

            Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

start_vpc_endpoint_service_private_dns_verification(**kwargs)

Initiates the verification process to prove that the service provider owns the private DNS name domain for the endpoint service.

The service provider must successfully perform the verification before the consumer can use the name to access the service.

Before the service provider runs this command, they must add a record to the DNS server.

See also: AWS API Documentation

Request Syntax

response = client.start_vpc_endpoint_service_private_dns_verification(
    DryRun=True|False,
    ServiceId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the endpoint service.

Return type

dict

Returns

Response Syntax

{
    'ReturnValue': True|False
}

Response Structure

  • (dict) --

    • ReturnValue (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

stop_instances(**kwargs)

Stops an Amazon EBS-backed instance. For more information, see Stop and start your instance in the Amazon EC2 User Guide .

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon EC2 User Guide .

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide .

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshoot stopping your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.stop_instances(
    InstanceIds=[
        'string',
    ],
    Hibernate=True|False,
    DryRun=True|False,
    Force=True|False
)
Parameters
  • InstanceIds (list) --

    [REQUIRED]

    The IDs of the instances.

    • (string) --
  • Hibernate (boolean) --

    Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'StoppingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StoppingInstances (list) --

      Information about the stopped instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

Examples

This example stops the specified EC2 instance.

response = client.stop_instances(
    InstanceIds=[
        'i-1234567890abcdef0',
    ],
)

print(response)

Expected Output:

{
    'StoppingInstances': [
        {
            'CurrentState': {
                'Code': 64,
                'Name': 'stopping',
            },
            'InstanceId': 'i-1234567890abcdef0',
            'PreviousState': {
                'Code': 16,
                'Name': 'running',
            },
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
terminate_client_vpn_connections(**kwargs)

Terminates active Client VPN endpoint connections. This action can be used to terminate a specific client connection, or up to five connections established by a specific user.

See also: AWS API Documentation

Request Syntax

response = client.terminate_client_vpn_connections(
    ClientVpnEndpointId='string',
    ConnectionId='string',
    Username='string',
    DryRun=True|False
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint to which the client is connected.

  • ConnectionId (string) -- The ID of the client connection to be terminated.
  • Username (string) -- The name of the user who initiated the connection. Use this option to terminate all active connections for the specified user. This option can only be used if the user has established up to five connections.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ClientVpnEndpointId': 'string',
    'Username': 'string',
    'ConnectionStatuses': [
        {
            'ConnectionId': 'string',
            'PreviousStatus': {
                'Code': 'active'|'failed-to-terminate'|'terminating'|'terminated',
                'Message': 'string'
            },
            'CurrentStatus': {
                'Code': 'active'|'failed-to-terminate'|'terminating'|'terminated',
                'Message': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • ClientVpnEndpointId (string) --

      The ID of the Client VPN endpoint.

    • Username (string) --

      The user who established the terminated client connections.

    • ConnectionStatuses (list) --

      The current state of the client connections.

      • (dict) --

        Information about a terminated Client VPN endpoint client connection.

        • ConnectionId (string) --

          The ID of the client connection.

        • PreviousStatus (dict) --

          The state of the client connection.

          • Code (string) --

            The state of the client connection.

          • Message (string) --

            A message about the status of the client connection, if applicable.

        • CurrentStatus (dict) --

          A message about the status of the client connection, if applicable.

          • Code (string) --

            The state of the client connection.

          • Message (string) --

            A message about the status of the client connection, if applicable.

terminate_instances(**kwargs)

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

If you terminate multiple instances across multiple Availability Zones, and one or more of the specified instances are enabled for termination protection, the request fails with the following results:

  • The specified instances that are in the same Availability Zone as the protected instance are not terminated.
  • The specified instances that are in different Availability Zones, where no other specified instances are protected, are successfully terminated.

For example, say you have the following instances:

  • Instance A: us-east-1a ; Not protected
  • Instance B: us-east-1a ; Not protected
  • Instance C: us-east-1b ; Protected
  • Instance D: us-east-1b ; not protected

If you attempt to terminate all of these instances in the same request, the request reports failure with the following results:

  • Instance A and Instance B are successfully terminated because none of the specified instances in us-east-1a are enabled for termination protection.
  • Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.terminate_instances(
    InstanceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • InstanceIds (list) --

    [REQUIRED]

    The IDs of the instances.

    Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'TerminatingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • TerminatingInstances (list) --

      Information about the terminated instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

Examples

This example terminates the specified EC2 instance.

response = client.terminate_instances(
    InstanceIds=[
        'i-1234567890abcdef0',
    ],
)

print(response)

Expected Output:

{
    'TerminatingInstances': [
        {
            'CurrentState': {
                'Code': 32,
                'Name': 'shutting-down',
            },
            'InstanceId': 'i-1234567890abcdef0',
            'PreviousState': {
                'Code': 16,
                'Name': 'running',
            },
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}
unassign_ipv6_addresses(**kwargs)

Unassigns one or more IPv6 addresses IPv4 Prefix Delegation prefixes from a network interface.

See also: AWS API Documentation

Request Syntax

response = client.unassign_ipv6_addresses(
    Ipv6Addresses=[
        'string',
    ],
    Ipv6Prefixes=[
        'string',
    ],
    NetworkInterfaceId='string'
)
Parameters
  • Ipv6Addresses (list) --

    The IPv6 addresses to unassign from the network interface.

    • (string) --
  • Ipv6Prefixes (list) --

    One or more IPv6 prefixes to unassign from the network interface.

    • (string) --
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

Return type

dict

Returns

Response Syntax

{
    'NetworkInterfaceId': 'string',
    'UnassignedIpv6Addresses': [
        'string',
    ],
    'UnassignedIpv6Prefixes': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • NetworkInterfaceId (string) --

      The ID of the network interface.

    • UnassignedIpv6Addresses (list) --

      The IPv6 addresses that have been unassigned from the network interface.

      • (string) --
    • UnassignedIpv6Prefixes (list) --

      The IPv4 prefixes that have been unassigned from the network interface.

      • (string) --

unassign_private_ip_addresses(**kwargs)

Unassigns one or more secondary private IP addresses, or IPv4 Prefix Delegation prefixes from a network interface.

See also: AWS API Documentation

Request Syntax

response = client.unassign_private_ip_addresses(
    NetworkInterfaceId='string',
    PrivateIpAddresses=[
        'string',
    ],
    Ipv4Prefixes=[
        'string',
    ]
)
Parameters
  • NetworkInterfaceId (string) --

    [REQUIRED]

    The ID of the network interface.

  • PrivateIpAddresses (list) --

    The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.

    • (string) --
  • Ipv4Prefixes (list) --

    The IPv4 prefixes to unassign from the network interface.

    • (string) --
Returns

None

Examples

This example unassigns the specified private IP address from the specified network interface.

response = client.unassign_private_ip_addresses(
    NetworkInterfaceId='eni-e5aa89a3',
    PrivateIpAddresses=[
        '10.0.0.82',
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
unmonitor_instances(**kwargs)

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = client.unmonitor_instances(
    InstanceIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • InstanceIds (list) --

    [REQUIRED]

    The IDs of the instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

update_security_group_rule_descriptions_egress(**kwargs)

[VPC only] Updates the description of an egress (outbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously. You can remove a description for a security group rule by omitting the description parameter in the request.

See also: AWS API Documentation

Request Syntax

response = client.update_security_group_rule_descriptions_egress(
    DryRun=True|False,
    GroupId='string',
    GroupName='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    SecurityGroupRuleDescriptions=[
        {
            'SecurityGroupRuleId': 'string',
            'Description': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupId (string) -- The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
  • GroupName (string) -- [Default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.
  • IpPermissions (list) --

    The IP permissions for the security group rule. You must specify either the IP permissions or the description.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • SecurityGroupRuleDescriptions (list) --

    The description for the egress security group rules. You must specify either the description or the IP permissions.

    • (dict) --

      Describes the description of a security group rule.

      You can use this when you want to update the security group rule description for either an inbound or outbound rule.

      • SecurityGroupRuleId (string) --

        The ID of the security group rule.

      • Description (string) --

        The description of the security group rule.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

Examples

This example updates the description for the specified security group rule.

response = client.update_security_group_rule_descriptions_egress(
    GroupId='sg-123abc12',
    IpPermissions=[
        {
            'FromPort': 80,
            'IpProtocol': 'tcp',
            'IpRanges': [
                {
                    'CidrIp': '203.0.113.0/24',
                    'Description': 'Outbound HTTP access to server 2',
                },
            ],
            'ToPort': 80,
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
update_security_group_rule_descriptions_ingress(**kwargs)

Updates the description of an ingress (inbound) security group rule. You can replace an existing description, or add a description to a rule that did not have one previously. You can remove a description for a security group rule by omitting the description parameter in the request.

See also: AWS API Documentation

Request Syntax

response = client.update_security_group_rule_descriptions_ingress(
    DryRun=True|False,
    GroupId='string',
    GroupName='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    SecurityGroupRuleDescriptions=[
        {
            'SecurityGroupRuleId': 'string',
            'Description': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupId (string) -- The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.
  • GroupName (string) -- [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.
  • IpPermissions (list) --

    The IP permissions for the security group rule. You must specify either IP permissions or a description.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • SecurityGroupRuleDescriptions (list) --

    [VPC only] The description for the ingress security group rules. You must specify either a description or IP permissions.

    • (dict) --

      Describes the description of a security group rule.

      You can use this when you want to update the security group rule description for either an inbound or outbound rule.

      • SecurityGroupRuleId (string) --

        The ID of the security group rule.

      • Description (string) --

        The description of the security group rule.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

Examples

This example updates the description for the specified security group rule.

response = client.update_security_group_rule_descriptions_ingress(
    GroupId='sg-123abc12',
    IpPermissions=[
        {
            'FromPort': 22,
            'IpProtocol': 'tcp',
            'IpRanges': [
                {
                    'CidrIp': '203.0.113.0/16',
                    'Description': 'SSH access from the LA office',
                },
            ],
            'ToPort': 22,
        },
    ],
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}
withdraw_byoip_cidr(**kwargs)

Stops advertising an address range that is provisioned as an address pool.

You can perform this operation at most once every 10 seconds, even if you specify different address ranges each time.

It can take a few minutes before traffic to the specified addresses stops routing to Amazon Web Services because of BGP propagation delays.

See also: AWS API Documentation

Request Syntax

response = client.withdraw_byoip_cidr(
    Cidr='string',
    DryRun=True|False
)
Parameters
  • Cidr (string) --

    [REQUIRED]

    The address range, in CIDR notation.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'ByoipCidr': {
        'Cidr': 'string',
        'Description': 'string',
        'StatusMessage': 'string',
        'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable'
    }
}

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address pool.

      • Cidr (string) --

        The address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

        Upon success, contains the ID of the address pool. Otherwise, contains an error message.

      • State (string) --

        The state of the address pool.

Paginators

The available paginators are:

class EC2.Paginator.DescribeAddressesAttribute
paginator = client.get_paginator('describe_addresses_attribute')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_addresses_attribute().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    AllocationIds=[
        'string',
    ],
    Attribute='domain-name',
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • AllocationIds (list) --

    [EC2-VPC] The allocation IDs.

    • (string) --
  • Attribute (string) -- The attribute of the IP address.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Addresses': [
        {
            'PublicIp': 'string',
            'AllocationId': 'string',
            'PtrRecord': 'string',
            'PtrRecordUpdate': {
                'Value': 'string',
                'Status': 'string',
                'Reason': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) --

    • Addresses (list) --

      Information about the IP addresses.

      • (dict) --

        The attributes associated with an Elastic IP address.

        • PublicIp (string) --

          The public IP address.

        • AllocationId (string) --

          [EC2-VPC] The allocation ID.

        • PtrRecord (string) --

          The pointer (PTR) record for the IP address.

        • PtrRecordUpdate (dict) --

          The updated PTR record for the IP address.

          • Value (string) --

            The value for the PTR record update.

          • Status (string) --

            The status of the PTR record update.

          • Reason (string) --

            The reason for the PTR record update.

class EC2.Paginator.DescribeByoipCidrs
paginator = client.get_paginator('describe_byoip_cidrs')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_byoip_cidrs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ByoipCidrs': [
        {
            'Cidr': 'string',
            'Description': 'string',
            'StatusMessage': 'string',
            'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'|'provisioned-not-publicly-advertisable'
        },
    ],

}

Response Structure

  • (dict) --

    • ByoipCidrs (list) --

      Information about your address ranges.

      • (dict) --

        Information about an address range that is provisioned for use with your Amazon Web Services resources through bring your own IP addresses (BYOIP).

        • Cidr (string) --

          The address range, in CIDR notation.

        • Description (string) --

          The description of the address range.

        • StatusMessage (string) --

          Upon success, contains the ID of the address pool. Otherwise, contains an error message.

        • State (string) --

          The state of the address pool.

class EC2.Paginator.DescribeCapacityReservationFleets
paginator = client.get_paginator('describe_capacity_reservation_fleets')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_capacity_reservation_fleets().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    CapacityReservationFleetIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • CapacityReservationFleetIds (list) --

    The IDs of the Capacity Reservation Fleets to describe.

    • (string) --
  • Filters (list) --

    One or more filters.

    • state - The state of the Fleet (submitted | modifying | active | partially_fulfilled | expiring | expired | cancelling | cancelled | failed ).
    • instance-match-criteria - The instance matching criteria for the Fleet. Only open is supported.
    • tenancy - The tenancy of the Fleet (default | dedicated ).
    • allocation-strategy - The allocation strategy used by the Fleet. Only prioritized is supported.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'CapacityReservationFleets': [
        {
            'CapacityReservationFleetId': 'string',
            'CapacityReservationFleetArn': 'string',
            'State': 'submitted'|'modifying'|'active'|'partially_fulfilled'|'expiring'|'expired'|'cancelling'|'cancelled'|'failed',
            'TotalTargetCapacity': 123,
            'TotalFulfilledCapacity': 123.0,
            'Tenancy': 'default',
            'EndDate': datetime(2015, 1, 1),
            'CreateTime': datetime(2015, 1, 1),
            'InstanceMatchCriteria': 'open',
            'AllocationStrategy': 'string',
            'InstanceTypeSpecifications': [
                {
                    'CapacityReservationId': 'string',
                    'AvailabilityZoneId': 'string',
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'InstancePlatform': 'Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
                    'AvailabilityZone': 'string',
                    'TotalInstanceCount': 123,
                    'FulfilledCapacity': 123.0,
                    'EbsOptimized': True|False,
                    'CreateDate': datetime(2015, 1, 1),
                    'Weight': 123.0,
                    'Priority': 123
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • CapacityReservationFleets (list) --

      Information about the Capacity Reservation Fleets.

      • (dict) --

        Information about a Capacity Reservation Fleet.

        • CapacityReservationFleetId (string) --

          The ID of the Capacity Reservation Fleet.

        • CapacityReservationFleetArn (string) --

          The ARN of the Capacity Reservation Fleet.

        • State (string) --

          The state of the Capacity Reservation Fleet. Possible states include:

          • submitted - The Capacity Reservation Fleet request has been submitted and Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations.
          • modifying - The Capacity Reservation Fleet is being modified. The Fleet remains in this state until the modification is complete.
          • active - The Capacity Reservation Fleet has fulfilled its total target capacity and it is attempting to maintain this capacity. The Fleet remains in this state until it is modified or deleted.
          • partially_fulfilled - The Capacity Reservation Fleet has partially fulfilled its total target capacity. There is insufficient Amazon EC2 to fulfill the total target capacity. The Fleet is attempting to asynchronously fulfill its total target capacity.
          • expiring - The Capacity Reservation Fleet has reach its end date and it is in the process of expiring. One or more of its Capacity reservations might still be active.
          • expired - The Capacity Reservation Fleet has reach its end date. The Fleet and its Capacity Reservations are expired. The Fleet can't create new Capacity Reservations.
          • cancelling - The Capacity Reservation Fleet is in the process of being cancelled. One or more of its Capacity reservations might still be active.
          • cancelled - The Capacity Reservation Fleet has been manually cancelled. The Fleet and its Capacity Reservations are cancelled and the Fleet can't create new Capacity Reservations.
          • failed - The Capacity Reservation Fleet failed to reserve capacity for the specified instance types.
        • TotalTargetCapacity (integer) --

          The total number of capacity units for which the Capacity Reservation Fleet reserves capacity. For more information, see Total target capacity in the Amazon EC2 User Guide.

        • TotalFulfilledCapacity (float) --

          The capacity units that have been fulfilled.

        • Tenancy (string) --

          The tenancy of the Capacity Reservation Fleet. Tenancies include:

          • default - The Capacity Reservation Fleet is created on hardware that is shared with other Amazon Web Services accounts.
          • dedicated - The Capacity Reservation Fleet is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
        • EndDate (datetime) --

          The date and time at which the Capacity Reservation Fleet expires.

        • CreateTime (datetime) --

          The date and time at which the Capacity Reservation Fleet was created.

        • InstanceMatchCriteria (string) --

          Indicates the type of instance launches that the Capacity Reservation Fleet accepts. All Capacity Reservations in the Fleet inherit this instance matching criteria.

          Currently, Capacity Reservation Fleets support open instance matching criteria only. This means that instances that have matching attributes (instance type, platform, and Availability Zone) run in the Capacity Reservations automatically. Instances do not need to explicitly target a Capacity Reservation Fleet to use its reserved capacity.

        • AllocationStrategy (string) --

          The strategy used by the Capacity Reservation Fleet to determine which of the specified instance types to use. For more information, see For more information, see Allocation strategy in the Amazon EC2 User Guide.

        • InstanceTypeSpecifications (list) --

          Information about the instance types for which to reserve the capacity.

          • (dict) --

            Information about a Capacity Reservation in a Capacity Reservation Fleet.

            • CapacityReservationId (string) --

              The ID of the Capacity Reservation.

            • AvailabilityZoneId (string) --

              The ID of the Availability Zone in which the Capacity Reservation reserves capacity.

            • InstanceType (string) --

              The instance type for which the Capacity Reservation reserves capacity.

            • InstancePlatform (string) --

              The type of operating system for which the Capacity Reservation reserves capacity.

            • AvailabilityZone (string) --

              The Availability Zone in which the Capacity Reservation reserves capacity.

            • TotalInstanceCount (integer) --

              The total number of instances for which the Capacity Reservation reserves capacity.

            • FulfilledCapacity (float) --

              The number of capacity units fulfilled by the Capacity Reservation. For more information, see Total target capacity in the Amazon EC2 User Guide.

            • EbsOptimized (boolean) --

              Indicates whether the Capacity Reservation reserves capacity for EBS-optimized instance types.

            • CreateDate (datetime) --

              The date and time at which the Capacity Reservation was created.

            • Weight (float) --

              The weight of the instance type in the Capacity Reservation Fleet. For more information, see Instance type weight in the Amazon EC2 User Guide.

            • Priority (integer) --

              The priority of the instance type in the Capacity Reservation Fleet. For more information, see Instance type priority in the Amazon EC2 User Guide.

        • Tags (list) --

          The tags assigned to the Capacity Reservation Fleet.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeCapacityReservations
paginator = client.get_paginator('describe_capacity_reservations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_capacity_reservations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    CapacityReservationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • CapacityReservationIds (list) --

    The ID of the Capacity Reservation.

    • (string) --
  • Filters (list) --

    One or more filters.

    • instance-type - The type of instance for which the Capacity Reservation reserves capacity.
    • owner-id - The ID of the Amazon Web Services account that owns the Capacity Reservation.
    • instance-platform - The type of operating system for which the Capacity Reservation reserves capacity.
    • availability-zone - The Availability Zone of the Capacity Reservation.
    • tenancy - Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:
      • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.
      • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.
    • state - The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:
      • active - The Capacity Reservation is active and the capacity is available for your use.
      • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
      • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
      • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
      • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
    • start-date - The date and time at which the Capacity Reservation was started.
    • end-date - The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.
    • end-date-type - Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
      • unlimited - The Capacity Reservation remains active until you explicitly cancel it.
      • limited - The Capacity Reservation expires automatically at a specified date and time.
    • instance-match-criteria - Indicates the type of instance launches that the Capacity Reservation accepts. The options include:
      • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.
      • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
    • placement-group-arn - The ARN of the cluster placement group in which the Capacity Reservation was created.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'CapacityReservations': [
        {
            'CapacityReservationId': 'string',
            'OwnerId': 'string',
            'CapacityReservationArn': 'string',
            'AvailabilityZoneId': 'string',
            'InstanceType': 'string',
            'InstancePlatform': 'Linux/UNIX'|'Red Hat Enterprise Linux'|'SUSE Linux'|'Windows'|'Windows with SQL Server'|'Windows with SQL Server Enterprise'|'Windows with SQL Server Standard'|'Windows with SQL Server Web'|'Linux with SQL Server Standard'|'Linux with SQL Server Web'|'Linux with SQL Server Enterprise'|'RHEL with SQL Server Standard'|'RHEL with SQL Server Enterprise'|'RHEL with SQL Server Web'|'RHEL with HA'|'RHEL with HA and SQL Server Standard'|'RHEL with HA and SQL Server Enterprise',
            'AvailabilityZone': 'string',
            'Tenancy': 'default'|'dedicated',
            'TotalInstanceCount': 123,
            'AvailableInstanceCount': 123,
            'EbsOptimized': True|False,
            'EphemeralStorage': True|False,
            'State': 'active'|'expired'|'cancelled'|'pending'|'failed',
            'StartDate': datetime(2015, 1, 1),
            'EndDate': datetime(2015, 1, 1),
            'EndDateType': 'unlimited'|'limited',
            'InstanceMatchCriteria': 'open'|'targeted',
            'CreateDate': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'OutpostArn': 'string',
            'CapacityReservationFleetId': 'string',
            'PlacementGroupArn': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • CapacityReservations (list) --

      Information about the Capacity Reservations.

      • (dict) --

        Describes a Capacity Reservation.

        • CapacityReservationId (string) --

          The ID of the Capacity Reservation.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the Capacity Reservation.

        • CapacityReservationArn (string) --

          The Amazon Resource Name (ARN) of the Capacity Reservation.

        • AvailabilityZoneId (string) --

          The Availability Zone ID of the Capacity Reservation.

        • InstanceType (string) --

          The type of instance for which the Capacity Reservation reserves capacity.

        • InstancePlatform (string) --

          The type of operating system for which the Capacity Reservation reserves capacity.

        • AvailabilityZone (string) --

          The Availability Zone in which the capacity is reserved.

        • Tenancy (string) --

          Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can have one of the following tenancy settings:

          • default - The Capacity Reservation is created on hardware that is shared with other Amazon Web Services accounts.
          • dedicated - The Capacity Reservation is created on single-tenant hardware that is dedicated to a single Amazon Web Services account.
        • TotalInstanceCount (integer) --

          The total number of instances for which the Capacity Reservation reserves capacity.

        • AvailableInstanceCount (integer) --

          The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.

        • EbsOptimized (boolean) --

          Indicates whether the Capacity Reservation supports EBS-optimized instances. 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.

        • EphemeralStorage (boolean) --

          Deprecated.

        • State (string) --

          The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:

          • active - The Capacity Reservation is active and the capacity is available for your use.
          • expired - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.
          • cancelled - The Capacity Reservation was cancelled. The reserved capacity is no longer available for your use.
          • pending - The Capacity Reservation request was successful but the capacity provisioning is still pending.
          • failed - The Capacity Reservation request has failed. A request might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.
        • StartDate (datetime) --

          The date and time at which the Capacity Reservation was started.

        • EndDate (datetime) --

          The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired when it reaches its end date and time.

        • EndDateType (string) --

          Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:

          • unlimited - The Capacity Reservation remains active until you explicitly cancel it.
          • limited - The Capacity Reservation expires automatically at a specified date and time.
        • InstanceMatchCriteria (string) --

          Indicates the type of instance launches that the Capacity Reservation accepts. The options include:

          • open - The Capacity Reservation accepts all instances that have matching attributes (instance type, platform, and Availability Zone). Instances that have matching attributes launch into the Capacity Reservation automatically without specifying any additional parameters.
          • targeted - The Capacity Reservation only accepts instances that have matching attributes (instance type, platform, and Availability Zone), and explicitly target the Capacity Reservation. This ensures that only permitted instances can use the reserved capacity.
        • CreateDate (datetime) --

          The date and time at which the Capacity Reservation was created.

        • Tags (list) --

          Any tags assigned to the Capacity Reservation.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation was created.

        • CapacityReservationFleetId (string) --

          The ID of the Capacity Reservation Fleet to which the Capacity Reservation belongs. Only valid for Capacity Reservations that were created by a Capacity Reservation Fleet.

        • PlacementGroupArn (string) --

          The Amazon Resource Name (ARN) of the cluster placement group in which the Capacity Reservation was created. For more information, see Capacity Reservations for cluster placement groups in the Amazon EC2 User Guide .

class EC2.Paginator.DescribeCarrierGateways
paginator = client.get_paginator('describe_carrier_gateways')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_carrier_gateways().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    CarrierGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • CarrierGatewayIds (list) --

    One or more carrier gateway IDs.

    • (string) --
  • Filters (list) --

    One or more filters.

    • carrier-gateway-id - The ID of the carrier gateway.
    • state - The state of the carrier gateway (pending | failed | available | deleting | deleted ).
    • owner-id - The Amazon Web Services account ID of the owner of the carrier gateway.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC associated with the carrier gateway.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'CarrierGateways': [
        {
            'CarrierGatewayId': 'string',
            'VpcId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • CarrierGateways (list) --

      Information about the carrier gateway.

      • (dict) --

        Describes a carrier gateway.

        • CarrierGatewayId (string) --

          The ID of the carrier gateway.

        • VpcId (string) --

          The ID of the VPC associated with the carrier gateway.

        • State (string) --

          The state of the carrier gateway.

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the carrier gateway.

        • Tags (list) --

          The tags assigned to the carrier gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeClassicLinkInstances
paginator = client.get_paginator('describe_classic_link_instances')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_classic_link_instances().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    InstanceIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • group-id - The ID of a VPC security group that's associated with the instance.
    • instance-id - The ID of the instance.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC to which the instance is linked. vpc-id - The ID of the VPC that the instance is linked to.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceIds (list) --

    One or more instance IDs. Must be instances linked to a VPC through ClassicLink.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Instances': [
        {
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'InstanceId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Instances (list) --

      Information about one or more linked EC2-Classic instances.

      • (dict) --

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        Describes a linked EC2-Classic instance.

        • Groups (list) --

          A list of security groups.

          • (dict) --

            Describes a security group.

            • GroupName (string) --

              The name of the security group.

            • GroupId (string) --

              The ID of the security group.

        • InstanceId (string) --

          The ID of the instance.

        • Tags (list) --

          Any tags assigned to the instance.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • VpcId (string) --

          The ID of the VPC.

class EC2.Paginator.DescribeClientVpnAuthorizationRules
paginator = client.get_paginator('describe_client_vpn_authorization_rules')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_client_vpn_authorization_rules().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ClientVpnEndpointId='string',
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • description - The description of the authorization rule.
    • destination-cidr - The CIDR of the network to which the authorization rule applies.
    • group-id - The ID of the Active Directory group to which the authorization rule grants access.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'AuthorizationRules': [
        {
            'ClientVpnEndpointId': 'string',
            'Description': 'string',
            'GroupId': 'string',
            'AccessAll': True|False,
            'DestinationCidr': 'string',
            'Status': {
                'Code': 'authorizing'|'active'|'failed'|'revoking',
                'Message': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) --

    • AuthorizationRules (list) --

      Information about the authorization rules.

      • (dict) --

        Information about an authorization rule.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint with which the authorization rule is associated.

        • Description (string) --

          A brief description of the authorization rule.

        • GroupId (string) --

          The ID of the Active Directory group to which the authorization rule grants access.

        • AccessAll (boolean) --

          Indicates whether the authorization rule grants access to all clients.

        • DestinationCidr (string) --

          The IPv4 address range, in CIDR notation, of the network to which the authorization rule applies.

        • Status (dict) --

          The current state of the authorization rule.

          • Code (string) --

            The state of the authorization rule.

          • Message (string) --

            A message about the status of the authorization rule, if applicable.

class EC2.Paginator.DescribeClientVpnConnections
paginator = client.get_paginator('describe_client_vpn_connections')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_client_vpn_connections().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ClientVpnEndpointId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • connection-id - The ID of the connection.
    • username - For Active Directory client authentication, the user name of the client who established the client connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Connections': [
        {
            'ClientVpnEndpointId': 'string',
            'Timestamp': 'string',
            'ConnectionId': 'string',
            'Username': 'string',
            'ConnectionEstablishedTime': 'string',
            'IngressBytes': 'string',
            'EgressBytes': 'string',
            'IngressPackets': 'string',
            'EgressPackets': 'string',
            'ClientIp': 'string',
            'CommonName': 'string',
            'Status': {
                'Code': 'active'|'failed-to-terminate'|'terminating'|'terminated',
                'Message': 'string'
            },
            'ConnectionEndTime': 'string',
            'PostureComplianceStatuses': [
                'string',
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • Connections (list) --

      Information about the active and terminated client connections.

      • (dict) --

        Describes a client connection.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint to which the client is connected.

        • Timestamp (string) --

          The current date and time.

        • ConnectionId (string) --

          The ID of the client connection.

        • Username (string) --

          The username of the client who established the client connection. This information is only provided if Active Directory client authentication is used.

        • ConnectionEstablishedTime (string) --

          The date and time the client connection was established.

        • IngressBytes (string) --

          The number of bytes sent by the client.

        • EgressBytes (string) --

          The number of bytes received by the client.

        • IngressPackets (string) --

          The number of packets sent by the client.

        • EgressPackets (string) --

          The number of packets received by the client.

        • ClientIp (string) --

          The IP address of the client.

        • CommonName (string) --

          The common name associated with the client. This is either the name of the client certificate, or the Active Directory user name.

        • Status (dict) --

          The current state of the client connection.

          • Code (string) --

            The state of the client connection.

          • Message (string) --

            A message about the status of the client connection, if applicable.

        • ConnectionEndTime (string) --

          The date and time the client connection was terminated.

        • PostureComplianceStatuses (list) --

          The statuses returned by the client connect handler for posture compliance, if applicable.

          • (string) --

class EC2.Paginator.DescribeClientVpnEndpoints
paginator = client.get_paginator('describe_client_vpn_endpoints')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_client_vpn_endpoints().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ClientVpnEndpointIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ClientVpnEndpointIds (list) --

    The ID of the Client VPN endpoint.

    • (string) --
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • endpoint-id - The ID of the Client VPN endpoint.
    • transport-protocol - The transport protocol (tcp | udp ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ClientVpnEndpoints': [
        {
            'ClientVpnEndpointId': 'string',
            'Description': 'string',
            'Status': {
                'Code': 'pending-associate'|'available'|'deleting'|'deleted',
                'Message': 'string'
            },
            'CreationTime': 'string',
            'DeletionTime': 'string',
            'DnsName': 'string',
            'ClientCidrBlock': 'string',
            'DnsServers': [
                'string',
            ],
            'SplitTunnel': True|False,
            'VpnProtocol': 'openvpn',
            'TransportProtocol': 'tcp'|'udp',
            'VpnPort': 123,
            'AssociatedTargetNetworks': [
                {
                    'NetworkId': 'string',
                    'NetworkType': 'vpc'
                },
            ],
            'ServerCertificateArn': 'string',
            'AuthenticationOptions': [
                {
                    'Type': 'certificate-authentication'|'directory-service-authentication'|'federated-authentication',
                    'ActiveDirectory': {
                        'DirectoryId': 'string'
                    },
                    'MutualAuthentication': {
                        'ClientRootCertificateChain': 'string'
                    },
                    'FederatedAuthentication': {
                        'SamlProviderArn': 'string',
                        'SelfServiceSamlProviderArn': 'string'
                    }
                },
            ],
            'ConnectionLogOptions': {
                'Enabled': True|False,
                'CloudwatchLogGroup': 'string',
                'CloudwatchLogStream': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'SecurityGroupIds': [
                'string',
            ],
            'VpcId': 'string',
            'SelfServicePortalUrl': 'string',
            'ClientConnectOptions': {
                'Enabled': True|False,
                'LambdaFunctionArn': 'string',
                'Status': {
                    'Code': 'applying'|'applied',
                    'Message': 'string'
                }
            },
            'SessionTimeoutHours': 123,
            'ClientLoginBannerOptions': {
                'Enabled': True|False,
                'BannerText': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) --

    • ClientVpnEndpoints (list) --

      Information about the Client VPN endpoints.

      • (dict) --

        Describes a Client VPN endpoint.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint.

        • Description (string) --

          A brief description of the endpoint.

        • Status (dict) --

          The current state of the Client VPN endpoint.

          • Code (string) --

            The state of the Client VPN endpoint. Possible states include:

            • pending-associate - The Client VPN endpoint has been created but no target networks have been associated. The Client VPN endpoint cannot accept connections.
            • available - The Client VPN endpoint has been created and a target network has been associated. The Client VPN endpoint can accept connections.
            • deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint cannot accept connections.
            • deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint cannot accept connections.
          • Message (string) --

            A message about the status of the Client VPN endpoint.

        • CreationTime (string) --

          The date and time the Client VPN endpoint was created.

        • DeletionTime (string) --

          The date and time the Client VPN endpoint was deleted, if applicable.

        • DnsName (string) --

          The DNS name to be used by clients when connecting to the Client VPN endpoint.

        • ClientCidrBlock (string) --

          The IPv4 address range, in CIDR notation, from which client IP addresses are assigned.

        • DnsServers (list) --

          Information about the DNS servers to be used for DNS resolution.

          • (string) --
        • SplitTunnel (boolean) --

          Indicates whether split-tunnel is enabled in the Client VPN endpoint.

          For information about split-tunnel VPN endpoints, see Split-Tunnel Client VPN endpoint in the Client VPN Administrator Guide .

        • VpnProtocol (string) --

          The protocol used by the VPN session.

        • TransportProtocol (string) --

          The transport protocol used by the Client VPN endpoint.

        • VpnPort (integer) --

          The port number for the Client VPN endpoint.

        • AssociatedTargetNetworks (list) --

          Information about the associated target networks. A target network is a subnet in a VPC.

          • (dict) --

            Describes a target network that is associated with a Client VPN endpoint. A target network is a subnet in a VPC.

            • NetworkId (string) --

              The ID of the subnet.

            • NetworkType (string) --

              The target network type.

        • ServerCertificateArn (string) --

          The ARN of the server certificate.

        • AuthenticationOptions (list) --

          Information about the authentication method used by the Client VPN endpoint.

          • (dict) --

            Describes the authentication methods used by a Client VPN endpoint. For more information, see Authentication in the Client VPN Administrator Guide .

            • Type (string) --

              The authentication type used.

            • ActiveDirectory (dict) --

              Information about the Active Directory, if applicable.

              • DirectoryId (string) --

                The ID of the Active Directory used for authentication.

            • MutualAuthentication (dict) --

              Information about the authentication certificates, if applicable.

              • ClientRootCertificateChain (string) --

                The ARN of the client certificate.

            • FederatedAuthentication (dict) --

              Information about the IAM SAML identity provider, if applicable.

              • SamlProviderArn (string) --

                The Amazon Resource Name (ARN) of the IAM SAML identity provider.

              • SelfServiceSamlProviderArn (string) --

                The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.

        • ConnectionLogOptions (dict) --

          Information about the client connection logging options for the Client VPN endpoint.

          • Enabled (boolean) --

            Indicates whether client connection logging is enabled for the Client VPN endpoint.

          • CloudwatchLogGroup (string) --

            The name of the Amazon CloudWatch Logs log group to which connection logging data is published.

          • CloudwatchLogStream (string) --

            The name of the Amazon CloudWatch Logs log stream to which connection logging data is published.

        • Tags (list) --

          Any tags assigned to the Client VPN endpoint.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • SecurityGroupIds (list) --

          The IDs of the security groups for the target network.

          • (string) --
        • VpcId (string) --

          The ID of the VPC.

        • SelfServicePortalUrl (string) --

          The URL of the self-service portal.

        • ClientConnectOptions (dict) --

          The options for managing connection authorization for new client connections.

          • Enabled (boolean) --

            Indicates whether client connect options are enabled.

          • LambdaFunctionArn (string) --

            The Amazon Resource Name (ARN) of the Lambda function used for connection authorization.

          • Status (dict) --

            The status of any updates to the client connect options.

            • Code (string) --

              The status code.

            • Message (string) --

              The status message.

        • SessionTimeoutHours (integer) --

          The maximum VPN session duration time in hours.

          Valid values: 8 | 10 | 12 | 24

          Default value: 24

        • ClientLoginBannerOptions (dict) --

          Options for enabling a customizable text banner that will be displayed on Amazon Web Services provided clients when a VPN session is established.

          • Enabled (boolean) --

            Current state of text banner feature.

            Valid values: true | false

          • BannerText (string) --

            Customizable text that will be displayed in a banner on Amazon Web Services provided clients when a VPN session is established. UTF-8 encoded characters only. Maximum of 1400 characters.

class EC2.Paginator.DescribeClientVpnRoutes
paginator = client.get_paginator('describe_client_vpn_routes')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_client_vpn_routes().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ClientVpnEndpointId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • destination-cidr - The CIDR of the route destination.
    • origin - How the route was associated with the Client VPN endpoint (associate | add-route ).
    • target-subnet - The ID of the subnet through which traffic is routed.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Routes': [
        {
            'ClientVpnEndpointId': 'string',
            'DestinationCidr': 'string',
            'TargetSubnet': 'string',
            'Type': 'string',
            'Origin': 'string',
            'Status': {
                'Code': 'creating'|'active'|'failed'|'deleting',
                'Message': 'string'
            },
            'Description': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Routes (list) --

      Information about the Client VPN endpoint routes.

      • (dict) --

        Information about a Client VPN endpoint route.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint with which the route is associated.

        • DestinationCidr (string) --

          The IPv4 address range, in CIDR notation, of the route destination.

        • TargetSubnet (string) --

          The ID of the subnet through which traffic is routed.

        • Type (string) --

          The route type.

        • Origin (string) --

          Indicates how the route was associated with the Client VPN endpoint. associate indicates that the route was automatically added when the target network was associated with the Client VPN endpoint. add-route indicates that the route was manually added using the CreateClientVpnRoute action.

        • Status (dict) --

          The current state of the route.

          • Code (string) --

            The state of the Client VPN endpoint route.

          • Message (string) --

            A message about the status of the Client VPN endpoint route, if applicable.

        • Description (string) --

          A brief description of the route.

class EC2.Paginator.DescribeClientVpnTargetNetworks
paginator = client.get_paginator('describe_client_vpn_target_networks')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_client_vpn_target_networks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ClientVpnEndpointId='string',
    AssociationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ClientVpnEndpointId (string) --

    [REQUIRED]

    The ID of the Client VPN endpoint.

  • AssociationIds (list) --

    The IDs of the target network associations.

    • (string) --
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • association-id - The ID of the association.
    • target-network-id - The ID of the subnet specified as the target network.
    • vpc-id - The ID of the VPC in which the target network is located.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ClientVpnTargetNetworks': [
        {
            'AssociationId': 'string',
            'VpcId': 'string',
            'TargetNetworkId': 'string',
            'ClientVpnEndpointId': 'string',
            'Status': {
                'Code': 'associating'|'associated'|'association-failed'|'disassociating'|'disassociated',
                'Message': 'string'
            },
            'SecurityGroups': [
                'string',
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • ClientVpnTargetNetworks (list) --

      Information about the associated target networks.

      • (dict) --

        Describes a target network associated with a Client VPN endpoint.

        • AssociationId (string) --

          The ID of the association.

        • VpcId (string) --

          The ID of the VPC in which the target network (subnet) is located.

        • TargetNetworkId (string) --

          The ID of the subnet specified as the target network.

        • ClientVpnEndpointId (string) --

          The ID of the Client VPN endpoint with which the target network is associated.

        • Status (dict) --

          The current state of the target network association.

          • Code (string) --

            The state of the target network association.

          • Message (string) --

            A message about the status of the target network association, if applicable.

        • SecurityGroups (list) --

          The IDs of the security groups applied to the target network association.

          • (string) --

class EC2.Paginator.DescribeCoipPools
paginator = client.get_paginator('describe_coip_pools')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_coip_pools().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PoolIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • PoolIds (list) --

    The IDs of the address pools.

    • (string) --
  • Filters (list) --

    One or more filters.

    • coip-pool.local-gateway-route-table-id - The ID of the local gateway route table.
    • coip-pool.pool-id - The ID of the address pool.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'CoipPools': [
        {
            'PoolId': 'string',
            'PoolCidrs': [
                'string',
            ],
            'LocalGatewayRouteTableId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'PoolArn': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • CoipPools (list) --

      Information about the address pools.

      • (dict) --

        Describes a customer-owned address pool.

        • PoolId (string) --

          The ID of the address pool.

        • PoolCidrs (list) --

          The address ranges of the address pool.

          • (string) --
        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • PoolArn (string) --

          The ARN of the address pool.

class EC2.Paginator.DescribeDhcpOptions
paginator = client.get_paginator('describe_dhcp_options')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_dhcp_options().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DhcpOptionsIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DhcpOptionsIds (list) --

    The IDs of one or more DHCP options sets.

    Default: Describes all your DHCP options sets.

    • (string) --
  • Filters (list) --

    One or more filters.

    • dhcp-options-id - The ID of a DHCP options set.
    • key - The key for one of the options (for example, domain-name ).
    • value - The value for one of the options.
    • owner-id - The ID of the Amazon Web Services account that owns the DHCP options set.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'DhcpOptions': [
        {
            'DhcpConfigurations': [
                {
                    'Key': 'string',
                    'Values': [
                        {
                            'Value': 'string'
                        },
                    ]
                },
            ],
            'DhcpOptionsId': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • DhcpOptions (list) --

      Information about one or more DHCP options sets.

      • (dict) --

        Describes a set of DHCP options.

        • DhcpConfigurations (list) --

          One or more DHCP options in the set.

          • (dict) --

            Describes a DHCP configuration option.

            • Key (string) --

              The name of a DHCP option.

            • Values (list) --

              One or more values for the DHCP option.

              • (dict) --

                Describes a value for a resource attribute that is a String.

                • Value (string) --

                  The attribute value. The value is case-sensitive.

        • DhcpOptionsId (string) --

          The ID of the set of DHCP options.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the DHCP options set.

        • Tags (list) --

          Any tags assigned to the DHCP options set.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeEgressOnlyInternetGateways
paginator = client.get_paginator('describe_egress_only_internet_gateways')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_egress_only_internet_gateways().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    EgressOnlyInternetGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EgressOnlyInternetGatewayIds (list) --

    One or more egress-only internet gateway IDs.

    • (string) --
  • Filters (list) --

    One or more filters.

    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'EgressOnlyInternetGateways': [
        {
            'Attachments': [
                {
                    'State': 'attaching'|'attached'|'detaching'|'detached',
                    'VpcId': 'string'
                },
            ],
            'EgressOnlyInternetGatewayId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • EgressOnlyInternetGateways (list) --

      Information about the egress-only internet gateways.

      • (dict) --

        Describes an egress-only internet gateway.

        • Attachments (list) --

          Information about the attachment of the egress-only internet gateway.

          • (dict) --

            Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

            • State (string) --

              The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            • VpcId (string) --

              The ID of the VPC.

        • EgressOnlyInternetGatewayId (string) --

          The ID of the egress-only internet gateway.

        • Tags (list) --

          The tags assigned to the egress-only internet gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeExportImageTasks
paginator = client.get_paginator('describe_export_image_tasks')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_export_image_tasks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ExportImageTaskIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    Filter tasks using the task-state filter and one of the following values: active , completed , deleting , or deleted .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ExportImageTaskIds (list) --

    The IDs of the export image tasks.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ExportImageTasks': [
        {
            'Description': 'string',
            'ExportImageTaskId': 'string',
            'ImageId': 'string',
            'Progress': 'string',
            'S3ExportLocation': {
                'S3Bucket': 'string',
                'S3Prefix': 'string'
            },
            'Status': 'string',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • ExportImageTasks (list) --

      Information about the export image tasks.

      • (dict) --

        Describes an export image task.

        • Description (string) --

          A description of the image being exported.

        • ExportImageTaskId (string) --

          The ID of the export image task.

        • ImageId (string) --

          The ID of the image.

        • Progress (string) --

          The percent complete of the export image task.

        • S3ExportLocation (dict) --

          Information about the destination Amazon S3 bucket.

          • S3Bucket (string) --

            The destination Amazon S3 bucket.

          • S3Prefix (string) --

            The prefix (logical hierarchy) in the bucket.

        • Status (string) --

          The status of the export image task. The possible values are active , completed , deleting , and deleted .

        • StatusMessage (string) --

          The status message for the export image task.

        • Tags (list) --

          Any tags assigned to the export image 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 256 Unicode characters.

class EC2.Paginator.DescribeFastLaunchImages
paginator = client.get_paginator('describe_fast_launch_images')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_fast_launch_images().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ImageIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ImageIds (list) --

    Details for one or more Windows AMI image IDs.

    • (string) --
  • Filters (list) --

    Use the following filters to streamline results.

    • resource-type - The resource type for pre-provisioning.
    • launch-template - The launch template that is associated with the pre-provisioned Windows AMI.
    • owner-id - The owner ID for the pre-provisioning resource.
    • state - The current state of fast launching for the Windows AMI.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'FastLaunchImages': [
        {
            'ImageId': 'string',
            'ResourceType': 'snapshot',
            'SnapshotConfiguration': {
                'TargetResourceCount': 123
            },
            'LaunchTemplate': {
                'LaunchTemplateId': 'string',
                'LaunchTemplateName': 'string',
                'Version': 'string'
            },
            'MaxParallelLaunches': 123,
            'OwnerId': 'string',
            'State': 'enabling'|'enabling-failed'|'enabled'|'enabled-failed'|'disabling'|'disabling-failed',
            'StateTransitionReason': 'string',
            'StateTransitionTime': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • FastLaunchImages (list) --

      A collection of details about the fast-launch enabled Windows images that meet the requested criteria.

      • (dict) --

        Describe details about a fast-launch enabled Windows image that meets the requested criteria. Criteria are defined by the DescribeFastLaunchImages action filters.

        • ImageId (string) --

          The image ID that identifies the fast-launch enabled Windows image.

        • ResourceType (string) --

          The resource type that is used for pre-provisioning the Windows AMI. Supported values include: snapshot .

        • SnapshotConfiguration (dict) --

          A group of parameters that are used for pre-provisioning the associated Windows AMI using snapshots.

          • TargetResourceCount (integer) --

            The number of pre-provisioned snapshots requested to keep on hand for a fast-launch enabled Windows AMI.

        • LaunchTemplate (dict) --

          The launch template that the fast-launch enabled Windows AMI uses when it launches Windows instances from pre-provisioned snapshots.

          • LaunchTemplateId (string) --

            The ID of the launch template for faster launching of the associated Windows AMI.

          • LaunchTemplateName (string) --

            The name of the launch template for faster launching of the associated Windows AMI.

          • Version (string) --

            The version of the launch template for faster launching of the associated Windows AMI.

        • MaxParallelLaunches (integer) --

          The maximum number of parallel instances that are launched for creating resources.

        • OwnerId (string) --

          The owner ID for the fast-launch enabled Windows AMI.

        • State (string) --

          The current state of faster launching for the specified Windows AMI.

        • StateTransitionReason (string) --

          The reason that faster launching for the Windows AMI changed to the current state.

        • StateTransitionTime (datetime) --

          The time that faster launching for the Windows AMI changed to the current state.

class EC2.Paginator.DescribeFastSnapshotRestores
paginator = client.get_paginator('describe_fast_snapshot_restores')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_fast_snapshot_restores().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters. The possible values are:

    • availability-zone : The Availability Zone of the snapshot.
    • owner-id : The ID of the Amazon Web Services account that enabled fast snapshot restore on the snapshot.
    • snapshot-id : The ID of the snapshot.
    • state : The state of fast snapshot restores for the snapshot (enabling | optimizing | enabled | disabling | disabled ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'FastSnapshotRestores': [
        {
            'SnapshotId': 'string',
            'AvailabilityZone': 'string',
            'State': 'enabling'|'optimizing'|'enabled'|'disabling'|'disabled',
            'StateTransitionReason': 'string',
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'EnablingTime': datetime(2015, 1, 1),
            'OptimizingTime': datetime(2015, 1, 1),
            'EnabledTime': datetime(2015, 1, 1),
            'DisablingTime': datetime(2015, 1, 1),
            'DisabledTime': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • FastSnapshotRestores (list) --

      Information about the state of fast snapshot restores.

      • (dict) --

        Describes fast snapshot restores for a snapshot.

        • SnapshotId (string) --

          The ID of the snapshot.

        • AvailabilityZone (string) --

          The Availability Zone.

        • State (string) --

          The state of fast snapshot restores.

        • StateTransitionReason (string) --

          The reason for the state transition. The possible values are as follows:

          • Client.UserInitiated - The state successfully transitioned to enabling or disabling .
          • Client.UserInitiated - Lifecycle state transition - The state successfully transitioned to optimizing , enabled , or disabled .
        • OwnerId (string) --

          The ID of the Amazon Web Services account that enabled fast snapshot restores on the snapshot.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias that enabled fast snapshot restores on the snapshot. This is intended for future use.

        • EnablingTime (datetime) --

          The time at which fast snapshot restores entered the enabling state.

        • OptimizingTime (datetime) --

          The time at which fast snapshot restores entered the optimizing state.

        • EnabledTime (datetime) --

          The time at which fast snapshot restores entered the enabled state.

        • DisablingTime (datetime) --

          The time at which fast snapshot restores entered the disabling state.

        • DisabledTime (datetime) --

          The time at which fast snapshot restores entered the disabled state.

class EC2.Paginator.DescribeFleets
paginator = client.get_paginator('describe_fleets')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_fleets().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    FleetIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FleetIds (list) --

    The IDs of the EC2 Fleets.

    Note

    If a fleet is of type instant , you must specify the fleet ID, otherwise it does not appear in the response.

    • (string) --
  • Filters (list) --

    The filters.

    • activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment | pending-termination | fulfilled ).
    • excess-capacity-termination-policy - Indicates whether to terminate running instances if the target capacity is decreased below the current EC2 Fleet size (true | false ).
    • fleet-state - The state of the EC2 Fleet (submitted | active | deleted | failed | deleted-running | deleted-terminating | modifying ).
    • replace-unhealthy-instances - Indicates whether EC2 Fleet should replace unhealthy instances (true | false ).
    • type - The type of request (instant | request | maintain ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Fleets': [
        {
            'ActivityStatus': 'error'|'pending_fulfillment'|'pending_termination'|'fulfilled',
            'CreateTime': datetime(2015, 1, 1),
            'FleetId': 'string',
            'FleetState': 'submitted'|'active'|'deleted'|'failed'|'deleted_running'|'deleted_terminating'|'modifying',
            'ClientToken': 'string',
            'ExcessCapacityTerminationPolicy': 'no-termination'|'termination',
            'FulfilledCapacity': 123.0,
            'FulfilledOnDemandCapacity': 123.0,
            'LaunchTemplateConfigs': [
                {
                    'LaunchTemplateSpecification': {
                        'LaunchTemplateId': 'string',
                        'LaunchTemplateName': 'string',
                        'Version': 'string'
                    },
                    'Overrides': [
                        {
                            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                            'MaxPrice': 'string',
                            'SubnetId': 'string',
                            'AvailabilityZone': 'string',
                            'WeightedCapacity': 123.0,
                            'Priority': 123.0,
                            'Placement': {
                                'GroupName': 'string'
                            },
                            'InstanceRequirements': {
                                'VCpuCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'MemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'CpuManufacturers': [
                                    'intel'|'amd'|'amazon-web-services',
                                ],
                                'MemoryGiBPerVCpu': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'ExcludedInstanceTypes': [
                                    'string',
                                ],
                                'InstanceGenerations': [
                                    'current'|'previous',
                                ],
                                'SpotMaxPricePercentageOverLowestPrice': 123,
                                'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                'BareMetal': 'included'|'required'|'excluded',
                                'BurstablePerformance': 'included'|'required'|'excluded',
                                'RequireHibernateSupport': True|False,
                                'NetworkInterfaceCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'LocalStorage': 'included'|'required'|'excluded',
                                'LocalStorageTypes': [
                                    'hdd'|'ssd',
                                ],
                                'TotalLocalStorageGB': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'BaselineEbsBandwidthMbps': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorTypes': [
                                    'gpu'|'fpga'|'inference',
                                ],
                                'AcceleratorCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorManufacturers': [
                                    'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                ],
                                'AcceleratorNames': [
                                    'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                ],
                                'AcceleratorTotalMemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                }
                            }
                        },
                    ]
                },
            ],
            'TargetCapacitySpecification': {
                'TotalTargetCapacity': 123,
                'OnDemandTargetCapacity': 123,
                'SpotTargetCapacity': 123,
                'DefaultTargetCapacityType': 'spot'|'on-demand',
                'TargetCapacityUnitType': 'vcpu'|'memory-mib'|'units'
            },
            'TerminateInstancesWithExpiration': True|False,
            'Type': 'request'|'maintain'|'instant',
            'ValidFrom': datetime(2015, 1, 1),
            'ValidUntil': datetime(2015, 1, 1),
            'ReplaceUnhealthyInstances': True|False,
            'SpotOptions': {
                'AllocationStrategy': 'lowest-price'|'diversified'|'capacity-optimized'|'capacity-optimized-prioritized',
                'MaintenanceStrategies': {
                    'CapacityRebalance': {
                        'ReplacementStrategy': 'launch'|'launch-before-terminate',
                        'TerminationDelay': 123
                    }
                },
                'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate',
                'InstancePoolsToUseCount': 123,
                'SingleInstanceType': True|False,
                'SingleAvailabilityZone': True|False,
                'MinTargetCapacity': 123,
                'MaxTotalPrice': 'string'
            },
            'OnDemandOptions': {
                'AllocationStrategy': 'lowest-price'|'prioritized',
                'CapacityReservationOptions': {
                    'UsageStrategy': 'use-capacity-reservations-first'
                },
                'SingleInstanceType': True|False,
                'SingleAvailabilityZone': True|False,
                'MinTargetCapacity': 123,
                'MaxTotalPrice': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Errors': [
                {
                    'LaunchTemplateAndOverrides': {
                        'LaunchTemplateSpecification': {
                            'LaunchTemplateId': 'string',
                            'LaunchTemplateName': 'string',
                            'Version': 'string'
                        },
                        'Overrides': {
                            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                            'MaxPrice': 'string',
                            'SubnetId': 'string',
                            'AvailabilityZone': 'string',
                            'WeightedCapacity': 123.0,
                            'Priority': 123.0,
                            'Placement': {
                                'GroupName': 'string'
                            },
                            'InstanceRequirements': {
                                'VCpuCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'MemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'CpuManufacturers': [
                                    'intel'|'amd'|'amazon-web-services',
                                ],
                                'MemoryGiBPerVCpu': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'ExcludedInstanceTypes': [
                                    'string',
                                ],
                                'InstanceGenerations': [
                                    'current'|'previous',
                                ],
                                'SpotMaxPricePercentageOverLowestPrice': 123,
                                'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                'BareMetal': 'included'|'required'|'excluded',
                                'BurstablePerformance': 'included'|'required'|'excluded',
                                'RequireHibernateSupport': True|False,
                                'NetworkInterfaceCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'LocalStorage': 'included'|'required'|'excluded',
                                'LocalStorageTypes': [
                                    'hdd'|'ssd',
                                ],
                                'TotalLocalStorageGB': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'BaselineEbsBandwidthMbps': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorTypes': [
                                    'gpu'|'fpga'|'inference',
                                ],
                                'AcceleratorCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorManufacturers': [
                                    'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                ],
                                'AcceleratorNames': [
                                    'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                ],
                                'AcceleratorTotalMemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                }
                            }
                        }
                    },
                    'Lifecycle': 'spot'|'on-demand',
                    'ErrorCode': 'string',
                    'ErrorMessage': 'string'
                },
            ],
            'Instances': [
                {
                    'LaunchTemplateAndOverrides': {
                        'LaunchTemplateSpecification': {
                            'LaunchTemplateId': 'string',
                            'LaunchTemplateName': 'string',
                            'Version': 'string'
                        },
                        'Overrides': {
                            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                            'MaxPrice': 'string',
                            'SubnetId': 'string',
                            'AvailabilityZone': 'string',
                            'WeightedCapacity': 123.0,
                            'Priority': 123.0,
                            'Placement': {
                                'GroupName': 'string'
                            },
                            'InstanceRequirements': {
                                'VCpuCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'MemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'CpuManufacturers': [
                                    'intel'|'amd'|'amazon-web-services',
                                ],
                                'MemoryGiBPerVCpu': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'ExcludedInstanceTypes': [
                                    'string',
                                ],
                                'InstanceGenerations': [
                                    'current'|'previous',
                                ],
                                'SpotMaxPricePercentageOverLowestPrice': 123,
                                'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                'BareMetal': 'included'|'required'|'excluded',
                                'BurstablePerformance': 'included'|'required'|'excluded',
                                'RequireHibernateSupport': True|False,
                                'NetworkInterfaceCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'LocalStorage': 'included'|'required'|'excluded',
                                'LocalStorageTypes': [
                                    'hdd'|'ssd',
                                ],
                                'TotalLocalStorageGB': {
                                    'Min': 123.0,
                                    'Max': 123.0
                                },
                                'BaselineEbsBandwidthMbps': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorTypes': [
                                    'gpu'|'fpga'|'inference',
                                ],
                                'AcceleratorCount': {
                                    'Min': 123,
                                    'Max': 123
                                },
                                'AcceleratorManufacturers': [
                                    'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                ],
                                'AcceleratorNames': [
                                    'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                ],
                                'AcceleratorTotalMemoryMiB': {
                                    'Min': 123,
                                    'Max': 123
                                }
                            }
                        }
                    },
                    'Lifecycle': 'spot'|'on-demand',
                    'InstanceIds': [
                        'string',
                    ],
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'Platform': 'Windows'
                },
            ],
            'Context': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Fleets (list) --

      Information about the EC2 Fleets.

      • (dict) --

        Describes an EC2 Fleet.

        • ActivityStatus (string) --

          The progress of the EC2 Fleet. If there is an error, the status is error . After all requests are placed, the status is pending_fulfillment . If the size of the EC2 Fleet is equal to or greater than its target capacity, the status is fulfilled . If the size of the EC2 Fleet is decreased, the status is pending_termination while instances are terminating.

        • CreateTime (datetime) --

          The creation date and time of the EC2 Fleet.

        • FleetId (string) --

          The ID of the EC2 Fleet.

        • FleetState (string) --

          The state of the EC2 Fleet.

        • ClientToken (string) --

          Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency .

          Constraints: Maximum 64 ASCII characters

        • ExcessCapacityTerminationPolicy (string) --

          Indicates whether running instances should be terminated if the target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.

        • FulfilledCapacity (float) --

          The number of units fulfilled by this request compared to the set target capacity.

        • FulfilledOnDemandCapacity (float) --

          The number of units fulfilled by this request compared to the set target On-Demand capacity.

        • LaunchTemplateConfigs (list) --

          The launch template and overrides.

          • (dict) --

            Describes a launch template and overrides.

            • LaunchTemplateSpecification (dict) --

              The launch template.

              • LaunchTemplateId (string) --

                The ID of the launch template.

                You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

              • LaunchTemplateName (string) --

                The name of the launch template.

                You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

              • Version (string) --

                The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                If the value is $Default , Amazon EC2 uses the default version of the launch template.

            • Overrides (list) --

              Any parameters that you specify override the same parameters in the launch template.

              • (dict) --

                Describes overrides for a launch template.

                • InstanceType (string) --

                  The instance type.

                  Note

                  If you specify InstanceTypes , you can't specify InstanceRequirements .

                • MaxPrice (string) --

                  The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                  Warning

                  If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                • SubnetId (string) --

                  The ID of the subnet in which to launch the instances.

                • AvailabilityZone (string) --

                  The Availability Zone in which to launch the instances.

                • WeightedCapacity (float) --

                  The number of units provided by the specified instance type.

                • Priority (float) --

                  The priority for the launch template override. The highest priority is launched first.

                  If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                  If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                  Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

                • Placement (dict) --

                  The location where the instance launched, if applicable.

                  • GroupName (string) --

                    The name of the placement group that the instance is in.

                • InstanceRequirements (dict) --

                  The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                  Note

                  If you specify InstanceRequirements , you can't specify InstanceTypes .

                  • VCpuCount (dict) --

                    The minimum and maximum number of vCPUs.

                    • Min (integer) --

                      The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                    • Max (integer) --

                      The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                  • MemoryMiB (dict) --

                    The minimum and maximum amount of memory, in MiB.

                    • Min (integer) --

                      The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                  • CpuManufacturers (list) --

                    The CPU manufacturers to include.

                    • For instance types with Intel CPUs, specify intel .
                    • For instance types with AMD CPUs, specify amd .
                    • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                    Note

                    Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                    Default: Any manufacturer

                    • (string) --
                  • MemoryGiBPerVCpu (dict) --

                    The minimum and maximum amount of memory per vCPU, in GiB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                  • ExcludedInstanceTypes (list) --

                    The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                    For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                    Default: No excluded instance types

                    • (string) --
                  • InstanceGenerations (list) --

                    Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                    For current generation instance types, specify current .

                    For previous generation instance types, specify previous .

                    Default: Current and previous generation instance types

                    • (string) --
                  • SpotMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 100

                  • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 20

                  • BareMetal (string) --

                    Indicates whether bare metal instance types must be included, excluded, or required.

                    • To include bare metal instance types, specify included .
                    • To require only bare metal instance types, specify required .
                    • To exclude bare metal instance types, specify excluded .

                    Default: excluded

                  • BurstablePerformance (string) --

                    Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                    • To include burstable performance instance types, specify included .
                    • To require only burstable performance instance types, specify required .
                    • To exclude burstable performance instance types, specify excluded .

                    Default: excluded

                  • RequireHibernateSupport (boolean) --

                    Indicates whether instance types must support hibernation for On-Demand Instances.

                    This parameter is not supported for GetSpotPlacementScores .

                    Default: false

                  • NetworkInterfaceCount (dict) --

                    The minimum and maximum number of network interfaces.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                  • LocalStorage (string) --

                    Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                    • To include instance types with instance store volumes, specify included .
                    • To require only instance types with instance store volumes, specify required .
                    • To exclude instance types with instance store volumes, specify excluded .

                    Default: included

                  • LocalStorageTypes (list) --

                    The type of local storage that is required.

                    • For instance types with hard disk drive (HDD) storage, specify hdd .
                    • For instance types with solid state drive (SSD) storage, specify ssd .

                    Default: hdd and ssd

                    • (string) --
                  • TotalLocalStorageGB (dict) --

                    The minimum and maximum amount of total local storage, in GB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                  • BaselineEbsBandwidthMbps (dict) --

                    The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorTypes (list) --

                    The accelerator types that must be on the instance type.

                    • For instance types with GPU accelerators, specify gpu .
                    • For instance types with FPGA accelerators, specify fpga .
                    • For instance types with inference accelerators, specify inference .

                    Default: Any accelerator type

                    • (string) --
                  • AcceleratorCount (dict) --

                    The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                    To exclude accelerator-enabled instance types, set Max to 0 .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorManufacturers (list) --

                    Indicates whether instance types must have accelerators by specific manufacturers.

                    • For instance types with NVIDIA devices, specify nvidia .
                    • For instance types with AMD devices, specify amd .
                    • For instance types with Amazon Web Services devices, specify amazon-web-services .
                    • For instance types with Xilinx devices, specify xilinx .

                    Default: Any manufacturer

                    • (string) --
                  • AcceleratorNames (list) --

                    The accelerators that must be on the instance type.

                    • For instance types with NVIDIA A100 GPUs, specify a100 .
                    • For instance types with NVIDIA V100 GPUs, specify v100 .
                    • For instance types with NVIDIA K80 GPUs, specify k80 .
                    • For instance types with NVIDIA T4 GPUs, specify t4 .
                    • For instance types with NVIDIA M60 GPUs, specify m60 .
                    • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                    • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                    Default: Any accelerator

                    • (string) --
                  • AcceleratorTotalMemoryMiB (dict) --

                    The minimum and maximum amount of total accelerator memory, in MiB.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

        • TargetCapacitySpecification (dict) --

          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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

          • TotalTargetCapacity (integer) --

            The number of units to request, filled using DefaultTargetCapacityType .

          • OnDemandTargetCapacity (integer) --

            The number of On-Demand units to request. If you specify a target capacity for Spot units, you cannot specify a target capacity for On-Demand units.

          • SpotTargetCapacity (integer) --

            The maximum number of Spot units to launch. If you specify a target capacity for On-Demand units, you cannot specify a target capacity for Spot units.

          • DefaultTargetCapacityType (string) --

            The default TotalTargetCapacity , which is either Spot or On-Demand .

          • TargetCapacityUnitType (string) --

            The unit for the target capacity.

            Default: units (translates to number of instances)

        • TerminateInstancesWithExpiration (boolean) --

          Indicates whether running instances should be terminated when the EC2 Fleet expires.

        • Type (string) --

          The type of request. Indicates whether the EC2 Fleet only requests the target capacity, or also attempts to maintain it. If you request a certain target capacity, EC2 Fleet only places the required requests; it does not attempt to replenish instances if capacity is diminished, and it does not submit requests in alternative capacity pools if capacity is unavailable. To maintain a certain target capacity, EC2 Fleet places the required requests to meet this target capacity. It also automatically replenishes any interrupted Spot Instances. Default: maintain .

        • 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 instance requests are placed or able to fulfill the request. The default end date is 7 days from the current date.

        • ReplaceUnhealthyInstances (boolean) --

          Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type maintain . For more information, see EC2 Fleet health checks in the Amazon EC2 User Guide .

        • SpotOptions (dict) --

          The configuration of Spot Instances in an EC2 Fleet.

          • AllocationStrategy (string) --

            The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.

            lowest-price - EC2 Fleet launches instances from the Spot Instance pools with the lowest price.

            diversified - EC2 Fleet launches instances from all of the Spot Instance pools that you specify.

            capacity-optimized (recommended) - EC2 Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacity-optimized-prioritized . Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides . You can assign the same priority to different LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacity-optimized-prioritized is supported only if your fleet uses a launch template. Note that if the On-Demand AllocationStrategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity.

            Default: lowest-price

          • MaintenanceStrategies (dict) --

            The strategies for managing your workloads on your Spot Instances that will be interrupted. Currently only the capacity rebalance strategy is available.

            • CapacityRebalance (dict) --

              The strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted.

              • ReplacementStrategy (string) --

                The replacement strategy to use. Only available for fleets of type maintain .

                launch - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

                launch-before-terminate - EC2 Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay ), terminates the instances that received a rebalance notification.

              • TerminationDelay (integer) --

                The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

                Required when ReplacementStrategy is set to launch-before-terminate .

                Not valid when ReplacementStrategy is set to launch .

                Valid values: Minimum value of 120 seconds. Maximum value of 7200 seconds.

          • InstanceInterruptionBehavior (string) --

            The behavior when a Spot Instance is interrupted.

            Default: terminate

          • InstancePoolsToUseCount (integer) --

            The number of Spot pools across which to allocate your target Spot capacity. Supported only when AllocationStrategy is set to lowest-price . EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

            Note that EC2 Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, EC2 Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

          • SingleInstanceType (boolean) --

            Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet.

            Supported only for fleets of type instant .

          • SingleAvailabilityZone (boolean) --

            Indicates that the fleet launches all Spot Instances into a single Availability Zone.

            Supported only for fleets of type instant .

          • MinTargetCapacity (integer) --

            The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

            Supported only for fleets of type instant .

            At least one of the following must be specified: SingleAvailabilityZone | SingleInstanceType

          • MaxTotalPrice (string) --

            The maximum amount per hour for Spot Instances that you're willing to pay. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

        • OnDemandOptions (dict) --

          The allocation strategy of On-Demand Instances in an EC2 Fleet.

          • AllocationStrategy (string) --

            The strategy that determines the order of the launch template overrides to use in fulfilling On-Demand capacity.

            lowest-price - EC2 Fleet uses price to determine the order, launching the lowest price first.

            prioritized - EC2 Fleet uses the priority that you assigned to each launch template override, launching the highest priority first.

            Default: lowest-price

          • CapacityReservationOptions (dict) --

            The strategy for using unused Capacity Reservations for fulfilling On-Demand capacity.

            Supported only for fleets of type instant .

            • UsageStrategy (string) --

              Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity.

              If you specify use-capacity-reservations-first , the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price or prioritized ) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price or prioritized ).

              If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.

          • SingleInstanceType (boolean) --

            Indicates that the fleet uses a single instance type to launch all On-Demand Instances in the fleet.

            Supported only for fleets of type instant .

          • SingleAvailabilityZone (boolean) --

            Indicates that the fleet launches all On-Demand Instances into a single Availability Zone.

            Supported only for fleets of type instant .

          • MinTargetCapacity (integer) --

            The minimum target capacity for On-Demand Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.

            Supported only for fleets of type instant .

            At least one of the following must be specified: SingleAvailabilityZone | SingleInstanceType

          • MaxTotalPrice (string) --

            The maximum amount per hour for On-Demand Instances that you're willing to pay.

        • Tags (list) --

          The tags for an EC2 Fleet 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 256 Unicode characters.

        • Errors (list) --

          Information about the instances that could not be launched by the fleet. Valid only when Type is set to instant .

          • (dict) --

            Describes the instances that could not be launched by the fleet.

            • LaunchTemplateAndOverrides (dict) --

              The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

              • LaunchTemplateSpecification (dict) --

                The launch template.

                • LaunchTemplateId (string) --

                  The ID of the launch template.

                  You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

                • LaunchTemplateName (string) --

                  The name of the launch template.

                  You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

                • Version (string) --

                  The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                  If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                  If the value is $Default , Amazon EC2 uses the default version of the launch template.

              • Overrides (dict) --

                Any parameters that you specify override the same parameters in the launch template.

                • InstanceType (string) --

                  The instance type.

                  Note

                  If you specify InstanceTypes , you can't specify InstanceRequirements .

                • MaxPrice (string) --

                  The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                  Warning

                  If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                • SubnetId (string) --

                  The ID of the subnet in which to launch the instances.

                • AvailabilityZone (string) --

                  The Availability Zone in which to launch the instances.

                • WeightedCapacity (float) --

                  The number of units provided by the specified instance type.

                • Priority (float) --

                  The priority for the launch template override. The highest priority is launched first.

                  If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                  If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                  Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

                • Placement (dict) --

                  The location where the instance launched, if applicable.

                  • GroupName (string) --

                    The name of the placement group that the instance is in.

                • InstanceRequirements (dict) --

                  The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                  Note

                  If you specify InstanceRequirements , you can't specify InstanceTypes .

                  • VCpuCount (dict) --

                    The minimum and maximum number of vCPUs.

                    • Min (integer) --

                      The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                    • Max (integer) --

                      The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                  • MemoryMiB (dict) --

                    The minimum and maximum amount of memory, in MiB.

                    • Min (integer) --

                      The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                  • CpuManufacturers (list) --

                    The CPU manufacturers to include.

                    • For instance types with Intel CPUs, specify intel .
                    • For instance types with AMD CPUs, specify amd .
                    • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                    Note

                    Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                    Default: Any manufacturer

                    • (string) --
                  • MemoryGiBPerVCpu (dict) --

                    The minimum and maximum amount of memory per vCPU, in GiB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                  • ExcludedInstanceTypes (list) --

                    The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                    For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                    Default: No excluded instance types

                    • (string) --
                  • InstanceGenerations (list) --

                    Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                    For current generation instance types, specify current .

                    For previous generation instance types, specify previous .

                    Default: Current and previous generation instance types

                    • (string) --
                  • SpotMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 100

                  • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 20

                  • BareMetal (string) --

                    Indicates whether bare metal instance types must be included, excluded, or required.

                    • To include bare metal instance types, specify included .
                    • To require only bare metal instance types, specify required .
                    • To exclude bare metal instance types, specify excluded .

                    Default: excluded

                  • BurstablePerformance (string) --

                    Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                    • To include burstable performance instance types, specify included .
                    • To require only burstable performance instance types, specify required .
                    • To exclude burstable performance instance types, specify excluded .

                    Default: excluded

                  • RequireHibernateSupport (boolean) --

                    Indicates whether instance types must support hibernation for On-Demand Instances.

                    This parameter is not supported for GetSpotPlacementScores .

                    Default: false

                  • NetworkInterfaceCount (dict) --

                    The minimum and maximum number of network interfaces.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                  • LocalStorage (string) --

                    Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                    • To include instance types with instance store volumes, specify included .
                    • To require only instance types with instance store volumes, specify required .
                    • To exclude instance types with instance store volumes, specify excluded .

                    Default: included

                  • LocalStorageTypes (list) --

                    The type of local storage that is required.

                    • For instance types with hard disk drive (HDD) storage, specify hdd .
                    • For instance types with solid state drive (SSD) storage, specify ssd .

                    Default: hdd and ssd

                    • (string) --
                  • TotalLocalStorageGB (dict) --

                    The minimum and maximum amount of total local storage, in GB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                  • BaselineEbsBandwidthMbps (dict) --

                    The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorTypes (list) --

                    The accelerator types that must be on the instance type.

                    • For instance types with GPU accelerators, specify gpu .
                    • For instance types with FPGA accelerators, specify fpga .
                    • For instance types with inference accelerators, specify inference .

                    Default: Any accelerator type

                    • (string) --
                  • AcceleratorCount (dict) --

                    The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                    To exclude accelerator-enabled instance types, set Max to 0 .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorManufacturers (list) --

                    Indicates whether instance types must have accelerators by specific manufacturers.

                    • For instance types with NVIDIA devices, specify nvidia .
                    • For instance types with AMD devices, specify amd .
                    • For instance types with Amazon Web Services devices, specify amazon-web-services .
                    • For instance types with Xilinx devices, specify xilinx .

                    Default: Any manufacturer

                    • (string) --
                  • AcceleratorNames (list) --

                    The accelerators that must be on the instance type.

                    • For instance types with NVIDIA A100 GPUs, specify a100 .
                    • For instance types with NVIDIA V100 GPUs, specify v100 .
                    • For instance types with NVIDIA K80 GPUs, specify k80 .
                    • For instance types with NVIDIA T4 GPUs, specify t4 .
                    • For instance types with NVIDIA M60 GPUs, specify m60 .
                    • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                    • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                    Default: Any accelerator

                    • (string) --
                  • AcceleratorTotalMemoryMiB (dict) --

                    The minimum and maximum amount of total accelerator memory, in MiB.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • Lifecycle (string) --

              Indicates if the instance that could not be launched was a Spot Instance or On-Demand Instance.

            • ErrorCode (string) --

              The error code that indicates why the instance could not be launched. For more information about error codes, see Error codes .

            • ErrorMessage (string) --

              The error message that describes why the instance could not be launched. For more information about error messages, see Error codes .

        • Instances (list) --

          Information about the instances that were launched by the fleet. Valid only when Type is set to instant .

          • (dict) --

            Describes the instances that were launched by the fleet.

            • LaunchTemplateAndOverrides (dict) --

              The launch templates and overrides that were used for launching the instances. The values that you specify in the Overrides replace the values in the launch template.

              • LaunchTemplateSpecification (dict) --

                The launch template.

                • LaunchTemplateId (string) --

                  The ID of the launch template.

                  You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

                • LaunchTemplateName (string) --

                  The name of the launch template.

                  You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

                • Version (string) --

                  The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                  If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                  If the value is $Default , Amazon EC2 uses the default version of the launch template.

              • Overrides (dict) --

                Any parameters that you specify override the same parameters in the launch template.

                • InstanceType (string) --

                  The instance type.

                  Note

                  If you specify InstanceTypes , you can't specify InstanceRequirements .

                • MaxPrice (string) --

                  The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                  Warning

                  If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                • SubnetId (string) --

                  The ID of the subnet in which to launch the instances.

                • AvailabilityZone (string) --

                  The Availability Zone in which to launch the instances.

                • WeightedCapacity (float) --

                  The number of units provided by the specified instance type.

                • Priority (float) --

                  The priority for the launch template override. The highest priority is launched first.

                  If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                  If the Spot AllocationStrategy is set to capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                  Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the override has the lowest priority. You can set the same priority for different launch template overrides.

                • Placement (dict) --

                  The location where the instance launched, if applicable.

                  • GroupName (string) --

                    The name of the placement group that the instance is in.

                • InstanceRequirements (dict) --

                  The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                  Note

                  If you specify InstanceRequirements , you can't specify InstanceTypes .

                  • VCpuCount (dict) --

                    The minimum and maximum number of vCPUs.

                    • Min (integer) --

                      The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                    • Max (integer) --

                      The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                  • MemoryMiB (dict) --

                    The minimum and maximum amount of memory, in MiB.

                    • Min (integer) --

                      The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                  • CpuManufacturers (list) --

                    The CPU manufacturers to include.

                    • For instance types with Intel CPUs, specify intel .
                    • For instance types with AMD CPUs, specify amd .
                    • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                    Note

                    Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                    Default: Any manufacturer

                    • (string) --
                  • MemoryGiBPerVCpu (dict) --

                    The minimum and maximum amount of memory per vCPU, in GiB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                  • ExcludedInstanceTypes (list) --

                    The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                    For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                    Default: No excluded instance types

                    • (string) --
                  • InstanceGenerations (list) --

                    Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                    For current generation instance types, specify current .

                    For previous generation instance types, specify previous .

                    Default: Current and previous generation instance types

                    • (string) --
                  • SpotMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 100

                  • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                    The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                    The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                    To turn off price protection, specify a high value, such as 999999 .

                    This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                    Note

                    If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                    Default: 20

                  • BareMetal (string) --

                    Indicates whether bare metal instance types must be included, excluded, or required.

                    • To include bare metal instance types, specify included .
                    • To require only bare metal instance types, specify required .
                    • To exclude bare metal instance types, specify excluded .

                    Default: excluded

                  • BurstablePerformance (string) --

                    Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                    • To include burstable performance instance types, specify included .
                    • To require only burstable performance instance types, specify required .
                    • To exclude burstable performance instance types, specify excluded .

                    Default: excluded

                  • RequireHibernateSupport (boolean) --

                    Indicates whether instance types must support hibernation for On-Demand Instances.

                    This parameter is not supported for GetSpotPlacementScores .

                    Default: false

                  • NetworkInterfaceCount (dict) --

                    The minimum and maximum number of network interfaces.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                  • LocalStorage (string) --

                    Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                    • To include instance types with instance store volumes, specify included .
                    • To require only instance types with instance store volumes, specify required .
                    • To exclude instance types with instance store volumes, specify excluded .

                    Default: included

                  • LocalStorageTypes (list) --

                    The type of local storage that is required.

                    • For instance types with hard disk drive (HDD) storage, specify hdd .
                    • For instance types with solid state drive (SSD) storage, specify ssd .

                    Default: hdd and ssd

                    • (string) --
                  • TotalLocalStorageGB (dict) --

                    The minimum and maximum amount of total local storage, in GB.

                    Default: No minimum or maximum limits

                    • Min (float) --

                      The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                    • Max (float) --

                      The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                  • BaselineEbsBandwidthMbps (dict) --

                    The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorTypes (list) --

                    The accelerator types that must be on the instance type.

                    • For instance types with GPU accelerators, specify gpu .
                    • For instance types with FPGA accelerators, specify fpga .
                    • For instance types with inference accelerators, specify inference .

                    Default: Any accelerator type

                    • (string) --
                  • AcceleratorCount (dict) --

                    The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                    To exclude accelerator-enabled instance types, set Max to 0 .

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                  • AcceleratorManufacturers (list) --

                    Indicates whether instance types must have accelerators by specific manufacturers.

                    • For instance types with NVIDIA devices, specify nvidia .
                    • For instance types with AMD devices, specify amd .
                    • For instance types with Amazon Web Services devices, specify amazon-web-services .
                    • For instance types with Xilinx devices, specify xilinx .

                    Default: Any manufacturer

                    • (string) --
                  • AcceleratorNames (list) --

                    The accelerators that must be on the instance type.

                    • For instance types with NVIDIA A100 GPUs, specify a100 .
                    • For instance types with NVIDIA V100 GPUs, specify v100 .
                    • For instance types with NVIDIA K80 GPUs, specify k80 .
                    • For instance types with NVIDIA T4 GPUs, specify t4 .
                    • For instance types with NVIDIA M60 GPUs, specify m60 .
                    • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                    • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                    Default: Any accelerator

                    • (string) --
                  • AcceleratorTotalMemoryMiB (dict) --

                    The minimum and maximum amount of total accelerator memory, in MiB.

                    Default: No minimum or maximum limits

                    • Min (integer) --

                      The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                    • Max (integer) --

                      The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • Lifecycle (string) --

              Indicates if the instance that was launched is a Spot Instance or On-Demand Instance.

            • InstanceIds (list) --

              The IDs of the instances.

              • (string) --
            • InstanceType (string) --

              The instance type.

            • Platform (string) --

              The value is Windows for Windows instances. Otherwise, the value is blank.

        • Context (string) --

          Reserved.

class EC2.Paginator.DescribeFlowLogs
paginator = client.get_paginator('describe_flow_logs')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_flow_logs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    FlowLogIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • deliver-log-status - The status of the logs delivery (SUCCESS | FAILED ).
    • log-destination-type - The type of destination to which the flow log publishes data. Possible destination types include cloud-watch-logs and s3 .
    • flow-log-id - The ID of the flow log.
    • log-group-name - The name of the log group.
    • resource-id - The ID of the VPC, subnet, or network interface.
    • traffic-type - The type of traffic (ACCEPT | REJECT | ALL ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • FlowLogIds (list) --

    One or more flow log IDs.

    Constraint: Maximum of 1000 flow log IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'FlowLogs': [
        {
            'CreationTime': datetime(2015, 1, 1),
            'DeliverLogsErrorMessage': 'string',
            'DeliverLogsPermissionArn': 'string',
            'DeliverLogsStatus': 'string',
            'FlowLogId': 'string',
            'FlowLogStatus': 'string',
            'LogGroupName': 'string',
            'ResourceId': 'string',
            'TrafficType': 'ACCEPT'|'REJECT'|'ALL',
            'LogDestinationType': 'cloud-watch-logs'|'s3',
            'LogDestination': 'string',
            'LogFormat': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'MaxAggregationInterval': 123,
            'DestinationOptions': {
                'FileFormat': 'plain-text'|'parquet',
                'HiveCompatiblePartitions': True|False,
                'PerHourPartition': True|False
            }
        },
    ],

}

Response Structure

  • (dict) --

    • FlowLogs (list) --

      Information about the flow logs.

      • (dict) --

        Describes a flow log.

        • CreationTime (datetime) --

          The date and time the flow log was created.

        • DeliverLogsErrorMessage (string) --

          Information about the error that occurred. Rate limited indicates that CloudWatch Logs throttling has been applied for one or more network interfaces, or that you've reached the limit on the number of log groups that you can create. Access error indicates that the IAM role associated with the flow log does not have sufficient permissions to publish to CloudWatch Logs. Unknown error indicates an internal error.

        • DeliverLogsPermissionArn (string) --

          The ARN of the IAM role that posts logs to CloudWatch Logs.

        • DeliverLogsStatus (string) --

          The status of the logs delivery (SUCCESS | FAILED ).

        • FlowLogId (string) --

          The flow log ID.

        • FlowLogStatus (string) --

          The status of the flow log (ACTIVE ).

        • LogGroupName (string) --

          The name of the flow log group.

        • ResourceId (string) --

          The ID of the resource on which the flow log was created.

        • TrafficType (string) --

          The type of traffic captured for the flow log.

        • LogDestinationType (string) --

          The type of destination to which the flow log data is published. Flow log data can be published to CloudWatch Logs or Amazon S3.

        • LogDestination (string) --

          The destination to which the flow log data is published. Flow log data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. If the flow log publishes to CloudWatch Logs, this element indicates the Amazon Resource Name (ARN) of the CloudWatch Logs log group to which the data is published. If the flow log publishes to Amazon S3, this element indicates the ARN of the Amazon S3 bucket to which the data is published.

        • LogFormat (string) --

          The format of the flow log record.

        • Tags (list) --

          The tags for the flow log.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • MaxAggregationInterval (integer) --

          The maximum interval of time, in seconds, during which a flow of packets is captured and aggregated into a flow log record.

          When a network interface is attached to a Nitro-based instance , the aggregation interval is always 60 seconds (1 minute) or less, regardless of the specified value.

          Valid Values: 60 | 600

        • DestinationOptions (dict) --

          The destination options.

          • FileFormat (string) --

            The format for the flow log.

          • HiveCompatiblePartitions (boolean) --

            Indicates whether to use Hive-compatible prefixes for flow logs stored in Amazon S3.

          • PerHourPartition (boolean) --

            Indicates whether to partition the flow log per hour.

class EC2.Paginator.DescribeFpgaImages
paginator = client.get_paginator('describe_fpga_images')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_fpga_images().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    FpgaImageIds=[
        'string',
    ],
    Owners=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • FpgaImageIds (list) --

    The AFI IDs.

    • (string) --
  • Owners (list) --

    Filters the AFI by owner. Specify an Amazon Web Services account ID, self (owner is the sender of the request), or an Amazon Web Services owner alias (valid values are amazon | aws-marketplace ).

    • (string) --
  • Filters (list) --

    The filters.

    • create-time - The creation time of the AFI.
    • fpga-image-id - The FPGA image identifier (AFI ID).
    • fpga-image-global-id - The global FPGA image identifier (AGFI ID).
    • name - The name of the AFI.
    • owner-id - The Amazon Web Services account ID of the AFI owner.
    • product-code - The product code.
    • shell-version - The version of the Amazon Web Services Shell that was used to create the bitstream.
    • state - The state of the AFI (pending | failed | available | unavailable ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • update-time - The time of the most recent update.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'FpgaImages': [
        {
            'FpgaImageId': 'string',
            'FpgaImageGlobalId': 'string',
            'Name': 'string',
            'Description': 'string',
            'ShellVersion': 'string',
            'PciId': {
                'DeviceId': 'string',
                'VendorId': 'string',
                'SubsystemId': 'string',
                'SubsystemVendorId': 'string'
            },
            'State': {
                'Code': 'pending'|'failed'|'available'|'unavailable',
                'Message': 'string'
            },
            'CreateTime': datetime(2015, 1, 1),
            'UpdateTime': datetime(2015, 1, 1),
            'OwnerId': 'string',
            'OwnerAlias': 'string',
            'ProductCodes': [
                {
                    'ProductCodeId': 'string',
                    'ProductCodeType': 'devpay'|'marketplace'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Public': True|False,
            'DataRetentionSupport': True|False
        },
    ],

}

Response Structure

  • (dict) --

    • FpgaImages (list) --

      Information about the FPGA images.

      • (dict) --

        Describes an Amazon FPGA image (AFI).

        • FpgaImageId (string) --

          The FPGA image identifier (AFI ID).

        • FpgaImageGlobalId (string) --

          The global FPGA image identifier (AGFI ID).

        • Name (string) --

          The name of the AFI.

        • Description (string) --

          The description of the AFI.

        • ShellVersion (string) --

          The version of the Amazon Web Services Shell that was used to create the bitstream.

        • PciId (dict) --

          Information about the PCI bus.

          • DeviceId (string) --

            The ID of the device.

          • VendorId (string) --

            The ID of the vendor.

          • SubsystemId (string) --

            The ID of the subsystem.

          • SubsystemVendorId (string) --

            The ID of the vendor for the subsystem.

        • State (dict) --

          Information about the state of the AFI.

          • Code (string) --

            The state. The following are the possible values:

            • pending - AFI bitstream generation is in progress.
            • available - The AFI is available for use.
            • failed - AFI bitstream generation failed.
            • unavailable - The AFI is no longer available for use.
          • Message (string) --

            If the state is failed , this is the error message.

        • CreateTime (datetime) --

          The date and time the AFI was created.

        • UpdateTime (datetime) --

          The time of the most recent update to the AFI.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the AFI.

        • OwnerAlias (string) --

          The alias of the AFI owner. Possible values include self , amazon , and aws-marketplace .

        • ProductCodes (list) --

          The product codes for the AFI.

          • (dict) --

            Describes a product code.

            • ProductCodeId (string) --

              The product code.

            • ProductCodeType (string) --

              The type of product code.

        • Tags (list) --

          Any tags assigned to the AFI.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • Public (boolean) --

          Indicates whether the AFI is public.

        • DataRetentionSupport (boolean) --

          Indicates whether data retention support is enabled for the AFI.

class EC2.Paginator.DescribeHostReservationOfferings
paginator = client.get_paginator('describe_host_reservation_offerings')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_host_reservation_offerings().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxDuration=123,
    MinDuration=123,
    OfferingId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • instance-family - The instance family of the offering (for example, m4 ).
    • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxDuration (integer) -- This is the maximum duration of the reservation to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 94608000 for three years.
  • MinDuration (integer) -- This is the minimum duration of the reservation you'd like to purchase, specified in seconds. Reservations are available in one-year and three-year terms. The number of seconds specified must be the number of seconds in a year (365x24x60x60) times one of the supported durations (1 or 3). For example, specify 31536000 for one year.
  • OfferingId (string) -- The ID of the reservation offering.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'OfferingSet': [
        {
            'CurrencyCode': 'USD',
            'Duration': 123,
            'HourlyPrice': 'string',
            'InstanceFamily': 'string',
            'OfferingId': 'string',
            'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
            'UpfrontPrice': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • OfferingSet (list) --

      Information about the offerings.

      • (dict) --

        Details about the Dedicated Host Reservation offering.

        • CurrencyCode (string) --

          The currency of the offering.

        • Duration (integer) --

          The duration of the offering (in seconds).

        • HourlyPrice (string) --

          The hourly price of the offering.

        • InstanceFamily (string) --

          The instance family of the offering.

        • OfferingId (string) --

          The ID of the offering.

        • PaymentOption (string) --

          The available payment option.

        • UpfrontPrice (string) --

          The upfront price of the offering. Does not apply to No Upfront offerings.

class EC2.Paginator.DescribeHostReservations
paginator = client.get_paginator('describe_host_reservations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_host_reservations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    HostReservationIdSet=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • instance-family - The instance family (for example, m4 ).
    • payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront ).
    • state - The state of the reservation (payment-pending | payment-failed | active | retired ).
    • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • HostReservationIdSet (list) --

    The host reservation IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'HostReservationSet': [
        {
            'Count': 123,
            'CurrencyCode': 'USD',
            'Duration': 123,
            'End': datetime(2015, 1, 1),
            'HostIdSet': [
                'string',
            ],
            'HostReservationId': 'string',
            'HourlyPrice': 'string',
            'InstanceFamily': 'string',
            'OfferingId': 'string',
            'PaymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront',
            'Start': datetime(2015, 1, 1),
            'State': 'payment-pending'|'payment-failed'|'active'|'retired',
            'UpfrontPrice': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • HostReservationSet (list) --

      Details about the reservation's configuration.

      • (dict) --

        Details about the Dedicated Host Reservation and associated Dedicated Hosts.

        • Count (integer) --

          The number of Dedicated Hosts the reservation is associated with.

        • CurrencyCode (string) --

          The currency in which the upfrontPrice and hourlyPrice amounts are specified. At this time, the only supported currency is USD .

        • Duration (integer) --

          The length of the reservation's term, specified in seconds. Can be 31536000 (1 year) | 94608000 (3 years) .

        • End (datetime) --

          The date and time that the reservation ends.

        • HostIdSet (list) --

          The IDs of the Dedicated Hosts associated with the reservation.

          • (string) --
        • HostReservationId (string) --

          The ID of the reservation that specifies the associated Dedicated Hosts.

        • HourlyPrice (string) --

          The hourly price of the reservation.

        • InstanceFamily (string) --

          The instance family of the Dedicated Host Reservation. The instance family on the Dedicated Host must be the same in order for it to benefit from the reservation.

        • OfferingId (string) --

          The ID of the reservation. This remains the same regardless of which Dedicated Hosts are associated with it.

        • PaymentOption (string) --

          The payment option selected for this reservation.

        • Start (datetime) --

          The date and time that the reservation started.

        • State (string) --

          The state of the reservation.

        • UpfrontPrice (string) --

          The upfront price of the reservation.

        • Tags (list) --

          Any tags assigned to the Dedicated Host Reservation.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeHosts
paginator = client.get_paginator('describe_hosts')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_hosts().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    HostIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • auto-placement - Whether auto-placement is enabled or disabled (on | off ).
    • availability-zone - The Availability Zone of the host.
    • client-token - The idempotency token that you provided when you allocated the host.
    • host-reservation-id - The ID of the reservation assigned to this host.
    • instance-type - The instance type size that the Dedicated Host is configured to support.
    • state - The allocation state of the Dedicated Host (available | under-assessment | permanent-failure | released | released-permanent-failure ).
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • HostIds (list) --

    The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Hosts': [
        {
            'AutoPlacement': 'on'|'off',
            'AvailabilityZone': 'string',
            'AvailableCapacity': {
                'AvailableInstanceCapacity': [
                    {
                        'AvailableCapacity': 123,
                        'InstanceType': 'string',
                        'TotalCapacity': 123
                    },
                ],
                'AvailableVCpus': 123
            },
            'ClientToken': 'string',
            'HostId': 'string',
            'HostProperties': {
                'Cores': 123,
                'InstanceType': 'string',
                'InstanceFamily': 'string',
                'Sockets': 123,
                'TotalVCpus': 123
            },
            'HostReservationId': 'string',
            'Instances': [
                {
                    'InstanceId': 'string',
                    'InstanceType': 'string',
                    'OwnerId': 'string'
                },
            ],
            'State': 'available'|'under-assessment'|'permanent-failure'|'released'|'released-permanent-failure'|'pending',
            'AllocationTime': datetime(2015, 1, 1),
            'ReleaseTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'HostRecovery': 'on'|'off',
            'AllowsMultipleInstanceTypes': 'on'|'off',
            'OwnerId': 'string',
            'AvailabilityZoneId': 'string',
            'MemberOfServiceLinkedResourceGroup': True|False,
            'OutpostArn': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Hosts (list) --

      Information about the Dedicated Hosts.

      • (dict) --

        Describes the properties of the Dedicated Host.

        • AutoPlacement (string) --

          Whether auto-placement is on or off.

        • AvailabilityZone (string) --

          The Availability Zone of the Dedicated Host.

        • AvailableCapacity (dict) --

          Information about the instances running on the Dedicated Host.

          • AvailableInstanceCapacity (list) --

            The number of instances that can be launched onto the Dedicated Host depending on the host's available capacity. For Dedicated Hosts that support multiple instance types, this parameter represents the number of instances for each instance size that is supported on the host.

            • (dict) --

              Information about the number of instances that can be launched onto the Dedicated Host.

              • AvailableCapacity (integer) --

                The number of instances that can be launched onto the Dedicated Host based on the host's available capacity.

              • InstanceType (string) --

                The instance type supported by the Dedicated Host.

              • TotalCapacity (integer) --

                The total number of instances that can be launched onto the Dedicated Host if there are no instances running on it.

          • AvailableVCpus (integer) --

            The number of vCPUs available for launching instances onto the Dedicated Host.

        • ClientToken (string) --

          Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .

        • HostId (string) --

          The ID of the Dedicated Host.

        • HostProperties (dict) --

          The hardware specifications of the Dedicated Host.

          • Cores (integer) --

            The number of cores on the Dedicated Host.

          • InstanceType (string) --

            The instance type supported by the Dedicated Host. For example, m5.large . If the host supports multiple instance types, no instanceType is returned.

          • InstanceFamily (string) --

            The instance family supported by the Dedicated Host. For example, m5 .

          • Sockets (integer) --

            The number of sockets on the Dedicated Host.

          • TotalVCpus (integer) --

            The total number of vCPUs on the Dedicated Host.

        • HostReservationId (string) --

          The reservation ID of the Dedicated Host. This returns a null response if the Dedicated Host doesn't have an associated reservation.

        • Instances (list) --

          The IDs and instance type that are currently running on the Dedicated Host.

          • (dict) --

            Describes an instance running on a Dedicated Host.

            • InstanceId (string) --

              The ID of instance that is running on the Dedicated Host.

            • InstanceType (string) --

              The instance type (for example, m3.medium ) of the running instance.

            • OwnerId (string) --

              The ID of the Amazon Web Services account that owns the instance.

        • State (string) --

          The Dedicated Host's state.

        • AllocationTime (datetime) --

          The time that the Dedicated Host was allocated.

        • ReleaseTime (datetime) --

          The time that the Dedicated Host was released.

        • Tags (list) --

          Any tags assigned to the Dedicated Host.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • HostRecovery (string) --

          Indicates whether host recovery is enabled or disabled for the Dedicated Host.

        • AllowsMultipleInstanceTypes (string) --

          Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is on , the Dedicated Host supports multiple instance types in the instance family. If the value is off , the Dedicated Host supports a single instance type only.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the Dedicated Host.

        • AvailabilityZoneId (string) --

          The ID of the Availability Zone in which the Dedicated Host is allocated.

        • MemberOfServiceLinkedResourceGroup (boolean) --

          Indicates whether the Dedicated Host is in a host resource group. If memberOfServiceLinkedResourceGroup is true , the host is in a host resource group; otherwise, it is not.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.

class EC2.Paginator.DescribeIamInstanceProfileAssociations
paginator = client.get_paginator('describe_iam_instance_profile_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_iam_instance_profile_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    AssociationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • AssociationIds (list) --

    The IAM instance profile associations.

    • (string) --
  • Filters (list) --

    The filters.

    • instance-id - The ID of the instance.
    • state - The state of the association (associating | associated | disassociating ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'IamInstanceProfileAssociations': [
        {
            'AssociationId': 'string',
            'InstanceId': 'string',
            'IamInstanceProfile': {
                'Arn': 'string',
                'Id': 'string'
            },
            'State': 'associating'|'associated'|'disassociating'|'disassociated',
            'Timestamp': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • IamInstanceProfileAssociations (list) --

      Information about the IAM instance profile associations.

      • (dict) --

        Describes an association between an IAM instance profile and an instance.

        • AssociationId (string) --

          The ID of the association.

        • InstanceId (string) --

          The ID of the instance.

        • IamInstanceProfile (dict) --

          The IAM instance profile.

          • Arn (string) --

            The Amazon Resource Name (ARN) of the instance profile.

          • Id (string) --

            The ID of the instance profile.

        • State (string) --

          The state of the association.

        • Timestamp (datetime) --

          The time the IAM instance profile was associated with the instance.

class EC2.Paginator.DescribeImportImageTasks
paginator = client.get_paginator('describe_import_image_tasks')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_import_image_tasks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImportTaskIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    Filter tasks using the task-state filter and one of the following values: active , completed , deleting , or deleted .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImportTaskIds (list) --

    The IDs of the import image tasks.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ImportImageTasks': [
        {
            'Architecture': 'string',
            'Description': 'string',
            'Encrypted': True|False,
            'Hypervisor': 'string',
            'ImageId': 'string',
            'ImportTaskId': 'string',
            'KmsKeyId': 'string',
            'LicenseType': 'string',
            'Platform': 'string',
            'Progress': 'string',
            'SnapshotDetails': [
                {
                    'Description': 'string',
                    'DeviceName': 'string',
                    'DiskImageSize': 123.0,
                    'Format': 'string',
                    'Progress': 'string',
                    'SnapshotId': 'string',
                    'Status': 'string',
                    'StatusMessage': 'string',
                    'Url': 'string',
                    'UserBucket': {
                        'S3Bucket': 'string',
                        'S3Key': 'string'
                    }
                },
            ],
            'Status': 'string',
            'StatusMessage': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'LicenseSpecifications': [
                {
                    'LicenseConfigurationArn': 'string'
                },
            ],
            'UsageOperation': 'string',
            'BootMode': 'legacy-bios'|'uefi'
        },
    ],

}

Response Structure

  • (dict) --

    • ImportImageTasks (list) --

      A list of zero or more import image tasks that are currently active or were completed or canceled in the previous 7 days.

      • (dict) --

        Describes an import image task.

        • Architecture (string) --

          The architecture of the virtual machine.

          Valid values: i386 | x86_64 | arm64

        • Description (string) --

          A description of the import task.

        • Encrypted (boolean) --

          Indicates whether the image is encrypted.

        • Hypervisor (string) --

          The target hypervisor for the import task.

          Valid values: xen

        • ImageId (string) --

          The ID of the Amazon Machine Image (AMI) of the imported virtual machine.

        • ImportTaskId (string) --

          The ID of the import image task.

        • KmsKeyId (string) --

          The identifier for the KMS key that was used to create the encrypted image.

        • LicenseType (string) --

          The license type of the virtual machine.

        • Platform (string) --

          The description string for the import image task.

        • Progress (string) --

          The percentage of progress of the import image task.

        • SnapshotDetails (list) --

          Information about the snapshots.

          • (dict) --

            Describes the snapshot created from the imported disk.

            • Description (string) --

              A description for the snapshot.

            • DeviceName (string) --

              The block device mapping for the snapshot.

            • DiskImageSize (float) --

              The size of the disk in the snapshot, in GiB.

            • Format (string) --

              The format of the disk image from which the snapshot is created.

            • Progress (string) --

              The percentage of progress for the task.

            • SnapshotId (string) --

              The snapshot ID of the disk being imported.

            • Status (string) --

              A brief status of the snapshot creation.

            • StatusMessage (string) --

              A detailed status message for the snapshot creation.

            • Url (string) --

              The URL used to access the disk image.

            • UserBucket (dict) --

              The Amazon S3 bucket for the disk image.

              • S3Bucket (string) --

                The Amazon S3 bucket from which the disk image was created.

              • S3Key (string) --

                The file name of the disk image.

        • Status (string) --

          A brief status for the import image task.

        • StatusMessage (string) --

          A descriptive status message for the import image task.

        • Tags (list) --

          The tags for the import image 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 256 Unicode characters.

        • LicenseSpecifications (list) --

          The ARNs of the license configurations that are associated with the import image task.

          • (dict) --

            The response information for license configurations.

            • LicenseConfigurationArn (string) --

              The ARN of a license configuration.

        • UsageOperation (string) --

          The usage operation value.

        • BootMode (string) --

          The boot mode of the virtual machine.

class EC2.Paginator.DescribeImportSnapshotTasks
paginator = client.get_paginator('describe_import_snapshot_tasks')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_import_snapshot_tasks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImportTaskIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImportTaskIds (list) --

    A list of import snapshot task IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ImportSnapshotTasks': [
        {
            'Description': 'string',
            'ImportTaskId': 'string',
            'SnapshotTaskDetail': {
                'Description': 'string',
                'DiskImageSize': 123.0,
                'Encrypted': True|False,
                'Format': 'string',
                'KmsKeyId': 'string',
                'Progress': 'string',
                'SnapshotId': 'string',
                'Status': 'string',
                'StatusMessage': 'string',
                'Url': 'string',
                'UserBucket': {
                    'S3Bucket': 'string',
                    'S3Key': 'string'
                }
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • ImportSnapshotTasks (list) --

      A list of zero or more import snapshot tasks that are currently active or were completed or canceled in the previous 7 days.

      • (dict) --

        Describes an import snapshot task.

        • Description (string) --

          A description of the import snapshot task.

        • ImportTaskId (string) --

          The ID of the import snapshot task.

        • SnapshotTaskDetail (dict) --

          Describes an import snapshot task.

          • Description (string) --

            The description of the snapshot.

          • DiskImageSize (float) --

            The size of the disk in the snapshot, in GiB.

          • Encrypted (boolean) --

            Indicates whether the snapshot is encrypted.

          • Format (string) --

            The format of the disk image from which the snapshot is created.

          • KmsKeyId (string) --

            The identifier for the KMS key that was used to create the encrypted snapshot.

          • Progress (string) --

            The percentage of completion for the import snapshot task.

          • SnapshotId (string) --

            The snapshot ID of the disk being imported.

          • Status (string) --

            A brief status for the import snapshot task.

          • StatusMessage (string) --

            A detailed status message for the import snapshot task.

          • Url (string) --

            The URL of the disk image from which the snapshot is created.

          • UserBucket (dict) --

            The Amazon S3 bucket for the disk image.

            • S3Bucket (string) --

              The Amazon S3 bucket from which the disk image was created.

            • S3Key (string) --

              The file name of the disk image.

        • Tags (list) --

          The tags for the import snapshot 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 256 Unicode characters.

class EC2.Paginator.DescribeInstanceCreditSpecifications
paginator = client.get_paginator('describe_instance_credit_specifications')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_instance_credit_specifications().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • instance-id - The ID of the instance.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 1000 explicitly specified instance IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InstanceCreditSpecifications': [
        {
            'InstanceId': 'string',
            'CpuCredits': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • InstanceCreditSpecifications (list) --

      Information about the credit option for CPU usage of an instance.

      • (dict) --

        Describes the credit option for CPU usage of a burstable performance instance.

        • InstanceId (string) --

          The ID of the instance.

        • CpuCredits (string) --

          The credit option for CPU usage of the instance.

          Valid values: standard | unlimited

class EC2.Paginator.DescribeInstanceEventWindows
paginator = client.get_paginator('describe_instance_event_windows')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_instance_event_windows().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    InstanceEventWindowIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceEventWindowIds (list) --

    The IDs of the event windows.

    • (string) --
  • Filters (list) --

    One or more filters.

    • dedicated-host-id - The event windows associated with the specified Dedicated Host ID.
    • event-window-name - The event windows associated with the specified names.
    • instance-id - The event windows associated with the specified instance ID.
    • instance-tag - The event windows associated with the specified tag and value.
    • instance-tag-key - The event windows associated with the specified tag key, regardless of the value.
    • instance-tag-value - The event windows associated with the specified tag value, regardless of the key.
    • tag:<key> - The key/value combination of a tag assigned to the event window. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value CMX , specify tag:Owner for the filter name and CMX for the filter value.
    • tag-key - The key of a tag assigned to the event window. Use this filter to find all event windows that have a tag with a specific key, regardless of the tag value.
    • tag-value - The value of a tag assigned to the event window. Use this filter to find all event windows that have a tag with a specific value, regardless of the tag key.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InstanceEventWindows': [
        {
            'InstanceEventWindowId': 'string',
            'TimeRanges': [
                {
                    'StartWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                    'StartHour': 123,
                    'EndWeekDay': 'sunday'|'monday'|'tuesday'|'wednesday'|'thursday'|'friday'|'saturday',
                    'EndHour': 123
                },
            ],
            'Name': 'string',
            'CronExpression': 'string',
            'AssociationTarget': {
                'InstanceIds': [
                    'string',
                ],
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ],
                'DedicatedHostIds': [
                    'string',
                ]
            },
            'State': 'creating'|'deleting'|'active'|'deleted',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • InstanceEventWindows (list) --

      Information about the event windows.

      • (dict) --

        The event window.

        • InstanceEventWindowId (string) --

          The ID of the event window.

        • TimeRanges (list) --

          One or more time ranges defined for the event window.

          • (dict) --

            The start day and time and the end day and time of the time range, in UTC.

            • StartWeekDay (string) --

              The day on which the time range begins.

            • StartHour (integer) --

              The hour when the time range begins.

            • EndWeekDay (string) --

              The day on which the time range ends.

            • EndHour (integer) --

              The hour when the time range ends.

        • Name (string) --

          The name of the event window.

        • CronExpression (string) --

          The cron expression defined for the event window.

        • AssociationTarget (dict) --

          One or more targets associated with the event window.

          • InstanceIds (list) --

            The IDs of the instances associated with the event window.

            • (string) --
          • Tags (list) --

            The instance tags associated with the event window. Any instances associated with the tags will be associated with the event window.

            • (dict) --

              Describes a tag.

              • Key (string) --

                The key of the tag.

                Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

              • Value (string) --

                The value of the tag.

                Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

          • DedicatedHostIds (list) --

            The IDs of the Dedicated Hosts associated with the event window.

            • (string) --
        • State (string) --

          The current state of the event window.

        • Tags (list) --

          The instance tags associated with the event window.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeInstanceStatus
paginator = client.get_paginator('describe_instance_status')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_instance_status().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    IncludeAllInstances=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone of the instance.
    • event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop ).
    • event.description - A description of the event.
    • event.instance-event-id - The ID of the event whose date and time you are modifying.
    • event.not-after - The latest end time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before - The earliest start time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before-deadline - The deadline for starting the event (for example, 2014-09-15T17:15:20.000Z ).
    • instance-state-code - The code for the instance state, as a 16-bit unsigned integer. The high byte is used for internal purposes 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-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 100 explicitly specified instance IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IncludeAllInstances (boolean) --

    When true , includes the health status for all instances. When false , includes the health status for running instances only.

    Default: false

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InstanceStatuses': [
        {
            'AvailabilityZone': 'string',
            'OutpostArn': 'string',
            'Events': [
                {
                    'InstanceEventId': 'string',
                    'Code': 'instance-reboot'|'system-reboot'|'system-maintenance'|'instance-retirement'|'instance-stop',
                    'Description': 'string',
                    'NotAfter': datetime(2015, 1, 1),
                    'NotBefore': datetime(2015, 1, 1),
                    'NotBeforeDeadline': datetime(2015, 1, 1)
                },
            ],
            'InstanceId': 'string',
            'InstanceState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceStatus': {
                'Details': [
                    {
                        'ImpairedSince': datetime(2015, 1, 1),
                        'Name': 'reachability',
                        'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                    },
                ],
                'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
            },
            'SystemStatus': {
                'Details': [
                    {
                        'ImpairedSince': datetime(2015, 1, 1),
                        'Name': 'reachability',
                        'Status': 'passed'|'failed'|'insufficient-data'|'initializing'
                    },
                ],
                'Status': 'ok'|'impaired'|'insufficient-data'|'not-applicable'|'initializing'
            }
        },
    ],

}

Response Structure

  • (dict) --

    • InstanceStatuses (list) --

      Information about the status of the instances.

      • (dict) --

        Describes the status of an instance.

        • AvailabilityZone (string) --

          The Availability Zone of the instance.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • Events (list) --

          Any scheduled events associated with the instance.

          • (dict) --

            Describes a scheduled event for an instance.

            • InstanceEventId (string) --

              The ID of the event.

            • Code (string) --

              The event code.

            • Description (string) --

              A description of the event.

              After a scheduled event is completed, it can still be described for up to a week. If the event has been completed, this description starts with the following text: [Completed].

            • NotAfter (datetime) --

              The latest scheduled end time for the event.

            • NotBefore (datetime) --

              The earliest scheduled start time for the event.

            • NotBeforeDeadline (datetime) --

              The deadline for starting the event.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceState (dict) --

          The intended state of the instance. DescribeInstanceStatus requires that an instance be in the running state.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceStatus (dict) --

          Reports impaired functionality that stems from issues internal to the instance, such as impaired reachability.

          • Details (list) --

            The system instance health or application instance health.

            • (dict) --

              Describes the instance status.

              • ImpairedSince (datetime) --

                The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

              • Name (string) --

                The type of instance status.

              • Status (string) --

                The status.

          • Status (string) --

            The status.

        • SystemStatus (dict) --

          Reports impaired functionality that stems from issues related to the systems that support an instance, such as hardware failures and network connectivity problems.

          • Details (list) --

            The system instance health or application instance health.

            • (dict) --

              Describes the instance status.

              • ImpairedSince (datetime) --

                The time when a status check failed. For an instance that was launched and impaired, this is the time when the instance was launched.

              • Name (string) --

                The type of instance status.

              • Status (string) --

                The status.

          • Status (string) --

            The status.

class EC2.Paginator.DescribeInstanceTypeOfferings
paginator = client.get_paginator('describe_instance_type_offerings')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_instance_type_offerings().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    LocationType='region'|'availability-zone'|'availability-zone-id',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LocationType (string) -- The location type.
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • location - This depends on the location type. For example, if the location type is region (default), the location is the Region code (for example, us-east-2 .)
    • instance-type - The instance type. For example, c5.2xlarge .
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InstanceTypeOfferings': [
        {
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'LocationType': 'region'|'availability-zone'|'availability-zone-id',
            'Location': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • InstanceTypeOfferings (list) --

      The instance types offered.

      • (dict) --

        The instance types offered.

        • InstanceType (string) --

          The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

        • LocationType (string) --

          The location type.

        • Location (string) --

          The identifier for the location. This depends on the location type. For example, if the location type is region , the location is the Region code (for example, us-east-2 .)

class EC2.Paginator.DescribeInstanceTypes
paginator = client.get_paginator('describe_instance_types')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_instance_types().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    InstanceTypes=[
        'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTypes (list) --

    The instance types. For more information, see Instance types in the Amazon EC2 User Guide .

    • (string) --
  • Filters (list) --

    One or more filters. Filter names and values are case-sensitive.

    • auto-recovery-supported - Indicates whether auto recovery is supported (true | false ).
    • bare-metal - Indicates whether it is a bare metal instance type (true | false ).
    • burstable-performance-supported - Indicates whether it is a burstable performance instance type (true | false ).
    • current-generation - Indicates whether this instance type is the latest generation instance type of an instance family (true | false ).
    • ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.
    • ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output storage operations per second for an EBS-optimized instance type.
    • ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline throughput performance for an EBS-optimized instance type, in MB/s.
    • ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.
    • ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage operations per second for an EBS-optimized instance type.
    • ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum throughput performance for an EBS-optimized instance type, in MB/s.
    • ebs-info.ebs-optimized-support - Indicates whether the instance type is EBS-optimized (supported | unsupported | default ).
    • ebs-info.encryption-support - Indicates whether EBS encryption is supported (supported | unsupported ).
    • ebs-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for EBS volumes (required | supported | unsupported ).
    • free-tier-eligible - Indicates whether the instance type is eligible to use in the free tier (true | false ).
    • hibernation-supported - Indicates whether On-Demand hibernation is supported (true | false ).
    • hypervisor - The hypervisor (nitro | xen ).
    • instance-storage-info.disk.count - The number of local disks.
    • instance-storage-info.disk.size-in-gb - The storage size of each instance storage disk, in GB.
    • instance-storage-info.disk.type - The storage technology for the local instance storage disks (hdd | ssd ).
    • instance-storage-info.encryption-support - Indicates whether data is encrypted at rest (required | supported | unsupported ).
    • instance-storage-info.nvme-support - Indicates whether non-volatile memory express (NVMe) is supported for instance store (required | supported | unsupported ).
    • instance-storage-info.total-size-in-gb - The total amount of storage available from all local instance storage, in GB.
    • instance-storage-supported - Indicates whether the instance type has local instance storage (true | false ).
    • instance-type - The instance type (for example c5.2xlarge or c5*).
    • memory-info.size-in-mib - The memory size.
    • network-info.efa-info.maximum-efa-interfaces - The maximum number of Elastic Fabric Adapters (EFAs) per instance.
    • network-info.efa-supported - Indicates whether the instance type supports Elastic Fabric Adapter (EFA) (true | false ).
    • network-info.ena-support - Indicates whether Elastic Network Adapter (ENA) is supported or required (required | supported | unsupported ).
    • network-info.encryption-in-transit-supported - Indicates whether the instance type automatically encrypts in-transit traffic between instances (true | false ).
    • network-info.ipv4-addresses-per-interface - The maximum number of private IPv4 addresses per network interface.
    • network-info.ipv6-addresses-per-interface - The maximum number of private IPv6 addresses per network interface.
    • network-info.ipv6-supported - Indicates whether the instance type supports IPv6 (true | false ).
    • network-info.maximum-network-cards - The maximum number of network cards per instance.
    • network-info.maximum-network-interfaces - The maximum number of network interfaces per instance.
    • network-info.network-performance - The network performance (for example, "25 Gigabit").
    • processor-info.supported-architecture - The CPU architecture (arm64 | i386 | x86_64 ).
    • processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in GHz.
    • supported-boot-mode - The boot mode (legacy-bios | uefi ).
    • supported-root-device-type - The root device type (ebs | instance-store ).
    • supported-usage-class - The usage class (on-demand | spot ).
    • supported-virtualization-type - The virtualization type (hvm | paravirtual ).
    • vcpu-info.default-cores - The default number of cores for the instance type.
    • vcpu-info.default-threads-per-core - The default number of threads per core for the instance type.
    • vcpu-info.default-vcpus - The default number of vCPUs for the instance type.
    • vcpu-info.valid-cores - The number of cores that can be configured for the instance type.
    • vcpu-info.valid-threads-per-core - The number of threads per core that can be configured for the instance type. For example, "1" or "1,2".
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InstanceTypes': [
        {
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'CurrentGeneration': True|False,
            'FreeTierEligible': True|False,
            'SupportedUsageClasses': [
                'spot'|'on-demand',
            ],
            'SupportedRootDeviceTypes': [
                'ebs'|'instance-store',
            ],
            'SupportedVirtualizationTypes': [
                'hvm'|'paravirtual',
            ],
            'BareMetal': True|False,
            'Hypervisor': 'nitro'|'xen',
            'ProcessorInfo': {
                'SupportedArchitectures': [
                    'i386'|'x86_64'|'arm64'|'x86_64_mac',
                ],
                'SustainedClockSpeedInGhz': 123.0
            },
            'VCpuInfo': {
                'DefaultVCpus': 123,
                'DefaultCores': 123,
                'DefaultThreadsPerCore': 123,
                'ValidCores': [
                    123,
                ],
                'ValidThreadsPerCore': [
                    123,
                ]
            },
            'MemoryInfo': {
                'SizeInMiB': 123
            },
            'InstanceStorageSupported': True|False,
            'InstanceStorageInfo': {
                'TotalSizeInGB': 123,
                'Disks': [
                    {
                        'SizeInGB': 123,
                        'Count': 123,
                        'Type': 'hdd'|'ssd'
                    },
                ],
                'NvmeSupport': 'unsupported'|'supported'|'required',
                'EncryptionSupport': 'unsupported'|'required'
            },
            'EbsInfo': {
                'EbsOptimizedSupport': 'unsupported'|'supported'|'default',
                'EncryptionSupport': 'unsupported'|'supported',
                'EbsOptimizedInfo': {
                    'BaselineBandwidthInMbps': 123,
                    'BaselineThroughputInMBps': 123.0,
                    'BaselineIops': 123,
                    'MaximumBandwidthInMbps': 123,
                    'MaximumThroughputInMBps': 123.0,
                    'MaximumIops': 123
                },
                'NvmeSupport': 'unsupported'|'supported'|'required'
            },
            'NetworkInfo': {
                'NetworkPerformance': 'string',
                'MaximumNetworkInterfaces': 123,
                'MaximumNetworkCards': 123,
                'DefaultNetworkCardIndex': 123,
                'NetworkCards': [
                    {
                        'NetworkCardIndex': 123,
                        'NetworkPerformance': 'string',
                        'MaximumNetworkInterfaces': 123
                    },
                ],
                'Ipv4AddressesPerInterface': 123,
                'Ipv6AddressesPerInterface': 123,
                'Ipv6Supported': True|False,
                'EnaSupport': 'unsupported'|'supported'|'required',
                'EfaSupported': True|False,
                'EfaInfo': {
                    'MaximumEfaInterfaces': 123
                },
                'EncryptionInTransitSupported': True|False
            },
            'GpuInfo': {
                'Gpus': [
                    {
                        'Name': 'string',
                        'Manufacturer': 'string',
                        'Count': 123,
                        'MemoryInfo': {
                            'SizeInMiB': 123
                        }
                    },
                ],
                'TotalGpuMemoryInMiB': 123
            },
            'FpgaInfo': {
                'Fpgas': [
                    {
                        'Name': 'string',
                        'Manufacturer': 'string',
                        'Count': 123,
                        'MemoryInfo': {
                            'SizeInMiB': 123
                        }
                    },
                ],
                'TotalFpgaMemoryInMiB': 123
            },
            'PlacementGroupInfo': {
                'SupportedStrategies': [
                    'cluster'|'partition'|'spread',
                ]
            },
            'InferenceAcceleratorInfo': {
                'Accelerators': [
                    {
                        'Count': 123,
                        'Name': 'string',
                        'Manufacturer': 'string'
                    },
                ]
            },
            'HibernationSupported': True|False,
            'BurstablePerformanceSupported': True|False,
            'DedicatedHostsSupported': True|False,
            'AutoRecoverySupported': True|False,
            'SupportedBootModes': [
                'legacy-bios'|'uefi',
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • InstanceTypes (list) --

      The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

      • (dict) --

        Describes the instance type.

        • InstanceType (string) --

          The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

        • CurrentGeneration (boolean) --

          Indicates whether the instance type is current generation.

        • FreeTierEligible (boolean) --

          Indicates whether the instance type is eligible for the free tier.

        • SupportedUsageClasses (list) --

          Indicates whether the instance type is offered for spot or On-Demand.

          • (string) --
        • SupportedRootDeviceTypes (list) --

          The supported root device types.

          • (string) --
        • SupportedVirtualizationTypes (list) --

          The supported virtualization types.

          • (string) --
        • BareMetal (boolean) --

          Indicates whether the instance is a bare metal instance type.

        • Hypervisor (string) --

          The hypervisor for the instance type.

        • ProcessorInfo (dict) --

          Describes the processor.

          • SupportedArchitectures (list) --

            The architectures supported by the instance type.

            • (string) --
          • SustainedClockSpeedInGhz (float) --

            The speed of the processor, in GHz.

        • VCpuInfo (dict) --

          Describes the vCPU configurations for the instance type.

          • DefaultVCpus (integer) --

            The default number of vCPUs for the instance type.

          • DefaultCores (integer) --

            The default number of cores for the instance type.

          • DefaultThreadsPerCore (integer) --

            The default number of threads per core for the instance type.

          • ValidCores (list) --

            The valid number of cores that can be configured for the instance type.

            • (integer) --
          • ValidThreadsPerCore (list) --

            The valid number of threads per core that can be configured for the instance type.

            • (integer) --
        • MemoryInfo (dict) --

          Describes the memory for the instance type.

          • SizeInMiB (integer) --

            The size of the memory, in MiB.

        • InstanceStorageSupported (boolean) --

          Indicates whether instance storage is supported.

        • InstanceStorageInfo (dict) --

          Describes the instance storage for the instance type.

          • TotalSizeInGB (integer) --

            The total size of the disks, in GB.

          • Disks (list) --

            Describes the disks that are available for the instance type.

            • (dict) --

              Describes a disk.

              • SizeInGB (integer) --

                The size of the disk in GB.

              • Count (integer) --

                The number of disks with this configuration.

              • Type (string) --

                The type of disk.

          • NvmeSupport (string) --

            Indicates whether non-volatile memory express (NVMe) is supported.

          • EncryptionSupport (string) --

            Indicates whether data is encrypted at rest.

        • EbsInfo (dict) --

          Describes the Amazon EBS settings for the instance type.

          • EbsOptimizedSupport (string) --

            Indicates whether the instance type is Amazon EBS-optimized. For more information, see Amazon EBS-optimized instances in Amazon EC2 User Guide .

          • EncryptionSupport (string) --

            Indicates whether Amazon EBS encryption is supported.

          • EbsOptimizedInfo (dict) --

            Describes the optimized EBS performance for the instance type.

            • BaselineBandwidthInMbps (integer) --

              The baseline bandwidth performance for an EBS-optimized instance type, in Mbps.

            • BaselineThroughputInMBps (float) --

              The baseline throughput performance for an EBS-optimized instance type, in MB/s.

            • BaselineIops (integer) --

              The baseline input/output storage operations per seconds for an EBS-optimized instance type.

            • MaximumBandwidthInMbps (integer) --

              The maximum bandwidth performance for an EBS-optimized instance type, in Mbps.

            • MaximumThroughputInMBps (float) --

              The maximum throughput performance for an EBS-optimized instance type, in MB/s.

            • MaximumIops (integer) --

              The maximum input/output storage operations per second for an EBS-optimized instance type.

          • NvmeSupport (string) --

            Indicates whether non-volatile memory express (NVMe) is supported.

        • NetworkInfo (dict) --

          Describes the network settings for the instance type.

          • NetworkPerformance (string) --

            The network performance.

          • MaximumNetworkInterfaces (integer) --

            The maximum number of network interfaces for the instance type.

          • MaximumNetworkCards (integer) --

            The maximum number of physical network cards that can be allocated to the instance.

          • DefaultNetworkCardIndex (integer) --

            The index of the default network card, starting at 0.

          • NetworkCards (list) --

            Describes the network cards for the instance type.

            • (dict) --

              Describes the network card support of the instance type.

              • NetworkCardIndex (integer) --

                The index of the network card.

              • NetworkPerformance (string) --

                The network performance of the network card.

              • MaximumNetworkInterfaces (integer) --

                The maximum number of network interfaces for the network card.

          • Ipv4AddressesPerInterface (integer) --

            The maximum number of IPv4 addresses per network interface.

          • Ipv6AddressesPerInterface (integer) --

            The maximum number of IPv6 addresses per network interface.

          • Ipv6Supported (boolean) --

            Indicates whether IPv6 is supported.

          • EnaSupport (string) --

            Indicates whether Elastic Network Adapter (ENA) is supported.

          • EfaSupported (boolean) --

            Indicates whether Elastic Fabric Adapter (EFA) is supported.

          • EfaInfo (dict) --

            Describes the Elastic Fabric Adapters for the instance type.

            • MaximumEfaInterfaces (integer) --

              The maximum number of Elastic Fabric Adapters for the instance type.

          • EncryptionInTransitSupported (boolean) --

            Indicates whether the instance type automatically encrypts in-transit traffic between instances.

        • GpuInfo (dict) --

          Describes the GPU accelerator settings for the instance type.

          • Gpus (list) --

            Describes the GPU accelerators for the instance type.

            • (dict) --

              Describes the GPU accelerators for the instance type.

              • Name (string) --

                The name of the GPU accelerator.

              • Manufacturer (string) --

                The manufacturer of the GPU accelerator.

              • Count (integer) --

                The number of GPUs for the instance type.

              • MemoryInfo (dict) --

                Describes the memory available to the GPU accelerator.

                • SizeInMiB (integer) --

                  The size of the memory available to the GPU accelerator, in MiB.

          • TotalGpuMemoryInMiB (integer) --

            The total size of the memory for the GPU accelerators for the instance type, in MiB.

        • FpgaInfo (dict) --

          Describes the FPGA accelerator settings for the instance type.

          • Fpgas (list) --

            Describes the FPGAs for the instance type.

            • (dict) --

              Describes the FPGA accelerator for the instance type.

              • Name (string) --

                The name of the FPGA accelerator.

              • Manufacturer (string) --

                The manufacturer of the FPGA accelerator.

              • Count (integer) --

                The count of FPGA accelerators for the instance type.

              • MemoryInfo (dict) --

                Describes the memory for the FPGA accelerator for the instance type.

                • SizeInMiB (integer) --

                  The size of the memory available to the FPGA accelerator, in MiB.

          • TotalFpgaMemoryInMiB (integer) --

            The total memory of all FPGA accelerators for the instance type.

        • PlacementGroupInfo (dict) --

          Describes the placement group settings for the instance type.

          • SupportedStrategies (list) --

            The supported placement group types.

            • (string) --
        • InferenceAcceleratorInfo (dict) --

          Describes the Inference accelerator settings for the instance type.

          • Accelerators (list) --

            Describes the Inference accelerators for the instance type.

            • (dict) --

              Describes the Inference accelerators for the instance type.

              • Count (integer) --

                The number of Inference accelerators for the instance type.

              • Name (string) --

                The name of the Inference accelerator.

              • Manufacturer (string) --

                The manufacturer of the Inference accelerator.

        • HibernationSupported (boolean) --

          Indicates whether On-Demand hibernation is supported.

        • BurstablePerformanceSupported (boolean) --

          Indicates whether the instance type is a burstable performance instance type.

        • DedicatedHostsSupported (boolean) --

          Indicates whether Dedicated Hosts are supported on the instance type.

        • AutoRecoverySupported (boolean) --

          Indicates whether auto recovery is supported.

        • SupportedBootModes (list) --

          The supported boot modes. For more information, see Boot modes in the Amazon EC2 User Guide .

          • (string) --

class EC2.Paginator.DescribeInstances
paginator = client.get_paginator('describe_instances')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_instances().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Reservations': [
        {
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'Instances': [
                {
                    'AmiLaunchIndex': 123,
                    'ImageId': 'string',
                    'InstanceId': 'string',
                    'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                    'KernelId': 'string',
                    'KeyName': 'string',
                    'LaunchTime': datetime(2015, 1, 1),
                    'Monitoring': {
                        'State': 'disabled'|'disabling'|'enabled'|'pending'
                    },
                    'Placement': {
                        'AvailabilityZone': 'string',
                        'Affinity': 'string',
                        'GroupName': 'string',
                        'PartitionNumber': 123,
                        'HostId': 'string',
                        'Tenancy': 'default'|'dedicated'|'host',
                        'SpreadDomain': 'string',
                        'HostResourceGroupArn': 'string'
                    },
                    'Platform': 'Windows',
                    'PrivateDnsName': 'string',
                    'PrivateIpAddress': 'string',
                    'ProductCodes': [
                        {
                            'ProductCodeId': 'string',
                            'ProductCodeType': 'devpay'|'marketplace'
                        },
                    ],
                    'PublicDnsName': 'string',
                    'PublicIpAddress': 'string',
                    'RamdiskId': 'string',
                    'State': {
                        'Code': 123,
                        'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
                    },
                    'StateTransitionReason': 'string',
                    'SubnetId': 'string',
                    'VpcId': 'string',
                    'Architecture': 'i386'|'x86_64'|'arm64'|'x86_64_mac',
                    'BlockDeviceMappings': [
                        {
                            'DeviceName': 'string',
                            'Ebs': {
                                'AttachTime': datetime(2015, 1, 1),
                                'DeleteOnTermination': True|False,
                                'Status': 'attaching'|'attached'|'detaching'|'detached',
                                'VolumeId': 'string'
                            }
                        },
                    ],
                    'ClientToken': 'string',
                    'EbsOptimized': True|False,
                    'EnaSupport': True|False,
                    'Hypervisor': 'ovm'|'xen',
                    'IamInstanceProfile': {
                        'Arn': 'string',
                        'Id': 'string'
                    },
                    'InstanceLifecycle': 'spot'|'scheduled',
                    'ElasticGpuAssociations': [
                        {
                            'ElasticGpuId': 'string',
                            'ElasticGpuAssociationId': 'string',
                            'ElasticGpuAssociationState': 'string',
                            'ElasticGpuAssociationTime': 'string'
                        },
                    ],
                    'ElasticInferenceAcceleratorAssociations': [
                        {
                            'ElasticInferenceAcceleratorArn': 'string',
                            'ElasticInferenceAcceleratorAssociationId': 'string',
                            'ElasticInferenceAcceleratorAssociationState': 'string',
                            'ElasticInferenceAcceleratorAssociationTime': datetime(2015, 1, 1)
                        },
                    ],
                    'NetworkInterfaces': [
                        {
                            'Association': {
                                'CarrierIp': 'string',
                                'CustomerOwnedIp': 'string',
                                'IpOwnerId': 'string',
                                'PublicDnsName': 'string',
                                'PublicIp': 'string'
                            },
                            'Attachment': {
                                'AttachTime': datetime(2015, 1, 1),
                                'AttachmentId': 'string',
                                'DeleteOnTermination': True|False,
                                'DeviceIndex': 123,
                                'Status': 'attaching'|'attached'|'detaching'|'detached',
                                'NetworkCardIndex': 123
                            },
                            'Description': 'string',
                            'Groups': [
                                {
                                    'GroupName': 'string',
                                    'GroupId': 'string'
                                },
                            ],
                            'Ipv6Addresses': [
                                {
                                    'Ipv6Address': 'string'
                                },
                            ],
                            'MacAddress': 'string',
                            'NetworkInterfaceId': 'string',
                            'OwnerId': 'string',
                            'PrivateDnsName': 'string',
                            'PrivateIpAddress': 'string',
                            'PrivateIpAddresses': [
                                {
                                    'Association': {
                                        'CarrierIp': 'string',
                                        'CustomerOwnedIp': 'string',
                                        'IpOwnerId': 'string',
                                        'PublicDnsName': 'string',
                                        'PublicIp': 'string'
                                    },
                                    'Primary': True|False,
                                    'PrivateDnsName': 'string',
                                    'PrivateIpAddress': 'string'
                                },
                            ],
                            'SourceDestCheck': True|False,
                            'Status': 'available'|'associated'|'attaching'|'in-use'|'detaching',
                            'SubnetId': 'string',
                            'VpcId': 'string',
                            'InterfaceType': 'string',
                            'Ipv4Prefixes': [
                                {
                                    'Ipv4Prefix': 'string'
                                },
                            ],
                            'Ipv6Prefixes': [
                                {
                                    'Ipv6Prefix': 'string'
                                },
                            ]
                        },
                    ],
                    'OutpostArn': 'string',
                    'RootDeviceName': 'string',
                    'RootDeviceType': 'ebs'|'instance-store',
                    'SecurityGroups': [
                        {
                            'GroupName': 'string',
                            'GroupId': 'string'
                        },
                    ],
                    'SourceDestCheck': True|False,
                    'SpotInstanceRequestId': 'string',
                    'SriovNetSupport': 'string',
                    'StateReason': {
                        'Code': 'string',
                        'Message': 'string'
                    },
                    'Tags': [
                        {
                            'Key': 'string',
                            'Value': 'string'
                        },
                    ],
                    'VirtualizationType': 'hvm'|'paravirtual',
                    'CpuOptions': {
                        'CoreCount': 123,
                        'ThreadsPerCore': 123
                    },
                    'CapacityReservationId': 'string',
                    'CapacityReservationSpecification': {
                        'CapacityReservationPreference': 'open'|'none',
                        'CapacityReservationTarget': {
                            'CapacityReservationId': 'string',
                            'CapacityReservationResourceGroupArn': 'string'
                        }
                    },
                    'HibernationOptions': {
                        'Configured': True|False
                    },
                    'Licenses': [
                        {
                            'LicenseConfigurationArn': 'string'
                        },
                    ],
                    'MetadataOptions': {
                        'State': 'pending'|'applied',
                        'HttpTokens': 'optional'|'required',
                        'HttpPutResponseHopLimit': 123,
                        'HttpEndpoint': 'disabled'|'enabled',
                        'HttpProtocolIpv6': 'disabled'|'enabled',
                        'InstanceMetadataTags': 'disabled'|'enabled'
                    },
                    'EnclaveOptions': {
                        'Enabled': True|False
                    },
                    'BootMode': 'legacy-bios'|'uefi',
                    'PlatformDetails': 'string',
                    'UsageOperation': 'string',
                    'UsageOperationUpdateTime': datetime(2015, 1, 1),
                    'PrivateDnsNameOptions': {
                        'HostnameType': 'ip-name'|'resource-name',
                        'EnableResourceNameDnsARecord': True|False,
                        'EnableResourceNameDnsAAAARecord': True|False
                    },
                    'Ipv6Address': 'string',
                    'TpmSupport': 'string',
                    'MaintenanceOptions': {
                        'AutoRecovery': 'disabled'|'default'
                    }
                },
            ],
            'OwnerId': 'string',
            'RequesterId': 'string',
            'ReservationId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Reservations (list) --

      Information about the reservations.

      • (dict) --

        Describes a launch request for one or more instances, and includes owner, requester, and security group information that applies to all instances in the launch request.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

        • Groups (list) --

          [EC2-Classic only] The 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) --

          The instances.

          • (dict) --

            Describes an instance.

            • AmiLaunchIndex (integer) --

              The AMI launch index, which can be used to find this instance in the launch group.

            • ImageId (string) --

              The ID of the AMI used to launch the instance.

            • InstanceId (string) --

              The ID of the instance.

            • InstanceType (string) --

              The instance type.

            • KernelId (string) --

              The kernel associated with this instance, if applicable.

            • KeyName (string) --

              The name of the key pair, if this instance was launched with an associated key pair.

            • LaunchTime (datetime) --

              The time the instance was launched.

            • Monitoring (dict) --

              The monitoring for the instance.

              • State (string) --

                Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

            • Placement (dict) --

              The location where the instance launched, if applicable.

              • AvailabilityZone (string) --

                The Availability Zone of the instance.

                If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

                This parameter is not supported by CreateFleet .

              • Affinity (string) --

                The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

                This parameter is not supported by CreateFleet .

              • GroupName (string) --

                The name of the placement group the instance is in.

              • PartitionNumber (integer) --

                The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

                This parameter is not supported by CreateFleet .

              • HostId (string) --

                The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

                This parameter is not supported by CreateFleet .

              • 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.

                This parameter is not supported by CreateFleet .

                T3 instances that use the unlimited CPU credit option do not support host tenancy.

              • SpreadDomain (string) --

                Reserved for future use.

                This parameter is not supported by CreateFleet .

              • HostResourceGroupArn (string) --

                The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

                This parameter is not supported by CreateFleet .

            • Platform (string) --

              The value is Windows for Windows instances; otherwise blank.

            • PrivateDnsName (string) --

              (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

              [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

            • PrivateIpAddress (string) --

              The private IPv4 address assigned to the instance.

            • 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.

            • PublicDnsName (string) --

              (IPv4 only) 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.

            • PublicIpAddress (string) --

              The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

              A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

            • RamdiskId (string) --

              The RAM disk associated with this instance, if applicable.

            • State (dict) --

              The current state of the instance.

              • Code (integer) --

                The state of the instance as a 16-bit unsigned integer.

                The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

                The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

                The valid values for instance-state-code will all be in the range of the low byte and they are:

                • 0 : pending
                • 16 : running
                • 32 : shutting-down
                • 48 : terminated
                • 64 : stopping
                • 80 : stopped

                You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

              • Name (string) --

                The current state of the instance.

            • StateTransitionReason (string) --

              The reason for the most recent state transition. This might be an empty string.

            • 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.

            • Architecture (string) --

              The architecture of the image.

            • BlockDeviceMappings (list) --

              Any block device mapping entries for the instance.

              • (dict) --

                Describes a block device mapping.

                • DeviceName (string) --

                  The device name (for example, /dev/sdh or xvdh ).

                • Ebs (dict) --

                  Parameters used to automatically set up EBS volumes when the instance is launched.

                  • AttachTime (datetime) --

                    The time stamp when the attachment initiated.

                  • DeleteOnTermination (boolean) --

                    Indicates whether the volume is deleted on instance termination.

                  • Status (string) --

                    The attachment state.

                  • VolumeId (string) --

                    The ID of the EBS volume.

            • ClientToken (string) --

              The idempotency token you provided when you launched the instance, if applicable.

            • EbsOptimized (boolean) --

              Indicates whether the instance is optimized for Amazon 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.

            • EnaSupport (boolean) --

              Specifies whether enhanced networking with ENA is enabled.

            • Hypervisor (string) --

              The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

            • 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.

            • InstanceLifecycle (string) --

              Indicates whether this is a Spot Instance or a Scheduled Instance.

            • ElasticGpuAssociations (list) --

              The Elastic GPU associated with the instance.

              • (dict) --

                Describes the association between an instance and an Elastic Graphics accelerator.

                • ElasticGpuId (string) --

                  The ID of the Elastic Graphics accelerator.

                • ElasticGpuAssociationId (string) --

                  The ID of the association.

                • ElasticGpuAssociationState (string) --

                  The state of the association between the instance and the Elastic Graphics accelerator.

                • ElasticGpuAssociationTime (string) --

                  The time the Elastic Graphics accelerator was associated with the instance.

            • ElasticInferenceAcceleratorAssociations (list) --

              The elastic inference accelerator associated with the instance.

              • (dict) --

                Describes the association between an instance and an elastic inference accelerator.

                • ElasticInferenceAcceleratorArn (string) --

                  The Amazon Resource Name (ARN) of the elastic inference accelerator.

                • ElasticInferenceAcceleratorAssociationId (string) --

                  The ID of the association.

                • ElasticInferenceAcceleratorAssociationState (string) --

                  The state of the elastic inference accelerator.

                • ElasticInferenceAcceleratorAssociationTime (datetime) --

                  The time at which the elastic inference accelerator is associated with an instance.

            • NetworkInterfaces (list) --

              [EC2-VPC] The network interfaces for the instance.

              • (dict) --

                Describes a network interface.

                • Association (dict) --

                  The association information for an Elastic IPv4 associated with the network interface.

                  • CarrierIp (string) --

                    The carrier IP address associated with the network interface.

                  • CustomerOwnedIp (string) --

                    The customer-owned IP address associated with the network interface.

                  • IpOwnerId (string) --

                    The ID of the owner of the Elastic IP address.

                  • PublicDnsName (string) --

                    The public DNS name.

                  • PublicIp (string) --

                    The public IP address or Elastic IP address bound to the network interface.

                • Attachment (dict) --

                  The network interface attachment.

                  • AttachTime (datetime) --

                    The time stamp when the attachment initiated.

                  • AttachmentId (string) --

                    The ID of the network interface attachment.

                  • DeleteOnTermination (boolean) --

                    Indicates whether the network interface is deleted when the instance is terminated.

                  • DeviceIndex (integer) --

                    The index of the device on the instance for the network interface attachment.

                  • Status (string) --

                    The attachment state.

                  • NetworkCardIndex (integer) --

                    The index of the network card.

                • Description (string) --

                  The description.

                • 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.

                • Ipv6Addresses (list) --

                  One or more IPv6 addresses associated with the network interface.

                  • (dict) --

                    Describes an IPv6 address.

                    • Ipv6Address (string) --

                      The IPv6 address.

                • MacAddress (string) --

                  The MAC address.

                • NetworkInterfaceId (string) --

                  The ID of the network interface.

                • OwnerId (string) --

                  The ID of the Amazon Web Services account that created the network interface.

                • PrivateDnsName (string) --

                  The private DNS name.

                • PrivateIpAddress (string) --

                  The IPv4 address of the network interface within the subnet.

                • PrivateIpAddresses (list) --

                  One or more private IPv4 addresses associated with the network interface.

                  • (dict) --

                    Describes a private IPv4 address.

                    • Association (dict) --

                      The association information for an Elastic IP address for the network interface.

                      • CarrierIp (string) --

                        The carrier IP address associated with the network interface.

                      • CustomerOwnedIp (string) --

                        The customer-owned IP address associated with the network interface.

                      • IpOwnerId (string) --

                        The ID of the owner of the Elastic IP address.

                      • PublicDnsName (string) --

                        The public DNS name.

                      • PublicIp (string) --

                        The public IP address or Elastic IP address bound to the network interface.

                    • Primary (boolean) --

                      Indicates whether this IPv4 address is the primary private IP address of the network interface.

                    • PrivateDnsName (string) --

                      The private IPv4 DNS name.

                    • PrivateIpAddress (string) --

                      The private IPv4 address of the network interface.

                • SourceDestCheck (boolean) --

                  Indicates whether source/destination checking is enabled.

                • Status (string) --

                  The status of the network interface.

                • SubnetId (string) --

                  The ID of the subnet.

                • VpcId (string) --

                  The ID of the VPC.

                • InterfaceType (string) --

                  The type of network interface.

                  Valid values: interface | efa | trunk

                • Ipv4Prefixes (list) --

                  The IPv4 delegated prefixes that are assigned to the network interface.

                  • (dict) --

                    Information about an IPv4 prefix.

                    • Ipv4Prefix (string) --

                      One or more IPv4 prefixes assigned to the network interface.

                • Ipv6Prefixes (list) --

                  The IPv6 delegated prefixes that are assigned to the network interface.

                  • (dict) --

                    Information about an IPv6 prefix.

                    • Ipv6Prefix (string) --

                      One or more IPv6 prefixes assigned to the network interface.

            • OutpostArn (string) --

              The Amazon Resource Name (ARN) of the Outpost.

            • RootDeviceName (string) --

              The device name of the root device volume (for example, /dev/sda1 ).

            • RootDeviceType (string) --

              The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

            • SecurityGroups (list) --

              The 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) --

              Indicates whether source/destination checking is enabled.

            • SpotInstanceRequestId (string) --

              If the request is a Spot Instance request, the ID of the request.

            • SriovNetSupport (string) --

              Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

            • 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.InsufficientInstanceCapacity : There was insufficient capacity available to satisfy the launch request.
                • Server.InternalError : An internal error caused the instance to terminate during launch.
                • Server.ScheduledStop : The instance was stopped due to a scheduled retirement.
                • Server.SpotInstanceShutdown : The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
                • Server.SpotInstanceTermination : The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
                • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.
                • Client.InstanceTerminated : The instance was terminated or rebooted during AMI creation.
                • Client.InternalError : A client error caused the instance to terminate during launch.
                • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.
                • Client.UserInitiatedHibernate : Hibernation was initiated on 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 account limits.
            • 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 256 Unicode characters.

            • VirtualizationType (string) --

              The virtualization type of the instance.

            • CpuOptions (dict) --

              The CPU options for the instance.

              • CoreCount (integer) --

                The number of CPU cores for the instance.

              • ThreadsPerCore (integer) --

                The number of threads per CPU core.

            • CapacityReservationId (string) --

              The ID of the Capacity Reservation.

            • CapacityReservationSpecification (dict) --

              Information about the Capacity Reservation targeting option.

              • CapacityReservationPreference (string) --

                Describes the instance's Capacity Reservation preferences. Possible preferences include:

                • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
                • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
              • CapacityReservationTarget (dict) --

                Information about the targeted Capacity Reservation or Capacity Reservation group.

                • CapacityReservationId (string) --

                  The ID of the targeted Capacity Reservation.

                • CapacityReservationResourceGroupArn (string) --

                  The ARN of the targeted Capacity Reservation group.

            • HibernationOptions (dict) --

              Indicates whether the instance is enabled for hibernation.

              • Configured (boolean) --

                If this parameter is set to true , your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

            • Licenses (list) --

              The license configurations for the instance.

              • (dict) --

                Describes a license configuration.

                • LicenseConfigurationArn (string) --

                  The Amazon Resource Name (ARN) of the license configuration.

            • MetadataOptions (dict) --

              The metadata options for the instance.

              • State (string) --

                The state of the metadata option changes.

                pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

                applied - The metadata options have been successfully applied on the instance.

              • HttpTokens (string) --

                The state of token usage for your instance metadata requests.

                If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

                If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

                Default: optional

              • HttpPutResponseHopLimit (integer) --

                The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

                Default: 1

                Possible values: Integers from 1 to 64

              • HttpEndpoint (string) --

                Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

                If the value is disabled , you cannot access your instance metadata.

              • HttpProtocolIpv6 (string) --

                Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

              • InstanceMetadataTags (string) --

                Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see Work with instance tags using the instance metadata .

            • EnclaveOptions (dict) --

              Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

              • Enabled (boolean) --

                If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

            • BootMode (string) --

              The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide .

            • PlatformDetails (string) --

              The platform details value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide .

            • UsageOperation (string) --

              The usage operation value for the instance. For more information, see AMI billing information fields in the Amazon EC2 User Guide .

            • UsageOperationUpdateTime (datetime) --

              The time that the usage operation was last updated.

            • PrivateDnsNameOptions (dict) --

              The options for the instance hostname.

              • HostnameType (string) --

                The type of hostname to assign to an instance.

              • EnableResourceNameDnsARecord (boolean) --

                Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

              • EnableResourceNameDnsAAAARecord (boolean) --

                Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

            • Ipv6Address (string) --

              The IPv6 address assigned to the instance.

            • TpmSupport (string) --

              If the instance is configured for NitroTPM support, the value is v2.0 . For more information, see NitroTPM in the Amazon EC2 User Guide .

            • MaintenanceOptions (dict) --

              Provides information on the recovery and maintenance options of your instance.

              • AutoRecovery (string) --

                Provides information on the current automatic recovery behavior of your instance.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the reservation.

        • RequesterId (string) --

          The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).

        • ReservationId (string) --

          The ID of the reservation.

class EC2.Paginator.DescribeInternetGateways
paginator = client.get_paginator('describe_internet_gateways')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_internet_gateways().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    InternetGatewayIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • attachment.state - The current state of the attachment between the gateway and the VPC (available ). Present only if a VPC is attached.
    • attachment.vpc-id - The ID of an attached VPC.
    • internet-gateway-id - The ID of the Internet gateway.
    • owner-id - The ID of the Amazon Web Services account that owns the internet gateway.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayIds (list) --

    One or more internet gateway IDs.

    Default: Describes all your internet gateways.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InternetGateways': [
        {
            'Attachments': [
                {
                    'State': 'attaching'|'attached'|'detaching'|'detached',
                    'VpcId': 'string'
                },
            ],
            'InternetGatewayId': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • InternetGateways (list) --

      Information about one or more internet gateways.

      • (dict) --

        Describes an internet gateway.

        • Attachments (list) --

          Any VPCs attached to the internet gateway.

          • (dict) --

            Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

            • State (string) --

              The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

            • VpcId (string) --

              The ID of the VPC.

        • InternetGatewayId (string) --

          The ID of the internet gateway.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the internet gateway.

        • Tags (list) --

          Any tags assigned to the internet gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeIpamPools
paginator = client.get_paginator('describe_ipam_pools')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_ipam_pools().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    IpamPoolIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • IpamPoolIds (list) --

    The IDs of the IPAM pools you would like information on.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'IpamPools': [
        {
            'OwnerId': 'string',
            'IpamPoolId': 'string',
            'SourceIpamPoolId': 'string',
            'IpamPoolArn': 'string',
            'IpamScopeArn': 'string',
            'IpamScopeType': 'public'|'private',
            'IpamArn': 'string',
            'IpamRegion': 'string',
            'Locale': 'string',
            'PoolDepth': 123,
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
            'StateMessage': 'string',
            'Description': 'string',
            'AutoImport': True|False,
            'PubliclyAdvertisable': True|False,
            'AddressFamily': 'ipv4'|'ipv6',
            'AllocationMinNetmaskLength': 123,
            'AllocationMaxNetmaskLength': 123,
            'AllocationDefaultNetmaskLength': 123,
            'AllocationResourceTags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'AwsService': 'ec2'
        },
    ]
}

Response Structure

  • (dict) --

    • IpamPools (list) --

      Information about the IPAM pools.

      • (dict) --

        In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable you to organize your IP addresses according to your routing and security needs. For example, if you have separate routing and security needs for development and production applications, you can create a pool for each.

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the IPAM pool.

        • IpamPoolId (string) --

          The ID of the IPAM pool.

        • SourceIpamPoolId (string) --

          The ID of the source IPAM pool. You can use this option to create an IPAM pool within an existing source pool.

        • IpamPoolArn (string) --

          The ARN of the IPAM pool.

        • IpamScopeArn (string) --

          The ARN of the scope of the IPAM pool.

        • IpamScopeType (string) --

          In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

        • IpamArn (string) --

          The ARN of the IPAM.

        • IpamRegion (string) --

          The Amazon Web Services Region of the IPAM pool.

        • Locale (string) --

          The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services Region where you want to make an IPAM pool available for allocations. Only resources in the same Region as the locale of the pool can get IP address allocations from the pool. You can only allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web Services Region for locale that has not been configured as an operating Region for the IPAM, you'll get an error.

        • PoolDepth (integer) --

          The depth of pools in your IPAM pool. The pool depth quota is 10. For more information, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

        • State (string) --

          The state of the IPAM pool.

        • StateMessage (string) --

          A message related to the failed creation of an IPAM pool.

        • Description (string) --

          The description of the IPAM pool.

        • AutoImport (boolean) --

          If selected, IPAM will continuously look for resources within the CIDR range of this pool and automatically import them as allocations into your IPAM. The CIDRs that will be allocated for these resources must not already be allocated to other resources in order for the import to succeed. IPAM will import a CIDR regardless of its compliance with the pool's allocation rules, so a resource might be imported and subsequently marked as noncompliant. If IPAM discovers multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of them only.

          A locale must be set on the pool for this feature to work.

        • PubliclyAdvertisable (boolean) --

          Determines if a pool is publicly advertisable. This option is not available for pools with AddressFamily set to ipv4 .

        • AddressFamily (string) --

          The address family of the pool.

        • AllocationMinNetmaskLength (integer) --

          The minimum netmask length required for CIDR allocations in this IPAM pool to be compliant. The minimum netmask length must be less than the maximum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

        • AllocationMaxNetmaskLength (integer) --

          The maximum netmask length possible for CIDR allocations in this IPAM pool to be compliant. The maximum netmask length must be greater than the minimum netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask lengths for IPv6 addresses are 0 - 128.

        • AllocationDefaultNetmaskLength (integer) --

          The default netmask length for allocations added to this pool. If, for example, the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new allocations will default to 10.0.0.0/16.

        • AllocationResourceTags (list) --

          Tags that are required for resources that use CIDRs from this IPAM pool. Resources that do not have these tags will not be allowed to allocate space from the pool. If the resources have their tags changed after they have allocated space or if the allocation tagging requirements are changed on the pool, the resource may be marked as noncompliant.

          • (dict) --

            The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

            • Key (string) --

              The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

            • Value (string) --

              The value of the tag.

        • Tags (list) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • AwsService (string) --

          Limits which service in Amazon Web Services that the pool can be used in. "ec2", for example, allows users to use space for Elastic IP addresses and VPCs.

class EC2.Paginator.DescribeIpamScopes
paginator = client.get_paginator('describe_ipam_scopes')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_ipam_scopes().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    IpamScopeIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • IpamScopeIds (list) --

    The IDs of the scopes you want information on.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'IpamScopes': [
        {
            'OwnerId': 'string',
            'IpamScopeId': 'string',
            'IpamScopeArn': 'string',
            'IpamArn': 'string',
            'IpamRegion': 'string',
            'IpamScopeType': 'public'|'private',
            'IsDefault': True|False,
            'Description': 'string',
            'PoolCount': 123,
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • IpamScopes (list) --

      The scopes you want information on.

      • (dict) --

        In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope represents the IP space for a single network. The private scope is intended for all private IP address space. The public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple unconnected networks without causing IP address overlap or conflict.

        For more information, see How IPAM works in the Amazon VPC IPAM User Guide .

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the scope.

        • IpamScopeId (string) --

          The ID of the scope.

        • IpamScopeArn (string) --

          The ARN of the scope.

        • IpamArn (string) --

          The ARN of the IPAM.

        • IpamRegion (string) --

          The Amazon Web Services Region of the IPAM scope.

        • IpamScopeType (string) --

          The type of the scope.

        • IsDefault (boolean) --

          Defines if the scope is the default scope or not.

        • Description (string) --

          The description of the scope.

        • PoolCount (integer) --

          The number of pools in the scope.

        • State (string) --

          The state of the IPAM scope.

        • Tags (list) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeIpams
paginator = client.get_paginator('describe_ipams')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_ipams().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    IpamIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • IpamIds (list) --

    The IDs of the IPAMs you want information on.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Ipams': [
        {
            'OwnerId': 'string',
            'IpamId': 'string',
            'IpamArn': 'string',
            'IpamRegion': 'string',
            'PublicDefaultScopeId': 'string',
            'PrivateDefaultScopeId': 'string',
            'ScopeCount': 123,
            'Description': 'string',
            'OperatingRegions': [
                {
                    'RegionName': 'string'
                },
            ],
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'delete-in-progress'|'delete-complete'|'delete-failed'|'isolate-in-progress'|'isolate-complete'|'restore-in-progress',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Ipams (list) --

      Information about the IPAMs.

      • (dict) --

        IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the IPAM.

        • IpamId (string) --

          The ID of the IPAM.

        • IpamArn (string) --

          The ARN of the IPAM.

        • IpamRegion (string) --

          The Amazon Web Services Region of the IPAM.

        • PublicDefaultScopeId (string) --

          The ID of the IPAM's default public scope.

        • PrivateDefaultScopeId (string) --

          The ID of the IPAM's default private scope.

        • ScopeCount (integer) --

          The number of scopes in the IPAM. The scope quota is 5. For more information on quotas, see Quotas in IPAM in the Amazon VPC IPAM User Guide .

        • Description (string) --

          The description for the IPAM.

        • OperatingRegions (list) --

          The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

          For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

          • (dict) --

            The operating Regions for an IPAM. Operating Regions are Amazon Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only discovers and monitors resources in the Amazon Web Services Regions you select as operating Regions.

            For more information about operating Regions, see Create an IPAM in the Amazon VPC IPAM User Guide .

            • RegionName (string) --

              The name of the operating Region.

        • State (string) --

          The state of the IPAM.

        • Tags (list) --

          The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeIpv6Pools
paginator = client.get_paginator('describe_ipv6_pools')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_ipv6_pools().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PoolIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • PoolIds (list) --

    The IDs of the IPv6 address pools.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Ipv6Pools': [
        {
            'PoolId': 'string',
            'Description': 'string',
            'PoolCidrBlocks': [
                {
                    'Cidr': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • Ipv6Pools (list) --

      Information about the IPv6 address pools.

      • (dict) --

        Describes an IPv6 address pool.

        • PoolId (string) --

          The ID of the address pool.

        • Description (string) --

          The description for the address pool.

        • PoolCidrBlocks (list) --

          The CIDR blocks for the address pool.

          • (dict) --

            Describes a CIDR block for an address pool.

            • Cidr (string) --

              The CIDR block.

        • Tags (list) --

          Any tags for the address pool.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeLaunchTemplateVersions
paginator = client.get_paginator('describe_launch_template_versions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_launch_template_versions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    LaunchTemplateId='string',
    LaunchTemplateName='string',
    Versions=[
        'string',
    ],
    MinVersion='string',
    MaxVersion='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LaunchTemplateId (string) --

    The ID of the launch template.

    To describe one or more versions of a specified launch template, you must specify either the LaunchTemplateId or the LaunchTemplateName , but not both.

    To describe all the latest or default launch template versions in your account, you must omit this parameter.

  • LaunchTemplateName (string) --

    The name of the launch template.

    To describe one or more versions of a specified launch template, you must specify either the LaunchTemplateName or the LaunchTemplateId , but not both.

    To describe all the latest or default launch template versions in your account, you must omit this parameter.

  • Versions (list) --

    One or more versions of the launch template. Valid values depend on whether you are describing a specified launch template (by ID or name) or all launch templates in your account.

    To describe one or more versions of a specified launch template, valid values are $Latest , $Default , and numbers.

    To describe all launch templates in your account that are defined as the latest version, the valid value is $Latest . To describe all launch templates in your account that are defined as the default version, the valid value is $Default . You can specify $Latest and $Default in the same request. You cannot specify numbers.

    • (string) --
  • MinVersion (string) -- The version number after which to describe launch template versions.
  • MaxVersion (string) -- The version number up to which to describe launch template versions.
  • Filters (list) --

    One or more filters.

    • create-time - The time the launch template version was created.
    • ebs-optimized - A boolean that indicates whether the instance is optimized for Amazon EBS I/O.
    • http-endpoint - Indicates whether the HTTP metadata endpoint on your instances is enabled (enabled | disabled ).
    • http-protocol-ipv4 - Indicates whether the IPv4 endpoint for the instance metadata service is enabled (enabled | disabled ).
    • host-resource-group-arn - The ARN of the host resource group in which to launch the instances.
    • http-tokens - The state of token usage for your instance metadata requests (optional | required ).
    • iam-instance-profile - The ARN of the IAM instance profile.
    • image-id - The ID of the AMI.
    • instance-type - The instance type.
    • is-default-version - A boolean that indicates whether the launch template version is the default version.
    • kernel-id - The kernel ID.
    • license-configuration-arn - The ARN of the license configuration.
    • network-card-index - The index of the network card.
    • ram-disk-id - The RAM disk ID.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LaunchTemplateVersions': [
        {
            'LaunchTemplateId': 'string',
            'LaunchTemplateName': 'string',
            'VersionNumber': 123,
            'VersionDescription': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'CreatedBy': 'string',
            'DefaultVersion': True|False,
            'LaunchTemplateData': {
                'KernelId': 'string',
                'EbsOptimized': True|False,
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Name': 'string'
                },
                'BlockDeviceMappings': [
                    {
                        'DeviceName': 'string',
                        'VirtualName': 'string',
                        'Ebs': {
                            'Encrypted': True|False,
                            'DeleteOnTermination': True|False,
                            'Iops': 123,
                            'KmsKeyId': 'string',
                            'SnapshotId': 'string',
                            'VolumeSize': 123,
                            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                            'Throughput': 123
                        },
                        'NoDevice': 'string'
                    },
                ],
                'NetworkInterfaces': [
                    {
                        'AssociateCarrierIpAddress': True|False,
                        'AssociatePublicIpAddress': True|False,
                        'DeleteOnTermination': True|False,
                        'Description': 'string',
                        'DeviceIndex': 123,
                        'Groups': [
                            'string',
                        ],
                        'InterfaceType': 'string',
                        'Ipv6AddressCount': 123,
                        'Ipv6Addresses': [
                            {
                                'Ipv6Address': 'string'
                            },
                        ],
                        'NetworkInterfaceId': 'string',
                        'PrivateIpAddress': 'string',
                        'PrivateIpAddresses': [
                            {
                                'Primary': True|False,
                                'PrivateIpAddress': 'string'
                            },
                        ],
                        'SecondaryPrivateIpAddressCount': 123,
                        'SubnetId': 'string',
                        'NetworkCardIndex': 123,
                        'Ipv4Prefixes': [
                            {
                                'Ipv4Prefix': 'string'
                            },
                        ],
                        'Ipv4PrefixCount': 123,
                        'Ipv6Prefixes': [
                            {
                                'Ipv6Prefix': 'string'
                            },
                        ],
                        'Ipv6PrefixCount': 123
                    },
                ],
                'ImageId': 'string',
                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                'KeyName': 'string',
                'Monitoring': {
                    'Enabled': True|False
                },
                'Placement': {
                    'AvailabilityZone': 'string',
                    'Affinity': 'string',
                    'GroupName': 'string',
                    'HostId': 'string',
                    'Tenancy': 'default'|'dedicated'|'host',
                    'SpreadDomain': 'string',
                    'HostResourceGroupArn': 'string',
                    'PartitionNumber': 123
                },
                'RamDiskId': 'string',
                'DisableApiTermination': True|False,
                'InstanceInitiatedShutdownBehavior': 'stop'|'terminate',
                'UserData': 'string',
                'TagSpecifications': [
                    {
                        'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                        'Tags': [
                            {
                                'Key': 'string',
                                'Value': 'string'
                            },
                        ]
                    },
                ],
                'ElasticGpuSpecifications': [
                    {
                        'Type': 'string'
                    },
                ],
                'ElasticInferenceAccelerators': [
                    {
                        'Type': 'string',
                        'Count': 123
                    },
                ],
                'SecurityGroupIds': [
                    'string',
                ],
                'SecurityGroups': [
                    'string',
                ],
                'InstanceMarketOptions': {
                    'MarketType': 'spot',
                    'SpotOptions': {
                        'MaxPrice': 'string',
                        'SpotInstanceType': 'one-time'|'persistent',
                        'BlockDurationMinutes': 123,
                        'ValidUntil': datetime(2015, 1, 1),
                        'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
                    }
                },
                'CreditSpecification': {
                    'CpuCredits': 'string'
                },
                'CpuOptions': {
                    'CoreCount': 123,
                    'ThreadsPerCore': 123
                },
                'CapacityReservationSpecification': {
                    'CapacityReservationPreference': 'open'|'none',
                    'CapacityReservationTarget': {
                        'CapacityReservationId': 'string',
                        'CapacityReservationResourceGroupArn': 'string'
                    }
                },
                'LicenseSpecifications': [
                    {
                        'LicenseConfigurationArn': 'string'
                    },
                ],
                'HibernationOptions': {
                    'Configured': True|False
                },
                'MetadataOptions': {
                    'State': 'pending'|'applied',
                    'HttpTokens': 'optional'|'required',
                    'HttpPutResponseHopLimit': 123,
                    'HttpEndpoint': 'disabled'|'enabled',
                    'HttpProtocolIpv6': 'disabled'|'enabled',
                    'InstanceMetadataTags': 'disabled'|'enabled'
                },
                'EnclaveOptions': {
                    'Enabled': True|False
                },
                'InstanceRequirements': {
                    'VCpuCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'MemoryMiB': {
                        'Min': 123,
                        'Max': 123
                    },
                    'CpuManufacturers': [
                        'intel'|'amd'|'amazon-web-services',
                    ],
                    'MemoryGiBPerVCpu': {
                        'Min': 123.0,
                        'Max': 123.0
                    },
                    'ExcludedInstanceTypes': [
                        'string',
                    ],
                    'InstanceGenerations': [
                        'current'|'previous',
                    ],
                    'SpotMaxPricePercentageOverLowestPrice': 123,
                    'OnDemandMaxPricePercentageOverLowestPrice': 123,
                    'BareMetal': 'included'|'required'|'excluded',
                    'BurstablePerformance': 'included'|'required'|'excluded',
                    'RequireHibernateSupport': True|False,
                    'NetworkInterfaceCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'LocalStorage': 'included'|'required'|'excluded',
                    'LocalStorageTypes': [
                        'hdd'|'ssd',
                    ],
                    'TotalLocalStorageGB': {
                        'Min': 123.0,
                        'Max': 123.0
                    },
                    'BaselineEbsBandwidthMbps': {
                        'Min': 123,
                        'Max': 123
                    },
                    'AcceleratorTypes': [
                        'gpu'|'fpga'|'inference',
                    ],
                    'AcceleratorCount': {
                        'Min': 123,
                        'Max': 123
                    },
                    'AcceleratorManufacturers': [
                        'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                    ],
                    'AcceleratorNames': [
                        'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                    ],
                    'AcceleratorTotalMemoryMiB': {
                        'Min': 123,
                        'Max': 123
                    }
                },
                'PrivateDnsNameOptions': {
                    'HostnameType': 'ip-name'|'resource-name',
                    'EnableResourceNameDnsARecord': True|False,
                    'EnableResourceNameDnsAAAARecord': True|False
                },
                'MaintenanceOptions': {
                    'AutoRecovery': 'default'|'disabled'
                },
                'DisableApiStop': True|False
            }
        },
    ],

}

Response Structure

  • (dict) --

    • LaunchTemplateVersions (list) --

      Information about the launch template versions.

      • (dict) --

        Describes a launch template version.

        • LaunchTemplateId (string) --

          The ID of the launch template.

        • LaunchTemplateName (string) --

          The name of the launch template.

        • VersionNumber (integer) --

          The version number.

        • VersionDescription (string) --

          The description for the version.

        • CreateTime (datetime) --

          The time the version was created.

        • CreatedBy (string) --

          The principal that created the version.

        • DefaultVersion (boolean) --

          Indicates whether the version is the default version.

        • LaunchTemplateData (dict) --

          Information about the launch template.

          • KernelId (string) --

            The ID of the kernel, if applicable.

          • EbsOptimized (boolean) --

            Indicates whether the instance is optimized for Amazon EBS I/O.

          • 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.

          • BlockDeviceMappings (list) --

            The block device mappings.

            • (dict) --

              Describes a block device mapping.

              • DeviceName (string) --

                The device name.

              • VirtualName (string) --

                The virtual device name (ephemeralN).

              • Ebs (dict) --

                Information about the block device for an EBS volume.

                • Encrypted (boolean) --

                  Indicates whether the EBS volume is encrypted.

                • DeleteOnTermination (boolean) --

                  Indicates whether the EBS volume is deleted on instance termination.

                • Iops (integer) --

                  The number of I/O operations per second (IOPS) that the volume supports.

                • KmsKeyId (string) --

                  The ARN of the Key Management Service (KMS) CMK used for encryption.

                • SnapshotId (string) --

                  The ID of the snapshot.

                • VolumeSize (integer) --

                  The size of the volume, in GiB.

                • VolumeType (string) --

                  The volume type.

                • Throughput (integer) --

                  The throughput that the volume supports, in MiB/s.

              • NoDevice (string) --

                To omit the device from the block device mapping, specify an empty string.

          • NetworkInterfaces (list) --

            The network interfaces.

            • (dict) --

              Describes a network interface.

              • AssociateCarrierIpAddress (boolean) --

                Indicates whether to associate a Carrier IP address with eth0 for a new network interface.

                Use this option when you launch an instance in a Wavelength Zone and want to associate a Carrier IP address with the network interface. For more information about Carrier IP addresses, see Carrier IP addresses in the Wavelength Developer Guide .

              • AssociatePublicIpAddress (boolean) --

                Indicates whether to associate a public IPv4 address with eth0 for a new network interface.

              • DeleteOnTermination (boolean) --

                Indicates whether the network interface is deleted when the instance is terminated.

              • Description (string) --

                A description for the network interface.

              • DeviceIndex (integer) --

                The device index for the network interface attachment.

              • Groups (list) --

                The IDs of one or more security groups.

                • (string) --
              • InterfaceType (string) --

                The type of network interface.

              • Ipv6AddressCount (integer) --

                The number of IPv6 addresses for the network interface.

              • Ipv6Addresses (list) --

                The IPv6 addresses for the network interface.

                • (dict) --

                  Describes an IPv6 address.

                  • Ipv6Address (string) --

                    The IPv6 address.

              • NetworkInterfaceId (string) --

                The ID of the network interface.

              • PrivateIpAddress (string) --

                The primary private IPv4 address of the network interface.

              • PrivateIpAddresses (list) --

                One or more private IPv4 addresses.

                • (dict) --

                  Describes a secondary private IPv4 address for a network interface.

                  • Primary (boolean) --

                    Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                  • PrivateIpAddress (string) --

                    The private IPv4 addresses.

              • SecondaryPrivateIpAddressCount (integer) --

                The number of secondary private IPv4 addresses for the network interface.

              • SubnetId (string) --

                The ID of the subnet for the network interface.

              • NetworkCardIndex (integer) --

                The index of the network card.

              • Ipv4Prefixes (list) --

                One or more IPv4 prefixes assigned to the network interface.

                • (dict) --

                  Information about the IPv4 delegated prefixes assigned to a network interface.

                  • Ipv4Prefix (string) --

                    One or more IPv4 delegated prefixes assigned to the network interface.

              • Ipv4PrefixCount (integer) --

                The number of IPv4 prefixes that Amazon Web Services automatically assigned to the network interface.

              • Ipv6Prefixes (list) --

                One or more IPv6 prefixes assigned to the network interface.

                • (dict) --

                  Information about the IPv6 delegated prefixes assigned to a network interface.

                  • Ipv6Prefix (string) --

                    One or more IPv6 delegated prefixes assigned to the network interface.

              • Ipv6PrefixCount (integer) --

                The number of IPv6 prefixes that Amazon Web Services automatically assigned to the network interface.

          • ImageId (string) --

            The ID of the AMI that was used to launch the instance.

          • InstanceType (string) --

            The instance type.

          • KeyName (string) --

            The name of the key pair.

          • Monitoring (dict) --

            The monitoring for the instance.

            • Enabled (boolean) --

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

          • Placement (dict) --

            The placement of the instance.

            • AvailabilityZone (string) --

              The Availability Zone of the instance.

            • Affinity (string) --

              The affinity setting for the instance on the Dedicated Host.

            • GroupName (string) --

              The name of the placement group for the instance.

            • HostId (string) --

              The ID of the Dedicated Host for the instance.

            • 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.

            • SpreadDomain (string) --

              Reserved for future use.

            • HostResourceGroupArn (string) --

              The ARN of the host resource group in which to launch the instances.

            • PartitionNumber (integer) --

              The number of the partition the instance should launch in. Valid only if the placement group strategy is set to partition .

          • RamDiskId (string) --

            The ID of the RAM disk, if applicable.

          • DisableApiTermination (boolean) --

            If set to true , indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.

          • InstanceInitiatedShutdownBehavior (string) --

            Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

          • UserData (string) --

            The user data for the instance.

          • TagSpecifications (list) --

            The tags that are applied to the resources that are created during instance launch.

            • (dict) --

              The tags specification for the launch template.

              • ResourceType (string) --

                The type of resource to tag.

              • Tags (list) --

                The tags for 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 256 Unicode characters.

          • ElasticGpuSpecifications (list) --

            The elastic GPU specification.

            • (dict) --

              Describes an elastic GPU.

              • Type (string) --

                The elastic GPU type.

          • ElasticInferenceAccelerators (list) --

            The elastic inference accelerator for the instance.

            • (dict) --

              Describes an elastic inference accelerator.

              • Type (string) --

                The type of elastic inference accelerator. The possible values are eia1.medium, eia1.large, and eia1.xlarge.

              • Count (integer) --

                The number of elastic inference accelerators to attach to the instance.

                Default: 1

          • SecurityGroupIds (list) --

            The security group IDs.

            • (string) --
          • SecurityGroups (list) --

            The security group names.

            • (string) --
          • InstanceMarketOptions (dict) --

            The market (purchasing) option for the instances.

            • MarketType (string) --

              The market type.

            • SpotOptions (dict) --

              The options for Spot Instances.

              • MaxPrice (string) --

                The maximum hourly price you're willing to pay for the Spot Instances. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                Warning

                If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

              • SpotInstanceType (string) --

                The Spot Instance request type.

              • BlockDurationMinutes (integer) --

                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).

              • ValidUntil (datetime) --

                The end date of the request. For 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.

              • InstanceInterruptionBehavior (string) --

                The behavior when a Spot Instance is interrupted.

          • CreditSpecification (dict) --

            The credit option for CPU usage of the instance.

            • CpuCredits (string) --

              The credit option for CPU usage of a T instance.

              Valid values: standard | unlimited

          • CpuOptions (dict) --

            The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon Elastic Compute Cloud User Guide .

            • CoreCount (integer) --

              The number of CPU cores for the instance.

            • ThreadsPerCore (integer) --

              The number of threads per CPU core.

          • CapacityReservationSpecification (dict) --

            Information about the Capacity Reservation targeting option.

            • CapacityReservationPreference (string) --

              Indicates the instance's Capacity Reservation preferences. Possible preferences include:

              • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
              • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
            • CapacityReservationTarget (dict) --

              Information about the target Capacity Reservation or Capacity Reservation group.

              • CapacityReservationId (string) --

                The ID of the targeted Capacity Reservation.

              • CapacityReservationResourceGroupArn (string) --

                The ARN of the targeted Capacity Reservation group.

          • LicenseSpecifications (list) --

            The license configurations.

            • (dict) --

              Describes a license configuration.

              • LicenseConfigurationArn (string) --

                The Amazon Resource Name (ARN) of the license configuration.

          • HibernationOptions (dict) --

            Indicates whether an instance is configured for hibernation. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .

            • Configured (boolean) --

              If this parameter is set to true , the instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

          • MetadataOptions (dict) --

            The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .

            • State (string) --

              The state of the metadata option changes.

              pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

              applied - The metadata options have been successfully applied on the instance.

            • HttpTokens (string) --

              The state of token usage for your instance metadata requests. If the parameter is not specified in the request, the default state is optional .

              If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

              If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

            • HttpPutResponseHopLimit (integer) --

              The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

              Default: 1

              Possible values: Integers from 1 to 64

            • HttpEndpoint (string) --

              Enables or disables the HTTP metadata endpoint on your instances. If the parameter is not specified, the default state is enabled .

              Note

              If you specify a value of disabled , you will not be able to access your instance metadata.

            • HttpProtocolIpv6 (string) --

              Enables or disables the IPv6 endpoint for the instance metadata service.

              Default: disabled

            • InstanceMetadataTags (string) --

              Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

              Default: disabled

          • EnclaveOptions (dict) --

            Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

            • Enabled (boolean) --

              If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

          • InstanceRequirements (dict) --

            The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.

            If you specify InstanceRequirements , you can't specify InstanceTypes .

            • VCpuCount (dict) --

              The minimum and maximum number of vCPUs.

              • Min (integer) --

                The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

              • Max (integer) --

                The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

            • MemoryMiB (dict) --

              The minimum and maximum amount of memory, in MiB.

              • Min (integer) --

                The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

            • CpuManufacturers (list) --

              The CPU manufacturers to include.

              • For instance types with Intel CPUs, specify intel .
              • For instance types with AMD CPUs, specify amd .
              • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

              Note

              Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

              Default: Any manufacturer

              • (string) --
            • MemoryGiBPerVCpu (dict) --

              The minimum and maximum amount of memory per vCPU, in GiB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

              • Max (float) --

                The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

            • ExcludedInstanceTypes (list) --

              The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

              For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

              Default: No excluded instance types

              • (string) --
            • InstanceGenerations (list) --

              Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

              For current generation instance types, specify current .

              For previous generation instance types, specify previous .

              Default: Current and previous generation instance types

              • (string) --
            • SpotMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 100

            • OnDemandMaxPricePercentageOverLowestPrice (integer) --

              The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

              The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

              To turn off price protection, specify a high value, such as 999999 .

              This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

              Note

              If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

              Default: 20

            • BareMetal (string) --

              Indicates whether bare metal instance types must be included, excluded, or required.

              • To include bare metal instance types, specify included .
              • To require only bare metal instance types, specify required .
              • To exclude bare metal instance types, specify excluded .

              Default: excluded

            • BurstablePerformance (string) --

              Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

              • To include burstable performance instance types, specify included .
              • To require only burstable performance instance types, specify required .
              • To exclude burstable performance instance types, specify excluded .

              Default: excluded

            • RequireHibernateSupport (boolean) --

              Indicates whether instance types must support hibernation for On-Demand Instances.

              This parameter is not supported for GetSpotPlacementScores .

              Default: false

            • NetworkInterfaceCount (dict) --

              The minimum and maximum number of network interfaces.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

            • LocalStorage (string) --

              Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

              • To include instance types with instance store volumes, specify included .
              • To require only instance types with instance store volumes, specify required .
              • To exclude instance types with instance store volumes, specify excluded .

              Default: included

            • LocalStorageTypes (list) --

              The type of local storage that is required.

              • For instance types with hard disk drive (HDD) storage, specify hdd .
              • For instance types with solid state drive (SSD) storage, specify ssd .

              Default: hdd and ssd

              • (string) --
            • TotalLocalStorageGB (dict) --

              The minimum and maximum amount of total local storage, in GB.

              Default: No minimum or maximum limits

              • Min (float) --

                The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

              • Max (float) --

                The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

            • BaselineEbsBandwidthMbps (dict) --

              The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

            • AcceleratorTypes (list) --

              The accelerator types that must be on the instance type.

              • For instance types with GPU accelerators, specify gpu .
              • For instance types with FPGA accelerators, specify fpga .
              • For instance types with inference accelerators, specify inference .

              Default: Any accelerator type

              • (string) --
            • AcceleratorCount (dict) --

              The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

              To exclude accelerator-enabled instance types, set Max to 0 .

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

            • AcceleratorManufacturers (list) --

              Indicates whether instance types must have accelerators by specific manufacturers.

              • For instance types with NVIDIA devices, specify nvidia .
              • For instance types with AMD devices, specify amd .
              • For instance types with Amazon Web Services devices, specify amazon-web-services .
              • For instance types with Xilinx devices, specify xilinx .

              Default: Any manufacturer

              • (string) --
            • AcceleratorNames (list) --

              The accelerators that must be on the instance type.

              • For instance types with NVIDIA A100 GPUs, specify a100 .
              • For instance types with NVIDIA V100 GPUs, specify v100 .
              • For instance types with NVIDIA K80 GPUs, specify k80 .
              • For instance types with NVIDIA T4 GPUs, specify t4 .
              • For instance types with NVIDIA M60 GPUs, specify m60 .
              • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
              • For instance types with Xilinx VU9P FPGAs, specify vu9p .

              Default: Any accelerator

              • (string) --
            • AcceleratorTotalMemoryMiB (dict) --

              The minimum and maximum amount of total accelerator memory, in MiB.

              Default: No minimum or maximum limits

              • Min (integer) --

                The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

              • Max (integer) --

                The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • PrivateDnsNameOptions (dict) --

            The options for the instance hostname.

            • HostnameType (string) --

              The type of hostname to assign to an instance.

            • EnableResourceNameDnsARecord (boolean) --

              Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

            • EnableResourceNameDnsAAAARecord (boolean) --

              Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

          • MaintenanceOptions (dict) --

            The maintenance options for your instance.

            • AutoRecovery (string) --

              Disables the automatic recovery behavior of your instance or sets it to default.

          • DisableApiStop (boolean) --

            Indicates whether the instance is enabled for stop protection. For more information, see Stop Protection .

class EC2.Paginator.DescribeLaunchTemplates
paginator = client.get_paginator('describe_launch_templates')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_launch_templates().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    LaunchTemplateIds=[
        'string',
    ],
    LaunchTemplateNames=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • LaunchTemplateIds (list) --

    One or more launch template IDs.

    • (string) --
  • LaunchTemplateNames (list) --

    One or more launch template names.

    • (string) --
  • Filters (list) --

    One or more filters.

    • create-time - The time the launch template was created.
    • launch-template-name - The name of the launch template.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LaunchTemplates': [
        {
            'LaunchTemplateId': 'string',
            'LaunchTemplateName': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'CreatedBy': 'string',
            'DefaultVersionNumber': 123,
            'LatestVersionNumber': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • LaunchTemplates (list) --

      Information about the launch templates.

      • (dict) --

        Describes a launch template.

        • LaunchTemplateId (string) --

          The ID of the launch template.

        • LaunchTemplateName (string) --

          The name of the launch template.

        • CreateTime (datetime) --

          The time launch template was created.

        • CreatedBy (string) --

          The principal that created the launch template.

        • DefaultVersionNumber (integer) --

          The version number of the default version of the launch template.

        • LatestVersionNumber (integer) --

          The version number of the latest version of the launch template.

        • Tags (list) --

          The tags for the launch template.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations
paginator = client.get_paginator('describe_local_gateway_route_table_virtual_interface_group_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_local_gateway_route_table_virtual_interface_group_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds (list) --

    The IDs of the associations.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.
    • local-gateway-route-table-id - The ID of the local gateway route table.
    • local-gateway-route-table-virtual-interface-group-association-id - The ID of the association.
    • local-gateway-route-table-virtual-interface-group-id - The ID of the virtual interface group.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.
    • state - The state of the association.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTableVirtualInterfaceGroupAssociations': [
        {
            'LocalGatewayRouteTableVirtualInterfaceGroupAssociationId': 'string',
            'LocalGatewayVirtualInterfaceGroupId': 'string',
            'LocalGatewayId': 'string',
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • LocalGatewayRouteTableVirtualInterfaceGroupAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes an association between a local gateway route table and a virtual interface group.

        • LocalGatewayRouteTableVirtualInterfaceGroupAssociationId (string) --

          The ID of the association.

        • LocalGatewayVirtualInterfaceGroupId (string) --

          The ID of the virtual interface group.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table for the virtual interface group.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway virtual interface group association.

        • State (string) --

          The state of the association.

        • Tags (list) --

          The tags assigned to the association.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeLocalGatewayRouteTableVpcAssociations
paginator = client.get_paginator('describe_local_gateway_route_table_vpc_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_local_gateway_route_table_vpc_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    LocalGatewayRouteTableVpcAssociationIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • LocalGatewayRouteTableVpcAssociationIds (list) --

    The IDs of the associations.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local gateway route table for the association.
    • local-gateway-route-table-id - The ID of the local gateway route table.
    • local-gateway-route-table-vpc-association-id - The ID of the association.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway route table for the association.
    • state - The state of the association.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTableVpcAssociations': [
        {
            'LocalGatewayRouteTableVpcAssociationId': 'string',
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'LocalGatewayId': 'string',
            'VpcId': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • LocalGatewayRouteTableVpcAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes an association between a local gateway route table and a VPC.

        • LocalGatewayRouteTableVpcAssociationId (string) --

          The ID of the association.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table for the association.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • VpcId (string) --

          The ID of the VPC.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway route table for the association.

        • State (string) --

          The state of the association.

        • Tags (list) --

          The tags assigned to the association.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeLocalGatewayRouteTables
paginator = client.get_paginator('describe_local_gateway_route_tables')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_local_gateway_route_tables().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    LocalGatewayRouteTableIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • LocalGatewayRouteTableIds (list) --

    The IDs of the local gateway route tables.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local gateway route table.
    • local-gateway-route-table-id - The ID of a local gateway route table.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway route table.
    • state - The state of the local gateway route table.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LocalGatewayRouteTables': [
        {
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'LocalGatewayId': 'string',
            'OutpostArn': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • LocalGatewayRouteTables (list) --

      Information about the local gateway route tables.

      • (dict) --

        Describes a local gateway route table.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway route table.

        • State (string) --

          The state of the local gateway route table.

        • Tags (list) --

          The tags assigned to the local gateway route table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeLocalGatewayVirtualInterfaceGroups
paginator = client.get_paginator('describe_local_gateway_virtual_interface_groups')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_local_gateway_virtual_interface_groups().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    LocalGatewayVirtualInterfaceGroupIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • LocalGatewayVirtualInterfaceGroupIds (list) --

    The IDs of the virtual interface groups.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • local-gateway-virtual-interface-group-id - The ID of the virtual interface group.
    • local-gateway-virtual-interface-id - The ID of the virtual interface.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway virtual interface group.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LocalGatewayVirtualInterfaceGroups': [
        {
            'LocalGatewayVirtualInterfaceGroupId': 'string',
            'LocalGatewayVirtualInterfaceIds': [
                'string',
            ],
            'LocalGatewayId': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • LocalGatewayVirtualInterfaceGroups (list) --

      The virtual interface groups.

      • (dict) --

        Describes a local gateway virtual interface group.

        • LocalGatewayVirtualInterfaceGroupId (string) --

          The ID of the virtual interface group.

        • LocalGatewayVirtualInterfaceIds (list) --

          The IDs of the virtual interfaces.

          • (string) --
        • LocalGatewayId (string) --

          The ID of the local gateway.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway virtual interface group.

        • Tags (list) --

          The tags assigned to the virtual interface 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 256 Unicode characters.

class EC2.Paginator.DescribeLocalGatewayVirtualInterfaces
paginator = client.get_paginator('describe_local_gateway_virtual_interfaces')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_local_gateway_virtual_interfaces().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    LocalGatewayVirtualInterfaceIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • LocalGatewayVirtualInterfaceIds (list) --

    The IDs of the virtual interfaces.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-address - The local address.
    • local-bgp-asn - The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.
    • local-gateway-id - The ID of the local gateway.
    • local-gateway-virtual-interface-id - The ID of the virtual interface.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway virtual interface.
    • peer-address - The peer address.
    • peer-bgp-asn - The peer BGP ASN.
    • vlan - The ID of the VLAN.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LocalGatewayVirtualInterfaces': [
        {
            'LocalGatewayVirtualInterfaceId': 'string',
            'LocalGatewayId': 'string',
            'Vlan': 123,
            'LocalAddress': 'string',
            'PeerAddress': 'string',
            'LocalBgpAsn': 123,
            'PeerBgpAsn': 123,
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • LocalGatewayVirtualInterfaces (list) --

      Information about the virtual interfaces.

      • (dict) --

        Describes a local gateway virtual interface.

        • LocalGatewayVirtualInterfaceId (string) --

          The ID of the virtual interface.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • Vlan (integer) --

          The ID of the VLAN.

        • LocalAddress (string) --

          The local address.

        • PeerAddress (string) --

          The peer address.

        • LocalBgpAsn (integer) --

          The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local gateway.

        • PeerBgpAsn (integer) --

          The peer BGP ASN.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway virtual interface.

        • Tags (list) --

          The tags assigned to the virtual interface.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeLocalGateways
paginator = client.get_paginator('describe_local_gateways')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_local_gateways().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    LocalGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • LocalGatewayIds (list) --

    The IDs of the local gateways.

    • (string) --
  • Filters (list) --

    One or more filters.

    • local-gateway-id - The ID of a local gateway.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the local gateway.
    • state - The state of the association.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'LocalGateways': [
        {
            'LocalGatewayId': 'string',
            'OutpostArn': 'string',
            'OwnerId': 'string',
            'State': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • LocalGateways (list) --

      Information about the local gateways.

      • (dict) --

        Describes a local gateway.

        • LocalGatewayId (string) --

          The ID of the local gateway.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway.

        • State (string) --

          The state of the local gateway.

        • Tags (list) --

          The tags assigned to the local gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeManagedPrefixLists
paginator = client.get_paginator('describe_managed_prefix_lists')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_managed_prefix_lists().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PrefixListIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • owner-id - The ID of the prefix list owner.
    • prefix-list-id - The ID of the prefix list.
    • prefix-list-name - The name of the prefix list.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PrefixListIds (list) --

    One or more prefix list IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'PrefixLists': [
        {
            'PrefixListId': 'string',
            'AddressFamily': 'string',
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
            'StateMessage': 'string',
            'PrefixListArn': 'string',
            'PrefixListName': 'string',
            'MaxEntries': 123,
            'Version': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'OwnerId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • PrefixLists (list) --

      Information about the prefix lists.

      • (dict) --

        Describes a managed prefix list.

        • PrefixListId (string) --

          The ID of the prefix list.

        • AddressFamily (string) --

          The IP address version.

        • State (string) --

          The current state of the prefix list.

        • StateMessage (string) --

          The state message.

        • PrefixListArn (string) --

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName (string) --

          The name of the prefix list.

        • MaxEntries (integer) --

          The maximum number of entries for the prefix list.

        • Version (integer) --

          The version of the prefix list.

        • Tags (list) --

          The tags for the prefix list.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • OwnerId (string) --

          The ID of the owner of the prefix list.

class EC2.Paginator.DescribeMovingAddresses
paginator = client.get_paginator('describe_moving_addresses')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_moving_addresses().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PublicIps=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • moving-status - The status of the Elastic IP address (MovingToVpc | RestoringToClassic ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PublicIps (list) --

    One or more Elastic IP addresses.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'MovingAddressStatuses': [
        {
            'MoveStatus': 'movingToVpc'|'restoringToClassic',
            'PublicIp': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • MovingAddressStatuses (list) --

      The status for each Elastic IP address.

      • (dict) --

        Describes the status of a moving Elastic IP address.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        • MoveStatus (string) --

          The status of the Elastic IP address that's being moved to the EC2-VPC platform, or restored to the EC2-Classic platform.

        • PublicIp (string) --

          The Elastic IP address.

class EC2.Paginator.DescribeNatGateways
paginator = client.get_paginator('describe_nat_gateways')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_nat_gateways().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    NatGatewayIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • nat-gateway-id - The ID of the NAT gateway.
    • state - The state of the NAT gateway (pending | failed | available | deleting | deleted ).
    • subnet-id - The ID of the subnet in which the NAT gateway resides.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC in which the NAT gateway resides.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • NatGatewayIds (list) --

    One or more NAT gateway IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NatGateways': [
        {
            'CreateTime': datetime(2015, 1, 1),
            'DeleteTime': datetime(2015, 1, 1),
            'FailureCode': 'string',
            'FailureMessage': 'string',
            'NatGatewayAddresses': [
                {
                    'AllocationId': 'string',
                    'NetworkInterfaceId': 'string',
                    'PrivateIp': 'string',
                    'PublicIp': 'string'
                },
            ],
            'NatGatewayId': 'string',
            'ProvisionedBandwidth': {
                'ProvisionTime': datetime(2015, 1, 1),
                'Provisioned': 'string',
                'RequestTime': datetime(2015, 1, 1),
                'Requested': 'string',
                'Status': 'string'
            },
            'State': 'pending'|'failed'|'available'|'deleting'|'deleted',
            'SubnetId': 'string',
            'VpcId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'ConnectivityType': 'private'|'public'
        },
    ],

}

Response Structure

  • (dict) --

    • NatGateways (list) --

      Information about the NAT gateways.

      • (dict) --

        Describes a NAT gateway.

        • CreateTime (datetime) --

          The date and time the NAT gateway was created.

        • DeleteTime (datetime) --

          The date and time the NAT gateway was deleted, if applicable.

        • FailureCode (string) --

          If the NAT gateway could not be created, specifies the error code for the failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound )

        • FailureMessage (string) --

          If the NAT gateway could not be created, specifies the error message for the failure, that corresponds to the error code.

          • For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free addresses to create this NAT gateway"
          • For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway attached"
          • For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx could not be associated with this NAT gateway"
          • For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is already associated"
          • For InternalError: "Network interface eni-xxxxxxxx, created and used internally by this NAT gateway is in an invalid state. Please try again."
          • For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does not exist or could not be found."
        • NatGatewayAddresses (list) --

          Information about the IP addresses and network interface associated with the NAT gateway.

          • (dict) --

            Describes the IP addresses and network interface associated with a NAT gateway.

            • AllocationId (string) --

              [Public NAT gateway only] The allocation ID of the Elastic IP address that's associated with the NAT gateway.

            • NetworkInterfaceId (string) --

              The ID of the network interface associated with the NAT gateway.

            • PrivateIp (string) --

              The private IP address associated with the NAT gateway.

            • PublicIp (string) --

              [Public NAT gateway only] The Elastic IP address associated with the NAT gateway.

        • NatGatewayId (string) --

          The ID of the NAT gateway.

        • ProvisionedBandwidth (dict) --

          Reserved. If you need to sustain traffic greater than the documented limits , contact us through the Support Center .

        • State (string) --

          The state of the NAT gateway.

          • pending : The NAT gateway is being created and is not ready to process traffic.
          • failed : The NAT gateway could not be created. Check the failureCode and failureMessage fields for the reason.
          • available : The NAT gateway is able to process traffic. This status remains until you delete the NAT gateway, and does not indicate the health of the NAT gateway.
          • deleting : The NAT gateway is in the process of being terminated and may still be processing traffic.
          • deleted : The NAT gateway has been terminated and is no longer processing traffic.
        • SubnetId (string) --

          The ID of the subnet in which the NAT gateway is located.

        • VpcId (string) --

          The ID of the VPC in which the NAT gateway is located.

        • Tags (list) --

          The tags for the NAT gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • ConnectivityType (string) --

          Indicates whether the NAT gateway supports public or private connectivity.

class EC2.Paginator.DescribeNetworkAcls
paginator = client.get_paginator('describe_network_acls')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_network_acls().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkAclIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • association.association-id - The ID of an association ID for the ACL.
    • association.network-acl-id - The ID of the network ACL involved in the association.
    • association.subnet-id - The ID of the subnet involved in the association.
    • default - Indicates whether the ACL is the default network ACL for the VPC.
    • entry.cidr - The IPv4 CIDR range specified in the entry.
    • entry.icmp.code - The ICMP code specified in the entry, if any.
    • entry.icmp.type - The ICMP type specified in the entry, if any.
    • entry.ipv6-cidr - The IPv6 CIDR range specified in the entry.
    • entry.port-range.from - The start of the port range specified in the entry.
    • entry.port-range.to - The end of the port range specified in the entry.
    • entry.protocol - The protocol specified in the entry (tcp | udp | icmp or a protocol number).
    • entry.rule-action - Allows or denies the matching traffic (allow | deny ).
    • entry.egress - A Boolean that indicates the type of rule. Specify true for egress rules, or false for ingress rules.
    • entry.rule-number - The number of an entry (in other words, rule) in the set of ACL entries.
    • network-acl-id - The ID of the network ACL.
    • owner-id - The ID of the Amazon Web Services account that owns the network ACL.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the network ACL.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkAclIds (list) --

    One or more network ACL IDs.

    Default: Describes all your network ACLs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NetworkAcls': [
        {
            'Associations': [
                {
                    'NetworkAclAssociationId': 'string',
                    'NetworkAclId': 'string',
                    'SubnetId': 'string'
                },
            ],
            'Entries': [
                {
                    'CidrBlock': 'string',
                    'Egress': True|False,
                    'IcmpTypeCode': {
                        'Code': 123,
                        'Type': 123
                    },
                    'Ipv6CidrBlock': 'string',
                    'PortRange': {
                        'From': 123,
                        'To': 123
                    },
                    'Protocol': 'string',
                    'RuleAction': 'allow'|'deny',
                    'RuleNumber': 123
                },
            ],
            'IsDefault': True|False,
            'NetworkAclId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'OwnerId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • NetworkAcls (list) --

      Information about one or more network ACLs.

      • (dict) --

        Describes a network ACL.

        • Associations (list) --

          Any associations between the network ACL and one or more subnets

          • (dict) --

            Describes an association between a network ACL and a subnet.

            • NetworkAclAssociationId (string) --

              The ID of the association between a network ACL and a subnet.

            • NetworkAclId (string) --

              The ID of the network ACL.

            • SubnetId (string) --

              The ID of the subnet.

        • Entries (list) --

          One or more entries (rules) in the network ACL.

          • (dict) --

            Describes an entry in a network ACL.

            • CidrBlock (string) --

              The IPv4 network range to allow or deny, in CIDR notation.

            • Egress (boolean) --

              Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

            • IcmpTypeCode (dict) --

              ICMP protocol: The ICMP type and code.

              • Code (integer) --

                The ICMP code. A value of -1 means all codes for the specified ICMP type.

              • Type (integer) --

                The ICMP type. A value of -1 means all types.

            • Ipv6CidrBlock (string) --

              The IPv6 network range to allow or deny, in CIDR notation.

            • PortRange (dict) --

              TCP or UDP protocols: The range of ports the rule applies to.

              • From (integer) --

                The first port in the range.

              • To (integer) --

                The last port in the range.

            • Protocol (string) --

              The protocol number. A value of "-1" means all protocols.

            • RuleAction (string) --

              Indicates whether to allow or deny the traffic that matches the rule.

            • RuleNumber (integer) --

              The rule number for the entry. ACL entries are processed in ascending order by rule number.

        • IsDefault (boolean) --

          Indicates whether this is the default network ACL for the VPC.

        • NetworkAclId (string) --

          The ID of the network ACL.

        • Tags (list) --

          Any tags assigned to the network ACL.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • VpcId (string) --

          The ID of the VPC for the network ACL.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the network ACL.

class EC2.Paginator.DescribeNetworkInsightsAccessScopeAnalyses
paginator = client.get_paginator('describe_network_insights_access_scope_analyses')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_network_insights_access_scope_analyses().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    NetworkInsightsAccessScopeAnalysisIds=[
        'string',
    ],
    NetworkInsightsAccessScopeId='string',
    AnalysisStartTimeBegin=datetime(2015, 1, 1),
    AnalysisStartTimeEnd=datetime(2015, 1, 1),
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • NetworkInsightsAccessScopeAnalysisIds (list) --

    The IDs of the Network Access Scope analyses.

    • (string) --
  • NetworkInsightsAccessScopeId (string) -- The ID of the Network Access Scope.
  • AnalysisStartTimeBegin (datetime) -- Filters the results based on the start time. The analysis must have started on or after this time.
  • AnalysisStartTimeEnd (datetime) -- Filters the results based on the start time. The analysis must have started on or before this time.
  • Filters (list) --

    There are no supported filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopeAnalyses': [
        {
            'NetworkInsightsAccessScopeAnalysisId': 'string',
            'NetworkInsightsAccessScopeAnalysisArn': 'string',
            'NetworkInsightsAccessScopeId': 'string',
            'Status': 'running'|'succeeded'|'failed',
            'StatusMessage': 'string',
            'WarningMessage': 'string',
            'StartDate': datetime(2015, 1, 1),
            'EndDate': datetime(2015, 1, 1),
            'FindingsFound': 'true'|'false'|'unknown',
            'AnalyzedEniCount': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopeAnalyses (list) --

      The Network Access Scope analyses.

      • (dict) --

        Describes a Network Access Scope analysis.

        • NetworkInsightsAccessScopeAnalysisId (string) --

          The ID of the Network Access Scope analysis.

        • NetworkInsightsAccessScopeAnalysisArn (string) --

          The Amazon Resource Name (ARN) of the Network Access Scope analysis.

        • NetworkInsightsAccessScopeId (string) --

          The ID of the Network Access Scope.

        • Status (string) --

          The status.

        • StatusMessage (string) --

          The status message.

        • WarningMessage (string) --

          The warning message.

        • StartDate (datetime) --

          The analysis start date.

        • EndDate (datetime) --

          The analysis end date.

        • FindingsFound (string) --

          Indicates whether there are findings.

        • AnalyzedEniCount (integer) --

          The number of network interfaces analyzed.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeNetworkInsightsAccessScopes
paginator = client.get_paginator('describe_network_insights_access_scopes')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_network_insights_access_scopes().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    NetworkInsightsAccessScopeIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • NetworkInsightsAccessScopeIds (list) --

    The IDs of the Network Access Scopes.

    • (string) --
  • Filters (list) --

    There are no supported filters.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAccessScopes': [
        {
            'NetworkInsightsAccessScopeId': 'string',
            'NetworkInsightsAccessScopeArn': 'string',
            'CreatedDate': datetime(2015, 1, 1),
            'UpdatedDate': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • NetworkInsightsAccessScopes (list) --

      The Network Access Scopes.

      • (dict) --

        Describes a Network Access Scope.

        • NetworkInsightsAccessScopeId (string) --

          The ID of the Network Access Scope.

        • NetworkInsightsAccessScopeArn (string) --

          The Amazon Resource Name (ARN) of the Network Access Scope.

        • CreatedDate (datetime) --

          The creation date.

        • UpdatedDate (datetime) --

          The last updated date.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeNetworkInsightsAnalyses
paginator = client.get_paginator('describe_network_insights_analyses')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_network_insights_analyses().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    NetworkInsightsAnalysisIds=[
        'string',
    ],
    NetworkInsightsPathId='string',
    AnalysisStartTime=datetime(2015, 1, 1),
    AnalysisEndTime=datetime(2015, 1, 1),
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • NetworkInsightsAnalysisIds (list) --

    The ID of the network insights analyses. You must specify either analysis IDs or a path ID.

    • (string) --
  • NetworkInsightsPathId (string) -- The ID of the path. You must specify either a path ID or analysis IDs.
  • AnalysisStartTime (datetime) -- The time when the network insights analyses started.
  • AnalysisEndTime (datetime) -- The time when the network insights analyses ended.
  • Filters (list) --

    The filters. The following are the possible values:

    • PathFound - A Boolean value that indicates whether a feasible path is found.
    • Status - The status of the analysis (running | succeeded | failed).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsAnalyses': [
        {
            'NetworkInsightsAnalysisId': 'string',
            'NetworkInsightsAnalysisArn': 'string',
            'NetworkInsightsPathId': 'string',
            'FilterInArns': [
                'string',
            ],
            'StartDate': datetime(2015, 1, 1),
            'Status': 'running'|'succeeded'|'failed',
            'StatusMessage': 'string',
            'WarningMessage': 'string',
            'NetworkPathFound': True|False,
            'ForwardPathComponents': [
                {
                    'SequenceNumber': 123,
                    'AclRule': {
                        'Cidr': 'string',
                        'Egress': True|False,
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'string',
                        'RuleNumber': 123
                    },
                    'AttachedTo': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Component': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'DestinationVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'OutboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'InboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'RouteTableRoute': {
                        'DestinationCidr': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'string',
                        'TransitGatewayId': 'string',
                        'VpcPeeringConnectionId': 'string'
                    },
                    'SecurityGroupRule': {
                        'Cidr': 'string',
                        'Direction': 'string',
                        'SecurityGroupId': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'PrefixListId': 'string',
                        'Protocol': 'string'
                    },
                    'SourceVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Subnet': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Vpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AdditionalDetails': [
                        {
                            'AdditionalDetailType': 'string',
                            'Component': {
                                'Id': 'string',
                                'Arn': 'string',
                                'Name': 'string'
                            }
                        },
                    ],
                    'TransitGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTableRoute': {
                        'DestinationCidr': 'string',
                        'State': 'string',
                        'RouteOrigin': 'string',
                        'PrefixListId': 'string',
                        'AttachmentId': 'string',
                        'ResourceId': 'string',
                        'ResourceType': 'string'
                    }
                },
            ],
            'ReturnPathComponents': [
                {
                    'SequenceNumber': 123,
                    'AclRule': {
                        'Cidr': 'string',
                        'Egress': True|False,
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'string',
                        'RuleNumber': 123
                    },
                    'AttachedTo': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Component': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'DestinationVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'OutboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'InboundHeader': {
                        'DestinationAddresses': [
                            'string',
                        ],
                        'DestinationPortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ],
                        'Protocol': 'string',
                        'SourceAddresses': [
                            'string',
                        ],
                        'SourcePortRanges': [
                            {
                                'From': 123,
                                'To': 123
                            },
                        ]
                    },
                    'RouteTableRoute': {
                        'DestinationCidr': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'string',
                        'TransitGatewayId': 'string',
                        'VpcPeeringConnectionId': 'string'
                    },
                    'SecurityGroupRule': {
                        'Cidr': 'string',
                        'Direction': 'string',
                        'SecurityGroupId': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'PrefixListId': 'string',
                        'Protocol': 'string'
                    },
                    'SourceVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Subnet': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Vpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AdditionalDetails': [
                        {
                            'AdditionalDetailType': 'string',
                            'Component': {
                                'Id': 'string',
                                'Arn': 'string',
                                'Name': 'string'
                            }
                        },
                    ],
                    'TransitGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTableRoute': {
                        'DestinationCidr': 'string',
                        'State': 'string',
                        'RouteOrigin': 'string',
                        'PrefixListId': 'string',
                        'AttachmentId': 'string',
                        'ResourceId': 'string',
                        'ResourceType': 'string'
                    }
                },
            ],
            'Explanations': [
                {
                    'Acl': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AclRule': {
                        'Cidr': 'string',
                        'Egress': True|False,
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'Protocol': 'string',
                        'RuleAction': 'string',
                        'RuleNumber': 123
                    },
                    'Address': 'string',
                    'Addresses': [
                        'string',
                    ],
                    'AttachedTo': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'AvailabilityZones': [
                        'string',
                    ],
                    'Cidrs': [
                        'string',
                    ],
                    'Component': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'CustomerGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Destination': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'DestinationVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Direction': 'string',
                    'ExplanationCode': 'string',
                    'IngressRouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'InternetGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'LoadBalancerArn': 'string',
                    'ClassicLoadBalancerListener': {
                        'LoadBalancerPort': 123,
                        'InstancePort': 123
                    },
                    'LoadBalancerListenerPort': 123,
                    'LoadBalancerTarget': {
                        'Address': 'string',
                        'AvailabilityZone': 'string',
                        'Instance': {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        },
                        'Port': 123
                    },
                    'LoadBalancerTargetGroup': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'LoadBalancerTargetGroups': [
                        {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        },
                    ],
                    'LoadBalancerTargetPort': 123,
                    'ElasticLoadBalancerListener': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'MissingComponent': 'string',
                    'NatGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'NetworkInterface': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'PacketField': 'string',
                    'VpcPeeringConnection': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Port': 123,
                    'PortRanges': [
                        {
                            'From': 123,
                            'To': 123
                        },
                    ],
                    'PrefixList': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Protocols': [
                        'string',
                    ],
                    'RouteTableRoute': {
                        'DestinationCidr': 'string',
                        'DestinationPrefixListId': 'string',
                        'EgressOnlyInternetGatewayId': 'string',
                        'GatewayId': 'string',
                        'InstanceId': 'string',
                        'NatGatewayId': 'string',
                        'NetworkInterfaceId': 'string',
                        'Origin': 'string',
                        'TransitGatewayId': 'string',
                        'VpcPeeringConnectionId': 'string'
                    },
                    'RouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'SecurityGroup': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'SecurityGroupRule': {
                        'Cidr': 'string',
                        'Direction': 'string',
                        'SecurityGroupId': 'string',
                        'PortRange': {
                            'From': 123,
                            'To': 123
                        },
                        'PrefixListId': 'string',
                        'Protocol': 'string'
                    },
                    'SecurityGroups': [
                        {
                            'Id': 'string',
                            'Arn': 'string',
                            'Name': 'string'
                        },
                    ],
                    'SourceVpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'State': 'string',
                    'Subnet': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'SubnetRouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'Vpc': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'VpcEndpoint': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'VpnConnection': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'VpnGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGateway': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTable': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    },
                    'TransitGatewayRouteTableRoute': {
                        'DestinationCidr': 'string',
                        'State': 'string',
                        'RouteOrigin': 'string',
                        'PrefixListId': 'string',
                        'AttachmentId': 'string',
                        'ResourceId': 'string',
                        'ResourceType': 'string'
                    },
                    'TransitGatewayAttachment': {
                        'Id': 'string',
                        'Arn': 'string',
                        'Name': 'string'
                    }
                },
            ],
            'AlternatePathHints': [
                {
                    'ComponentId': 'string',
                    'ComponentArn': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • NetworkInsightsAnalyses (list) --

      Information about the network insights analyses.

      • (dict) --

        Describes a network insights analysis.

        • NetworkInsightsAnalysisId (string) --

          The ID of the network insights analysis.

        • NetworkInsightsAnalysisArn (string) --

          The Amazon Resource Name (ARN) of the network insights analysis.

        • NetworkInsightsPathId (string) --

          The ID of the path.

        • FilterInArns (list) --

          The Amazon Resource Names (ARN) of the Amazon Web Services resources that the path must traverse.

          • (string) --
        • StartDate (datetime) --

          The time the analysis started.

        • Status (string) --

          The status of the network insights analysis.

        • StatusMessage (string) --

          The status message, if the status is failed .

        • WarningMessage (string) --

          The warning message.

        • NetworkPathFound (boolean) --

          Indicates whether the destination is reachable from the source.

        • ForwardPathComponents (list) --

          The components in the path from source to destination.

          • (dict) --

            Describes a path component.

            • SequenceNumber (integer) --

              The sequence number.

            • AclRule (dict) --

              The network ACL rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Egress (boolean) --

                Indicates whether the rule is an outbound rule.

              • PortRange (dict) --

                The range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • Protocol (string) --

                The protocol.

              • RuleAction (string) --

                Indicates whether to allow or deny traffic that matches the rule.

              • RuleNumber (integer) --

                The rule number.

            • AttachedTo (dict) --

              The resource to which the path component is attached.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Component (dict) --

              The component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • DestinationVpc (dict) --

              The destination VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • OutboundHeader (dict) --

              The outbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • InboundHeader (dict) --

              The inbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • RouteTableRoute (dict) --

              The route table route.

              • DestinationCidr (string) --

                The destination IPv4 address, in CIDR notation.

              • DestinationPrefixListId (string) --

                The prefix of the Amazon Web Service.

              • EgressOnlyInternetGatewayId (string) --

                The ID of an egress-only internet gateway.

              • GatewayId (string) --

                The ID of the gateway, such as an internet gateway or virtual private gateway.

              • InstanceId (string) --

                The ID of the instance, such as a NAT instance.

              • NatGatewayId (string) --

                The ID of a NAT gateway.

              • NetworkInterfaceId (string) --

                The ID of a network interface.

              • Origin (string) --

                Describes how the route was created. The following are the possible values:

                • CreateRouteTable - The route was automatically created when the route table was created.
                • CreateRoute - The route was manually added to the route table.
                • EnableVgwRoutePropagation - The route was propagated by route propagation.
              • TransitGatewayId (string) --

                The ID of a transit gateway.

              • VpcPeeringConnectionId (string) --

                The ID of a VPC peering connection.

            • SecurityGroupRule (dict) --

              The security group rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Direction (string) --

                The direction. The following are the possible values:

                • egress
                • ingress
              • SecurityGroupId (string) --

                The security group ID.

              • PortRange (dict) --

                The port range.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • PrefixListId (string) --

                The prefix list ID.

              • Protocol (string) --

                The protocol name.

            • SourceVpc (dict) --

              The source VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Subnet (dict) --

              The subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Vpc (dict) --

              The component VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AdditionalDetails (list) --

              The additional details.

              • (dict) --

                Describes an additional detail for a path analysis.

                • AdditionalDetailType (string) --

                  The information type.

                • Component (dict) --

                  The path component.

                  • Id (string) --

                    The ID of the component.

                  • Arn (string) --

                    The Amazon Resource Name (ARN) of the component.

                  • Name (string) --

                    The name of the analysis component.

            • TransitGateway (dict) --

              The transit gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTableRoute (dict) --

              The route in a transit gateway route table.

              • DestinationCidr (string) --

                The CIDR block used for destination matches.

              • State (string) --

                The state of the route.

              • RouteOrigin (string) --

                The route origin. The following are the possible values:

                • static
                • propagated
              • PrefixListId (string) --

                The ID of the prefix list.

              • AttachmentId (string) --

                The ID of the route attachment.

              • ResourceId (string) --

                The ID of the resource for the route attachment.

              • ResourceType (string) --

                The resource type for the route attachment.

        • ReturnPathComponents (list) --

          The components in the path from destination to source.

          • (dict) --

            Describes a path component.

            • SequenceNumber (integer) --

              The sequence number.

            • AclRule (dict) --

              The network ACL rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Egress (boolean) --

                Indicates whether the rule is an outbound rule.

              • PortRange (dict) --

                The range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • Protocol (string) --

                The protocol.

              • RuleAction (string) --

                Indicates whether to allow or deny traffic that matches the rule.

              • RuleNumber (integer) --

                The rule number.

            • AttachedTo (dict) --

              The resource to which the path component is attached.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Component (dict) --

              The component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • DestinationVpc (dict) --

              The destination VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • OutboundHeader (dict) --

              The outbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • InboundHeader (dict) --

              The inbound header.

              • DestinationAddresses (list) --

                The destination addresses.

                • (string) --
              • DestinationPortRanges (list) --

                The destination port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

              • Protocol (string) --

                The protocol.

              • SourceAddresses (list) --

                The source addresses.

                • (string) --
              • SourcePortRanges (list) --

                The source port ranges.

                • (dict) --

                  Describes a range of ports.

                  • From (integer) --

                    The first port in the range.

                  • To (integer) --

                    The last port in the range.

            • RouteTableRoute (dict) --

              The route table route.

              • DestinationCidr (string) --

                The destination IPv4 address, in CIDR notation.

              • DestinationPrefixListId (string) --

                The prefix of the Amazon Web Service.

              • EgressOnlyInternetGatewayId (string) --

                The ID of an egress-only internet gateway.

              • GatewayId (string) --

                The ID of the gateway, such as an internet gateway or virtual private gateway.

              • InstanceId (string) --

                The ID of the instance, such as a NAT instance.

              • NatGatewayId (string) --

                The ID of a NAT gateway.

              • NetworkInterfaceId (string) --

                The ID of a network interface.

              • Origin (string) --

                Describes how the route was created. The following are the possible values:

                • CreateRouteTable - The route was automatically created when the route table was created.
                • CreateRoute - The route was manually added to the route table.
                • EnableVgwRoutePropagation - The route was propagated by route propagation.
              • TransitGatewayId (string) --

                The ID of a transit gateway.

              • VpcPeeringConnectionId (string) --

                The ID of a VPC peering connection.

            • SecurityGroupRule (dict) --

              The security group rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Direction (string) --

                The direction. The following are the possible values:

                • egress
                • ingress
              • SecurityGroupId (string) --

                The security group ID.

              • PortRange (dict) --

                The port range.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • PrefixListId (string) --

                The prefix list ID.

              • Protocol (string) --

                The protocol name.

            • SourceVpc (dict) --

              The source VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Subnet (dict) --

              The subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Vpc (dict) --

              The component VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AdditionalDetails (list) --

              The additional details.

              • (dict) --

                Describes an additional detail for a path analysis.

                • AdditionalDetailType (string) --

                  The information type.

                • Component (dict) --

                  The path component.

                  • Id (string) --

                    The ID of the component.

                  • Arn (string) --

                    The Amazon Resource Name (ARN) of the component.

                  • Name (string) --

                    The name of the analysis component.

            • TransitGateway (dict) --

              The transit gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTableRoute (dict) --

              The route in a transit gateway route table.

              • DestinationCidr (string) --

                The CIDR block used for destination matches.

              • State (string) --

                The state of the route.

              • RouteOrigin (string) --

                The route origin. The following are the possible values:

                • static
                • propagated
              • PrefixListId (string) --

                The ID of the prefix list.

              • AttachmentId (string) --

                The ID of the route attachment.

              • ResourceId (string) --

                The ID of the resource for the route attachment.

              • ResourceType (string) --

                The resource type for the route attachment.

        • Explanations (list) --

          The explanations. For more information, see Reachability Analyzer explanation codes .

          • (dict) --

            Describes an explanation code for an unreachable path. For more information, see Reachability Analyzer explanation codes .

            • Acl (dict) --

              The network ACL.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AclRule (dict) --

              The network ACL rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Egress (boolean) --

                Indicates whether the rule is an outbound rule.

              • PortRange (dict) --

                The range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • Protocol (string) --

                The protocol.

              • RuleAction (string) --

                Indicates whether to allow or deny traffic that matches the rule.

              • RuleNumber (integer) --

                The rule number.

            • Address (string) --

              The IPv4 address, in CIDR notation.

            • Addresses (list) --

              The IPv4 addresses, in CIDR notation.

              • (string) --
            • AttachedTo (dict) --

              The resource to which the component is attached.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • AvailabilityZones (list) --

              The Availability Zones.

              • (string) --
            • Cidrs (list) --

              The CIDR ranges.

              • (string) --
            • Component (dict) --

              The component.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • CustomerGateway (dict) --

              The customer gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Destination (dict) --

              The destination.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • DestinationVpc (dict) --

              The destination VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Direction (string) --

              The direction. The following are the possible values:

              • egress
              • ingress
            • ExplanationCode (string) --

              The explanation code.

            • IngressRouteTable (dict) --

              The route table.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • InternetGateway (dict) --

              The internet gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • LoadBalancerArn (string) --

              The Amazon Resource Name (ARN) of the load balancer.

            • ClassicLoadBalancerListener (dict) --

              The listener for a Classic Load Balancer.

              • LoadBalancerPort (integer) --

                The port on which the load balancer is listening.

              • InstancePort (integer) --

                [Classic Load Balancers] The back-end port for the listener.

            • LoadBalancerListenerPort (integer) --

              The listener port of the load balancer.

            • LoadBalancerTarget (dict) --

              The target.

              • Address (string) --

                The IP address.

              • AvailabilityZone (string) --

                The Availability Zone.

              • Instance (dict) --

                Information about the instance.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

              • Port (integer) --

                The port on which the target is listening.

            • LoadBalancerTargetGroup (dict) --

              The target group.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • LoadBalancerTargetGroups (list) --

              The target groups.

              • (dict) --

                Describes a path component.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

            • LoadBalancerTargetPort (integer) --

              The target port.

            • ElasticLoadBalancerListener (dict) --

              The load balancer listener.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • MissingComponent (string) --

              The missing component.

            • NatGateway (dict) --

              The NAT gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • NetworkInterface (dict) --

              The network interface.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • PacketField (string) --

              The packet field.

            • VpcPeeringConnection (dict) --

              The VPC peering connection.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Port (integer) --

              The port.

            • PortRanges (list) --

              The port ranges.

              • (dict) --

                Describes a range of ports.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

            • PrefixList (dict) --

              The prefix list.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Protocols (list) --

              The protocols.

              • (string) --
            • RouteTableRoute (dict) --

              The route table route.

              • DestinationCidr (string) --

                The destination IPv4 address, in CIDR notation.

              • DestinationPrefixListId (string) --

                The prefix of the Amazon Web Service.

              • EgressOnlyInternetGatewayId (string) --

                The ID of an egress-only internet gateway.

              • GatewayId (string) --

                The ID of the gateway, such as an internet gateway or virtual private gateway.

              • InstanceId (string) --

                The ID of the instance, such as a NAT instance.

              • NatGatewayId (string) --

                The ID of a NAT gateway.

              • NetworkInterfaceId (string) --

                The ID of a network interface.

              • Origin (string) --

                Describes how the route was created. The following are the possible values:

                • CreateRouteTable - The route was automatically created when the route table was created.
                • CreateRoute - The route was manually added to the route table.
                • EnableVgwRoutePropagation - The route was propagated by route propagation.
              • TransitGatewayId (string) --

                The ID of a transit gateway.

              • VpcPeeringConnectionId (string) --

                The ID of a VPC peering connection.

            • RouteTable (dict) --

              The route table.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • SecurityGroup (dict) --

              The security group.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • SecurityGroupRule (dict) --

              The security group rule.

              • Cidr (string) --

                The IPv4 address range, in CIDR notation.

              • Direction (string) --

                The direction. The following are the possible values:

                • egress
                • ingress
              • SecurityGroupId (string) --

                The security group ID.

              • PortRange (dict) --

                The port range.

                • From (integer) --

                  The first port in the range.

                • To (integer) --

                  The last port in the range.

              • PrefixListId (string) --

                The prefix list ID.

              • Protocol (string) --

                The protocol name.

            • SecurityGroups (list) --

              The security groups.

              • (dict) --

                Describes a path component.

                • Id (string) --

                  The ID of the component.

                • Arn (string) --

                  The Amazon Resource Name (ARN) of the component.

                • Name (string) --

                  The name of the analysis component.

            • SourceVpc (dict) --

              The source VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • State (string) --

              The state.

            • Subnet (dict) --

              The subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • SubnetRouteTable (dict) --

              The route table for the subnet.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • Vpc (dict) --

              The component VPC.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • VpcEndpoint (dict) --

              The VPC endpoint.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • VpnConnection (dict) --

              The VPN connection.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • VpnGateway (dict) --

              The VPN gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGateway (dict) --

              The transit gateway.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTable (dict) --

              The transit gateway route table.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

            • TransitGatewayRouteTableRoute (dict) --

              The transit gateway route table route.

              • DestinationCidr (string) --

                The CIDR block used for destination matches.

              • State (string) --

                The state of the route.

              • RouteOrigin (string) --

                The route origin. The following are the possible values:

                • static
                • propagated
              • PrefixListId (string) --

                The ID of the prefix list.

              • AttachmentId (string) --

                The ID of the route attachment.

              • ResourceId (string) --

                The ID of the resource for the route attachment.

              • ResourceType (string) --

                The resource type for the route attachment.

            • TransitGatewayAttachment (dict) --

              The transit gateway attachment.

              • Id (string) --

                The ID of the component.

              • Arn (string) --

                The Amazon Resource Name (ARN) of the component.

              • Name (string) --

                The name of the analysis component.

        • AlternatePathHints (list) --

          Potential intermediate components.

          • (dict) --

            Describes an potential intermediate component of a feasible path.

            • ComponentId (string) --

              The ID of the component.

            • ComponentArn (string) --

              The Amazon Resource Name (ARN) of the component.

        • Tags (list) --

          The tags.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeNetworkInsightsPaths
paginator = client.get_paginator('describe_network_insights_paths')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_network_insights_paths().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    NetworkInsightsPathIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • NetworkInsightsPathIds (list) --

    The IDs of the paths.

    • (string) --
  • Filters (list) --

    The filters. The following are the possible values:

    • Destination - The ID of the resource.
    • DestinationPort - The destination port.
    • Name - The path name.
    • Protocol - The protocol.
    • Source - The ID of the resource.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NetworkInsightsPaths': [
        {
            'NetworkInsightsPathId': 'string',
            'NetworkInsightsPathArn': 'string',
            'CreatedDate': datetime(2015, 1, 1),
            'Source': 'string',
            'Destination': 'string',
            'SourceIp': 'string',
            'DestinationIp': 'string',
            'Protocol': 'tcp'|'udp',
            'DestinationPort': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • NetworkInsightsPaths (list) --

      Information about the paths.

      • (dict) --

        Describes a path.

        • NetworkInsightsPathId (string) --

          The ID of the path.

        • NetworkInsightsPathArn (string) --

          The Amazon Resource Name (ARN) of the path.

        • CreatedDate (datetime) --

          The time stamp when the path was created.

        • Source (string) --

          The Amazon Web Services resource that is the source of the path.

        • Destination (string) --

          The Amazon Web Services resource that is the destination of the path.

        • SourceIp (string) --

          The IP address of the Amazon Web Services resource that is the source of the path.

        • DestinationIp (string) --

          The IP address of the Amazon Web Services resource that is the destination of the path.

        • Protocol (string) --

          The protocol.

        • DestinationPort (integer) --

          The destination port.

        • Tags (list) --

          The tags associated with the path.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeNetworkInterfacePermissions
paginator = client.get_paginator('describe_network_interface_permissions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_network_interface_permissions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    NetworkInterfacePermissionIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • NetworkInterfacePermissionIds (list) --

    One or more network interface permission IDs.

    • (string) --
  • Filters (list) --

    One or more filters.

    • network-interface-permission.network-interface-permission-id - The ID of the permission.
    • network-interface-permission.network-interface-id - The ID of the network interface.
    • network-interface-permission.aws-account-id - The Amazon Web Services account ID.
    • network-interface-permission.aws-service - The Amazon Web Service.
    • network-interface-permission.permission - The type of permission (INSTANCE-ATTACH | EIP-ASSOCIATE ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NetworkInterfacePermissions': [
        {
            'NetworkInterfacePermissionId': 'string',
            'NetworkInterfaceId': 'string',
            'AwsAccountId': 'string',
            'AwsService': 'string',
            'Permission': 'INSTANCE-ATTACH'|'EIP-ASSOCIATE',
            'PermissionState': {
                'State': 'pending'|'granted'|'revoking'|'revoked',
                'StatusMessage': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) --

    Contains the output for DescribeNetworkInterfacePermissions.

    • NetworkInterfacePermissions (list) --

      The network interface permissions.

      • (dict) --

        Describes a permission for a network interface.

        • NetworkInterfacePermissionId (string) --

          The ID of the network interface permission.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • AwsAccountId (string) --

          The Amazon Web Services account ID.

        • AwsService (string) --

          The Amazon Web Service.

        • Permission (string) --

          The type of permission.

        • PermissionState (dict) --

          Information about the state of the permission.

          • State (string) --

            The state of the permission.

          • StatusMessage (string) --

            A status message, if applicable.

class EC2.Paginator.DescribeNetworkInterfaces
paginator = client.get_paginator('describe_network_interfaces')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_network_interfaces().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkInterfaceIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • addresses.private-ip-address - The private IPv4 addresses associated with the network interface.
    • addresses.primary - Whether the private IPv4 address is the primary IP address associated with the network interface.
    • addresses.association.public-ip - The association ID returned when the network interface was associated with the Elastic IP address (IPv4).
    • addresses.association.owner-id - The owner ID of the addresses associated with the network interface.
    • association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • association.public-dns-name - The public DNS name for the network interface (IPv4).
    • attachment.attachment-id - The ID of the interface attachment.
    • attachment.attach-time - The time that the network interface was attached to an instance.
    • attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.
    • attachment.device-index - The device index to which the network interface is attached.
    • attachment.instance-id - The ID of the instance to which the network interface is attached.
    • attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.
    • attachment.status - The status of the attachment (attaching | attached | detaching | detached ).
    • availability-zone - The Availability Zone of the network interface.
    • description - The description of the network interface.
    • group-id - The ID of a security group associated with the network interface.
    • group-name - The name of a security group associated with the network interface.
    • ipv6-addresses.ipv6-address - An IPv6 address associated with the network interface.
    • interface-type - The type of network interface (api_gateway_managed | aws_codestar_connections_managed | branch | efa | gateway_load_balancer | gateway_load_balancer_endpoint | global_accelerator_managed | interface | iot_rules_managed | lambda | load_balancer | nat_gateway | network_load_balancer | quicksight | transit_gateway | trunk | vpc_endpoint ).
    • mac-address - The MAC address of the network interface.
    • network-interface-id - The ID of the network interface.
    • owner-id - The Amazon Web Services account ID of the network interface owner.
    • private-ip-address - The private IPv4 address or addresses of the network interface.
    • private-dns-name - The private DNS name of the network interface (IPv4).
    • requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.
    • requester-managed - Indicates whether the network interface is being managed by an Amazon Web Service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).
    • source-dest-check - Indicates 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.
    • status - The status of the network interface. If the network interface is not attached to an instance, the status is available ; if a network interface is attached to an instance the status is in-use .
    • subnet-id - The ID of the subnet for the network interface.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the network interface.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceIds (list) --

    One or more network interface IDs.

    Default: Describes all your network interfaces.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'NetworkInterfaces': [
        {
            'Association': {
                'AllocationId': 'string',
                'AssociationId': 'string',
                'IpOwnerId': 'string',
                'PublicDnsName': 'string',
                'PublicIp': 'string',
                'CustomerOwnedIp': 'string',
                'CarrierIp': 'string'
            },
            'Attachment': {
                'AttachTime': datetime(2015, 1, 1),
                'AttachmentId': 'string',
                'DeleteOnTermination': True|False,
                'DeviceIndex': 123,
                'NetworkCardIndex': 123,
                'InstanceId': 'string',
                'InstanceOwnerId': 'string',
                'Status': 'attaching'|'attached'|'detaching'|'detached'
            },
            'AvailabilityZone': 'string',
            'Description': 'string',
            'Groups': [
                {
                    'GroupName': 'string',
                    'GroupId': 'string'
                },
            ],
            'InterfaceType': 'interface'|'natGateway'|'efa'|'trunk'|'load_balancer'|'network_load_balancer'|'vpc_endpoint'|'branch'|'transit_gateway'|'lambda'|'quicksight'|'global_accelerator_managed'|'api_gateway_managed'|'gateway_load_balancer'|'gateway_load_balancer_endpoint'|'iot_rules_managed'|'aws_codestar_connections_managed',
            'Ipv6Addresses': [
                {
                    'Ipv6Address': 'string'
                },
            ],
            'MacAddress': 'string',
            'NetworkInterfaceId': 'string',
            'OutpostArn': 'string',
            'OwnerId': 'string',
            'PrivateDnsName': 'string',
            'PrivateIpAddress': 'string',
            'PrivateIpAddresses': [
                {
                    'Association': {
                        'AllocationId': 'string',
                        'AssociationId': 'string',
                        'IpOwnerId': 'string',
                        'PublicDnsName': 'string',
                        'PublicIp': 'string',
                        'CustomerOwnedIp': 'string',
                        'CarrierIp': 'string'
                    },
                    'Primary': True|False,
                    'PrivateDnsName': 'string',
                    'PrivateIpAddress': 'string'
                },
            ],
            'Ipv4Prefixes': [
                {
                    'Ipv4Prefix': 'string'
                },
            ],
            'Ipv6Prefixes': [
                {
                    'Ipv6Prefix': 'string'
                },
            ],
            'RequesterId': 'string',
            'RequesterManaged': True|False,
            'SourceDestCheck': True|False,
            'Status': 'available'|'associated'|'attaching'|'in-use'|'detaching',
            'SubnetId': 'string',
            'TagSet': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'DenyAllIgwTraffic': True|False,
            'Ipv6Native': True|False,
            'Ipv6Address': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    Contains the output of DescribeNetworkInterfaces.

    • NetworkInterfaces (list) --

      Information about one or more network interfaces.

      • (dict) --

        Describes a network interface.

        • Association (dict) --

          The association information for an Elastic IP address (IPv4) associated with the network interface.

          • AllocationId (string) --

            The allocation ID.

          • AssociationId (string) --

            The association ID.

          • IpOwnerId (string) --

            The ID of the Elastic IP address owner.

          • PublicDnsName (string) --

            The public DNS name.

          • PublicIp (string) --

            The address of the Elastic IP address bound to the network interface.

          • CustomerOwnedIp (string) --

            The customer-owned IP address associated with the network interface.

          • CarrierIp (string) --

            The carrier IP address associated with the network interface.

            This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

        • Attachment (dict) --

          The network interface attachment.

          • AttachTime (datetime) --

            The timestamp indicating when the attachment initiated.

          • AttachmentId (string) --

            The ID of the network interface attachment.

          • DeleteOnTermination (boolean) --

            Indicates whether the network interface is deleted when the instance is terminated.

          • DeviceIndex (integer) --

            The device index of the network interface attachment on the instance.

          • NetworkCardIndex (integer) --

            The index of the network card.

          • InstanceId (string) --

            The ID of the instance.

          • InstanceOwnerId (string) --

            The Amazon Web Services account ID of the owner of the instance.

          • Status (string) --

            The attachment state.

        • AvailabilityZone (string) --

          The Availability Zone.

        • Description (string) --

          A description.

        • Groups (list) --

          Any security groups for the network interface.

          • (dict) --

            Describes a security group.

            • GroupName (string) --

              The name of the security group.

            • GroupId (string) --

              The ID of the security group.

        • InterfaceType (string) --

          The type of network interface.

        • Ipv6Addresses (list) --

          The IPv6 addresses associated with the network interface.

          • (dict) --

            Describes an IPv6 address associated with a network interface.

            • Ipv6Address (string) --

              The IPv6 address.

        • MacAddress (string) --

          The MAC address.

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the network interface.

        • PrivateDnsName (string) --

          The private DNS name.

        • PrivateIpAddress (string) --

          The IPv4 address of the network interface within the subnet.

        • PrivateIpAddresses (list) --

          The private IPv4 addresses associated with the network interface.

          • (dict) --

            Describes the private IPv4 address of a network interface.

            • Association (dict) --

              The association information for an Elastic IP address (IPv4) associated with the network interface.

              • AllocationId (string) --

                The allocation ID.

              • AssociationId (string) --

                The association ID.

              • IpOwnerId (string) --

                The ID of the Elastic IP address owner.

              • PublicDnsName (string) --

                The public DNS name.

              • PublicIp (string) --

                The address of the Elastic IP address bound to the network interface.

              • CustomerOwnedIp (string) --

                The customer-owned IP address associated with the network interface.

              • CarrierIp (string) --

                The carrier IP address associated with the network interface.

                This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

            • Primary (boolean) --

              Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

            • PrivateDnsName (string) --

              The private DNS name.

            • PrivateIpAddress (string) --

              The private IPv4 address.

        • Ipv4Prefixes (list) --

          The IPv4 prefixes that are assigned to the network interface.

        • Ipv6Prefixes (list) --

          The IPv6 prefixes that are assigned to the network interface.

          • (dict) --

            Describes the IPv6 prefix.

            • Ipv6Prefix (string) --

              The IPv6 prefix.

        • RequesterId (string) --

          The alias or Amazon Web Services account ID of the principal or service that created the network interface.

        • RequesterManaged (boolean) --

          Indicates whether the network interface is being managed by Amazon Web Services.

        • SourceDestCheck (boolean) --

          Indicates whether source/destination checking is enabled.

        • Status (string) --

          The status of the network interface.

        • SubnetId (string) --

          The ID of the subnet.

        • TagSet (list) --

          Any tags assigned to the network interface.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • VpcId (string) --

          The ID of the VPC.

        • DenyAllIgwTraffic (boolean) --

          Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true , inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.

        • Ipv6Native (boolean) --

          Indicates whether this is an IPv6 only network interface.

        • Ipv6Address (string) --

          The IPv6 globally unique address associated with the network interface.

class EC2.Paginator.DescribePrefixLists
paginator = client.get_paginator('describe_prefix_lists')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_prefix_lists().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PrefixListIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • prefix-list-id : The ID of a prefix list.
    • prefix-list-name : The name of a prefix list.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PrefixListIds (list) --

    One or more prefix list IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'PrefixLists': [
        {
            'Cidrs': [
                'string',
            ],
            'PrefixListId': 'string',
            'PrefixListName': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • PrefixLists (list) --

      All available prefix lists.

      • (dict) --

        Describes prefixes for Amazon Web Services services.

        • Cidrs (list) --

          The IP address range of the Amazon Web Service.

          • (string) --
        • PrefixListId (string) --

          The ID of the prefix.

        • PrefixListName (string) --

          The name of the prefix.

class EC2.Paginator.DescribePrincipalIdFormat
paginator = client.get_paginator('describe_principal_id_format')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_principal_id_format().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Resources=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Resources (list) --

    The type of resource: bundle | conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | image | import-task | instance | internet-gateway | network-acl | network-acl-association | network-interface | network-interface-attachment | prefix-list | reservation | route-table | route-table-association | security-group | snapshot | subnet | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Principals': [
        {
            'Arn': 'string',
            'Statuses': [
                {
                    'Deadline': datetime(2015, 1, 1),
                    'Resource': 'string',
                    'UseLongIds': True|False
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • Principals (list) --

      Information about the ID format settings for the ARN.

      • (dict) --

        PrincipalIdFormat description

        • Arn (string) --

          PrincipalIdFormatARN description

        • Statuses (list) --

          PrincipalIdFormatStatuses description

          • (dict) --

            Describes the ID format for a resource.

            • Deadline (datetime) --

              The date in UTC at which you are permanently switched over to using longer IDs. If a deadline is not yet available for this resource type, this field is not returned.

            • Resource (string) --

              The type of resource.

            • UseLongIds (boolean) --

              Indicates whether longer IDs (17-character IDs) are enabled for the resource.

class EC2.Paginator.DescribePublicIpv4Pools
paginator = client.get_paginator('describe_public_ipv4_pools')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_public_ipv4_pools().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PoolIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • PoolIds (list) --

    The IDs of the address pools.

    • (string) --
  • Filters (list) --

    One or more filters.

    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'PublicIpv4Pools': [
        {
            'PoolId': 'string',
            'Description': 'string',
            'PoolAddressRanges': [
                {
                    'FirstAddress': 'string',
                    'LastAddress': 'string',
                    'AddressCount': 123,
                    'AvailableAddressCount': 123
                },
            ],
            'TotalAddressCount': 123,
            'TotalAvailableAddressCount': 123,
            'NetworkBorderGroup': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • PublicIpv4Pools (list) --

      Information about the address pools.

      • (dict) --

        Describes an IPv4 address pool.

        • PoolId (string) --

          The ID of the address pool.

        • Description (string) --

          A description of the address pool.

        • PoolAddressRanges (list) --

          The address ranges.

          • (dict) --

            Describes an address range of an IPv4 address pool.

            • FirstAddress (string) --

              The first IP address in the range.

            • LastAddress (string) --

              The last IP address in the range.

            • AddressCount (integer) --

              The number of addresses in the range.

            • AvailableAddressCount (integer) --

              The number of available addresses in the range.

        • TotalAddressCount (integer) --

          The total number of addresses.

        • TotalAvailableAddressCount (integer) --

          The total number of available addresses.

        • NetworkBorderGroup (string) --

          The name of the location from which the address pool is advertised. A network border group is a unique set of Availability Zones or Local Zones from where Amazon Web Services advertises public IP addresses.

        • Tags (list) --

          Any tags for the address pool.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeReplaceRootVolumeTasks
paginator = client.get_paginator('describe_replace_root_volume_tasks')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_replace_root_volume_tasks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ReplaceRootVolumeTaskIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ReplaceRootVolumeTaskIds (list) --

    The ID of the root volume replacement task to view.

    • (string) --
  • Filters (list) --

    Filter to use:

    • instance-id - The ID of the instance for which the root volume replacement task was created.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ReplaceRootVolumeTasks': [
        {
            'ReplaceRootVolumeTaskId': 'string',
            'InstanceId': 'string',
            'TaskState': 'pending'|'in-progress'|'failing'|'succeeded'|'failed'|'failed-detached',
            'StartTime': 'string',
            'CompleteTime': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • ReplaceRootVolumeTasks (list) --

      Information about the root volume replacement task.

      • (dict) --

        Information about a root volume replacement task.

        • ReplaceRootVolumeTaskId (string) --

          The ID of the root volume replacement task.

        • InstanceId (string) --

          The ID of the instance for which the root volume replacement task was created.

        • TaskState (string) --

          The state of the task. The task can be in one of the following states:

          • pending - the replacement volume is being created.
          • in-progress - the original volume is being detached and the replacement volume is being attached.
          • succeeded - the replacement volume has been successfully attached to the instance and the instance is available.
          • failing - the replacement task is in the process of failing.
          • failed - the replacement task has failed but the original root volume is still attached.
          • failing-detached - the replacement task is in the process of failing. The instance might have no root volume attached.
          • failed-detached - the replacement task has failed and the instance has no root volume attached.
        • StartTime (string) --

          The time the task was started.

        • CompleteTime (string) --

          The time the task completed.

        • Tags (list) --

          The 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 256 Unicode characters.

class EC2.Paginator.DescribeReservedInstancesModifications
paginator = client.get_paginator('describe_reserved_instances_modifications')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_reserved_instances_modifications().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ReservedInstancesModificationIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ReservedInstancesModificationIds (list) --

    IDs for the submitted modification request.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ReservedInstancesModifications': [
        {
            'ClientToken': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'EffectiveDate': datetime(2015, 1, 1),
            'ModificationResults': [
                {
                    'ReservedInstancesId': 'string',
                    'TargetConfiguration': {
                        'AvailabilityZone': 'string',
                        'InstanceCount': 123,
                        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                        'Platform': 'string',
                        'Scope': 'Availability Zone'|'Region'
                    }
                },
            ],
            'ReservedInstancesIds': [
                {
                    'ReservedInstancesId': 'string'
                },
            ],
            'ReservedInstancesModificationId': 'string',
            'Status': 'string',
            'StatusMessage': 'string',
            'UpdateDate': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeReservedInstancesModifications.

    • ReservedInstancesModifications (list) --

      The Reserved Instance modification information.

      • (dict) --

        Describes a Reserved Instance modification.

        • ClientToken (string) --

          A unique, case-sensitive key supplied by the client to ensure that the request is idempotent. For more information, see Ensuring Idempotency .

        • CreateDate (datetime) --

          The time when the modification request was created.

        • EffectiveDate (datetime) --

          The time for the modification to become effective.

        • ModificationResults (list) --

          Contains target configurations along with their corresponding new Reserved Instance IDs.

          • (dict) --

            Describes the modification request/s.

            • 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.

              • InstanceCount (integer) --

                The number of modified Reserved Instances.

                Note

                This is a required field for a request.

              • InstanceType (string) --

                The instance type for the modified Reserved Instances.

              • Platform (string) --

                The network platform of the modified Reserved Instances, which is either EC2-Classic or EC2-VPC.

              • Scope (string) --

                Whether the Reserved Instance is applied to instances in a Region or instances in a specific Availability Zone.

        • 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.

        • ReservedInstancesModificationId (string) --

          A unique ID for the Reserved Instance modification.

        • Status (string) --

          The status of the Reserved Instances modification request.

        • StatusMessage (string) --

          The reason for the status.

        • UpdateDate (datetime) --

          The time when the modification request was last updated.

class EC2.Paginator.DescribeReservedInstancesOfferings
paginator = client.get_paginator('describe_reserved_instances_offerings')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_reserved_instances_offerings().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    AvailabilityZone='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    IncludeMarketplace=True|False,
    InstanceType='a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    MaxDuration=123,
    MaxInstanceCount=123,
    MinDuration=123,
    OfferingClass='standard'|'convertible',
    ProductDescription='Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
    ReservedInstancesOfferingIds=[
        'string',
    ],
    DryRun=True|False,
    InstanceTenancy='default'|'dedicated'|'host',
    OfferingType='Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • AvailabilityZone (string) -- The Availability Zone in which the Reserved Instance can be used.
  • Filters (list) --

    One or more filters.

    • availability-zone - The Availability Zone where the Reserved Instance can be used.
    • duration - The duration of the Reserved Instance (for example, one year or three years), in seconds (31536000 | 94608000 ).
    • fixed-price - The purchase price of the Reserved Instance (for example, 9800.0).
    • instance-type - The instance type 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 Amazon Web Services 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) | Red Hat Enterprise Linux with HA (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.
    • scope - The scope of the Reserved Instance (Availability Zone or Region ).
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • IncludeMarketplace (boolean) -- Include Reserved Instance Marketplace offerings in the response.
  • InstanceType (string) -- The instance type that the reservation will cover (for example, m1.small ). For more information, see Instance types in the Amazon EC2 User Guide .
  • MaxDuration (integer) --

    The maximum duration (in seconds) to filter when searching for offerings.

    Default: 94608000 (3 years)

  • MaxInstanceCount (integer) --

    The maximum number of instances to filter when searching for offerings.

    Default: 20

  • MinDuration (integer) --

    The minimum duration (in seconds) to filter when searching for offerings.

    Default: 2592000 (1 month)

  • OfferingClass (string) -- The offering class of the Reserved Instance. Can be standard or convertible .
  • ProductDescription (string) -- The Reserved Instance product platform description. Instances that include (Amazon VPC) in the description are for use with Amazon VPC.
  • ReservedInstancesOfferingIds (list) --

    One or more Reserved Instances offering IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTenancy (string) --

    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).

    Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

    Default: default

  • OfferingType (string) -- The Reserved Instance offering type. If you are using tools that predate the 2011-11-01 API version, you only have access to the Medium Utilization Reserved Instance offering type.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ReservedInstancesOfferings': [
        {
            'AvailabilityZone': 'string',
            'Duration': 123,
            'FixedPrice': ...,
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'ReservedInstancesOfferingId': 'string',
            'UsagePrice': ...,
            'CurrencyCode': 'USD',
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'Marketplace': True|False,
            'OfferingClass': 'standard'|'convertible',
            'OfferingType': 'Heavy Utilization'|'Medium Utilization'|'Light Utilization'|'No Upfront'|'Partial Upfront'|'All Upfront',
            'PricingDetails': [
                {
                    'Count': 123,
                    'Price': 123.0
                },
            ],
            'RecurringCharges': [
                {
                    'Amount': 123.0,
                    'Frequency': 'Hourly'
                },
            ],
            'Scope': 'Availability Zone'|'Region'
        },
    ],

}

Response Structure

  • (dict) --

    Contains the output of DescribeReservedInstancesOfferings.

    • ReservedInstancesOfferings (list) --

      A list of Reserved Instances offerings.

      • (dict) --

        Describes a Reserved Instance offering.

        • AvailabilityZone (string) --

          The Availability Zone in which the Reserved Instance can be used.

        • Duration (integer) --

          The duration of the Reserved Instance, in seconds.

        • FixedPrice (float) --

          The purchase price of the Reserved Instance.

        • InstanceType (string) --

          The instance type on which the Reserved Instance can be used.

        • ProductDescription (string) --

          The Reserved Instance product platform description.

        • ReservedInstancesOfferingId (string) --

          The ID of the Reserved Instance offering. This is the offering ID used in GetReservedInstancesExchangeQuote to confirm that an exchange can be made.

        • UsagePrice (float) --

          The usage price of the Reserved Instance, per hour.

        • 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 .

        • InstanceTenancy (string) --

          The tenancy of the instance.

        • Marketplace (boolean) --

          Indicates whether the offering is available through the Reserved Instance Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance Marketplace offering, this is true .

        • OfferingClass (string) --

          If convertible it can be exchanged for Reserved Instances of the same or higher monetary value, with different configurations. If standard , it is not possible to perform an exchange.

        • OfferingType (string) --

          The Reserved Instance offering type.

        • PricingDetails (list) --

          The pricing details of the Reserved Instance offering.

          • (dict) --

            Describes a Reserved Instance offering.

            • Count (integer) --

              The number of reservations available for the price.

            • Price (float) --

              The price per instance.

        • RecurringCharges (list) --

          The recurring charge tag assigned to the resource.

          • (dict) --

            Describes a recurring charge.

            • Amount (float) --

              The amount of the recurring charge.

            • Frequency (string) --

              The frequency of the recurring charge.

        • Scope (string) --

          Whether the Reserved Instance is applied to instances in a Region or an Availability Zone.

class EC2.Paginator.DescribeRouteTables
paginator = client.get_paginator('describe_route_tables')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_route_tables().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    RouteTableIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • association.route-table-association-id - The ID of an association ID for the route table.
    • association.route-table-id - The ID of the route table involved in the association.
    • association.subnet-id - The ID of the subnet involved in the association.
    • association.main - Indicates whether the route table is the main route table for the VPC (true | false ). Route tables that do not have an association ID are not returned in the response.
    • owner-id - The ID of the Amazon Web Services account that owns the route table.
    • route-table-id - The ID of the route table.
    • route.destination-cidr-block - The IPv4 CIDR range specified in a route in the table.
    • route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in a route in the route table.
    • route.destination-prefix-list-id - The ID (prefix) of the Amazon Web Service specified in a route in the table.
    • route.egress-only-internet-gateway-id - The ID of an egress-only Internet gateway specified in a route in the route table.
    • route.gateway-id - The ID of a gateway specified in a route in the table.
    • route.instance-id - The ID of an instance specified in a route in the table.
    • route.nat-gateway-id - The ID of a NAT gateway.
    • route.transit-gateway-id - The ID of a transit gateway.
    • route.origin - Describes how the route was created. CreateRouteTable indicates that the route was automatically created when the route table was created; CreateRoute indicates that the route was manually added to the route table; EnableVgwRoutePropagation indicates that the route was propagated by route propagation.
    • route.state - The state of a route in the route table (active | blackhole ). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on).
    • route.vpc-peering-connection-id - The ID of a VPC peering connection specified in a route in the table.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the route table.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableIds (list) --

    One or more route table IDs.

    Default: Describes all your route tables.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'RouteTables': [
        {
            'Associations': [
                {
                    'Main': True|False,
                    'RouteTableAssociationId': 'string',
                    'RouteTableId': 'string',
                    'SubnetId': 'string',
                    'GatewayId': 'string',
                    'AssociationState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'PropagatingVgws': [
                {
                    'GatewayId': 'string'
                },
            ],
            'RouteTableId': 'string',
            'Routes': [
                {
                    'DestinationCidrBlock': 'string',
                    'DestinationIpv6CidrBlock': 'string',
                    'DestinationPrefixListId': 'string',
                    'EgressOnlyInternetGatewayId': 'string',
                    'GatewayId': 'string',
                    'InstanceId': 'string',
                    'InstanceOwnerId': 'string',
                    'NatGatewayId': 'string',
                    'TransitGatewayId': 'string',
                    'LocalGatewayId': 'string',
                    'CarrierGatewayId': 'string',
                    'NetworkInterfaceId': 'string',
                    'Origin': 'CreateRouteTable'|'CreateRoute'|'EnableVgwRoutePropagation',
                    'State': 'active'|'blackhole',
                    'VpcPeeringConnectionId': 'string',
                    'CoreNetworkArn': 'string'
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'OwnerId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    Contains the output of DescribeRouteTables.

    • RouteTables (list) --

      Information about one or more route tables.

      • (dict) --

        Describes a route table.

        • Associations (list) --

          The associations between the route table and one or more subnets or a gateway.

          • (dict) --

            Describes an association between a route table and a subnet or gateway.

            • Main (boolean) --

              Indicates whether this is the main route table.

            • RouteTableAssociationId (string) --

              The ID of the association.

            • RouteTableId (string) --

              The ID of the route table.

            • SubnetId (string) --

              The ID of the subnet. A subnet ID is not returned for an implicit association.

            • GatewayId (string) --

              The ID of the internet gateway or virtual private gateway.

            • AssociationState (dict) --

              The state of the association.

              • State (string) --

                The state of the association.

              • StatusMessage (string) --

                The status message, if applicable.

        • PropagatingVgws (list) --

          Any virtual private gateway (VGW) propagating routes.

          • (dict) --

            Describes a virtual private gateway propagating route.

            • GatewayId (string) --

              The ID of the virtual private gateway.

        • RouteTableId (string) --

          The ID of the route table.

        • Routes (list) --

          The routes in the route table.

          • (dict) --

            Describes a route in a route table.

            • DestinationCidrBlock (string) --

              The IPv4 CIDR block used for the destination match.

            • DestinationIpv6CidrBlock (string) --

              The IPv6 CIDR block used for the destination match.

            • DestinationPrefixListId (string) --

              The prefix of the Amazon Web Service.

            • EgressOnlyInternetGatewayId (string) --

              The ID of the egress-only internet gateway.

            • GatewayId (string) --

              The ID of a gateway attached to your VPC.

            • InstanceId (string) --

              The ID of a NAT instance in your VPC.

            • InstanceOwnerId (string) --

              The ID of Amazon Web Services account that owns the instance.

            • NatGatewayId (string) --

              The ID of a NAT gateway.

            • TransitGatewayId (string) --

              The ID of a transit gateway.

            • LocalGatewayId (string) --

              The ID of the local gateway.

            • CarrierGatewayId (string) --

              The ID of the carrier gateway.

            • NetworkInterfaceId (string) --

              The ID of the network interface.

            • Origin (string) --

              Describes how the route was created.

              • CreateRouteTable - The route was automatically created when the route table was created.
              • CreateRoute - The route was manually added to the route table.
              • EnableVgwRoutePropagation - The route was propagated by route propagation.
            • State (string) --

              The state of the route. The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

            • VpcPeeringConnectionId (string) --

              The ID of a VPC peering connection.

            • CoreNetworkArn (string) --

              The Amazon Resource Name (ARN) of the core network.

        • Tags (list) --

          Any tags assigned to the route table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • VpcId (string) --

          The ID of the VPC.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the route table.

class EC2.Paginator.DescribeScheduledInstanceAvailability
paginator = client.get_paginator('describe_scheduled_instance_availability')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_scheduled_instance_availability().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    FirstSlotStartTimeRange={
        'EarliestTime': datetime(2015, 1, 1),
        'LatestTime': datetime(2015, 1, 1)
    },
    MaxSlotDurationInHours=123,
    MinSlotDurationInHours=123,
    Recurrence={
        'Frequency': 'string',
        'Interval': 123,
        'OccurrenceDays': [
            123,
        ],
        'OccurrenceRelativeToEnd': True|False,
        'OccurrenceUnit': 'string'
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone (for example, us-west-2a ).
    • instance-type - The instance type (for example, c4.large ).
    • network-platform - The network platform (EC2-Classic or EC2-VPC ).
    • platform - The platform (Linux/UNIX or Windows ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • FirstSlotStartTimeRange (dict) --

    [REQUIRED]

    The time period for the first schedule to start.

    • EarliestTime (datetime) -- [REQUIRED]

      The earliest date and time, in UTC, for the Scheduled Instance to start.

    • LatestTime (datetime) -- [REQUIRED]

      The latest date and time, in UTC, for the Scheduled Instance to start. This value must be later than or equal to the earliest date and at most three months in the future.

  • MaxSlotDurationInHours (integer) -- The maximum available duration, in hours. This value must be greater than MinSlotDurationInHours and less than 1,720.
  • MinSlotDurationInHours (integer) -- The minimum available duration, in hours. The minimum required duration is 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 hours.
  • Recurrence (dict) --

    [REQUIRED]

    The schedule recurrence.

    • Frequency (string) --

      The frequency (Daily , Weekly , or Monthly ).

    • Interval (integer) --

      The interval quantity. The interval unit depends on the value of Frequency . For example, every 2 weeks or every 2 months.

    • OccurrenceDays (list) --

      The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday). You can't specify this value with a daily schedule. If the occurrence is relative to the end of the month, you can specify only a single day.

      • (integer) --
    • OccurrenceRelativeToEnd (boolean) --

      Indicates whether the occurrence is relative to the end of the specified week or month. You can't specify this value with a daily schedule.

    • OccurrenceUnit (string) --

      The unit for OccurrenceDays (DayOfWeek or DayOfMonth ). This value is required for a monthly schedule. You can't specify DayOfWeek with a weekly schedule. You can't specify this value with a daily schedule.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ScheduledInstanceAvailabilitySet': [
        {
            'AvailabilityZone': 'string',
            'AvailableInstanceCount': 123,
            'FirstSlotStartTime': datetime(2015, 1, 1),
            'HourlyPrice': 'string',
            'InstanceType': 'string',
            'MaxTermDurationInDays': 123,
            'MinTermDurationInDays': 123,
            'NetworkPlatform': 'string',
            'Platform': 'string',
            'PurchaseToken': 'string',
            'Recurrence': {
                'Frequency': 'string',
                'Interval': 123,
                'OccurrenceDaySet': [
                    123,
                ],
                'OccurrenceRelativeToEnd': True|False,
                'OccurrenceUnit': 'string'
            },
            'SlotDurationInHours': 123,
            'TotalScheduledInstanceHours': 123
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeScheduledInstanceAvailability.

    • ScheduledInstanceAvailabilitySet (list) --

      Information about the available Scheduled Instances.

      • (dict) --

        Describes a schedule that is available for your Scheduled Instances.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        • AvailabilityZone (string) --

          The Availability Zone.

        • AvailableInstanceCount (integer) --

          The number of available instances.

        • FirstSlotStartTime (datetime) --

          The time period for the first schedule to start.

        • HourlyPrice (string) --

          The hourly price for a single instance.

        • InstanceType (string) --

          The instance type. You can specify one of the C3, C4, M4, or R3 instance types.

        • MaxTermDurationInDays (integer) --

          The maximum term. The only possible value is 365 days.

        • MinTermDurationInDays (integer) --

          The minimum term. The only possible value is 365 days.

        • NetworkPlatform (string) --

          The network platform (EC2-Classic or EC2-VPC ).

        • Platform (string) --

          The platform (Linux/UNIX or Windows ).

        • PurchaseToken (string) --

          The purchase token. This token expires in two hours.

        • Recurrence (dict) --

          The schedule recurrence.

          • Frequency (string) --

            The frequency (Daily , Weekly , or Monthly ).

          • Interval (integer) --

            The interval quantity. The interval unit depends on the value of frequency . For example, every 2 weeks or every 2 months.

          • OccurrenceDaySet (list) --

            The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

            • (integer) --
          • OccurrenceRelativeToEnd (boolean) --

            Indicates whether the occurrence is relative to the end of the specified week or month.

          • OccurrenceUnit (string) --

            The unit for occurrenceDaySet (DayOfWeek or DayOfMonth ).

        • SlotDurationInHours (integer) --

          The number of hours in the schedule.

        • TotalScheduledInstanceHours (integer) --

          The total number of hours for a single instance for the entire term.

class EC2.Paginator.DescribeScheduledInstances
paginator = client.get_paginator('describe_scheduled_instances')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_scheduled_instances().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ScheduledInstanceIds=[
        'string',
    ],
    SlotStartTimeRange={
        'EarliestTime': datetime(2015, 1, 1),
        'LatestTime': datetime(2015, 1, 1)
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone (for example, us-west-2a ).
    • instance-type - The instance type (for example, c4.large ).
    • network-platform - The network platform (EC2-Classic or EC2-VPC ).
    • platform - The platform (Linux/UNIX or Windows ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ScheduledInstanceIds (list) --

    The Scheduled Instance IDs.

    • (string) --
  • SlotStartTimeRange (dict) --

    The time period for the first schedule to start.

    • EarliestTime (datetime) --

      The earliest date and time, in UTC, for the Scheduled Instance to start.

    • LatestTime (datetime) --

      The latest date and time, in UTC, for the Scheduled Instance to start.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ScheduledInstanceSet': [
        {
            'AvailabilityZone': 'string',
            'CreateDate': datetime(2015, 1, 1),
            'HourlyPrice': 'string',
            'InstanceCount': 123,
            'InstanceType': 'string',
            'NetworkPlatform': 'string',
            'NextSlotStartTime': datetime(2015, 1, 1),
            'Platform': 'string',
            'PreviousSlotEndTime': datetime(2015, 1, 1),
            'Recurrence': {
                'Frequency': 'string',
                'Interval': 123,
                'OccurrenceDaySet': [
                    123,
                ],
                'OccurrenceRelativeToEnd': True|False,
                'OccurrenceUnit': 'string'
            },
            'ScheduledInstanceId': 'string',
            'SlotDurationInHours': 123,
            'TermEndDate': datetime(2015, 1, 1),
            'TermStartDate': datetime(2015, 1, 1),
            'TotalScheduledInstanceHours': 123
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeScheduledInstances.

    • ScheduledInstanceSet (list) --

      Information about the Scheduled Instances.

      • (dict) --

        Describes a Scheduled Instance.

        Note

        We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

        • AvailabilityZone (string) --

          The Availability Zone.

        • CreateDate (datetime) --

          The date when the Scheduled Instance was purchased.

        • HourlyPrice (string) --

          The hourly price for a single instance.

        • InstanceCount (integer) --

          The number of instances.

        • InstanceType (string) --

          The instance type.

        • NetworkPlatform (string) --

          The network platform (EC2-Classic or EC2-VPC ).

        • NextSlotStartTime (datetime) --

          The time for the next schedule to start.

        • Platform (string) --

          The platform (Linux/UNIX or Windows ).

        • PreviousSlotEndTime (datetime) --

          The time that the previous schedule ended or will end.

        • Recurrence (dict) --

          The schedule recurrence.

          • Frequency (string) --

            The frequency (Daily , Weekly , or Monthly ).

          • Interval (integer) --

            The interval quantity. The interval unit depends on the value of frequency . For example, every 2 weeks or every 2 months.

          • OccurrenceDaySet (list) --

            The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).

            • (integer) --
          • OccurrenceRelativeToEnd (boolean) --

            Indicates whether the occurrence is relative to the end of the specified week or month.

          • OccurrenceUnit (string) --

            The unit for occurrenceDaySet (DayOfWeek or DayOfMonth ).

        • ScheduledInstanceId (string) --

          The Scheduled Instance ID.

        • SlotDurationInHours (integer) --

          The number of hours in the schedule.

        • TermEndDate (datetime) --

          The end date for the Scheduled Instance.

        • TermStartDate (datetime) --

          The start date for the Scheduled Instance.

        • TotalScheduledInstanceHours (integer) --

          The total number of hours for a single instance for the entire term.

class EC2.Paginator.DescribeSecurityGroupRules
paginator = client.get_paginator('describe_security_group_rules')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_security_group_rules().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SecurityGroupRuleIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • group-id - The ID of the security group.
    • security-group-rule-id - The ID of the security group rule.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • SecurityGroupRuleIds (list) --

    The IDs of the security group rules.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'SecurityGroupRules': [
        {
            'SecurityGroupRuleId': 'string',
            'GroupId': 'string',
            'GroupOwnerId': 'string',
            'IsEgress': True|False,
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'CidrIpv4': 'string',
            'CidrIpv6': 'string',
            'PrefixListId': 'string',
            'ReferencedGroupInfo': {
                'GroupId': 'string',
                'PeeringStatus': 'string',
                'UserId': 'string',
                'VpcId': 'string',
                'VpcPeeringConnectionId': 'string'
            },
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • SecurityGroupRules (list) --

      Information about security group rules.

      • (dict) --

        Describes a security group rule.

        • SecurityGroupRuleId (string) --

          The ID of the security group rule.

        • GroupId (string) --

          The ID of the security group.

        • GroupOwnerId (string) --

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress (boolean) --

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          Use -1 to specify all protocols.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 (string) --

          The IPv4 CIDR range.

        • CidrIpv6 (string) --

          The IPv6 CIDR range.

        • PrefixListId (string) --

          The ID of the prefix list.

        • ReferencedGroupInfo (dict) --

          Describes the security group that is referenced in the rule.

          • GroupId (string) --

            The ID of the security group.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The Amazon Web Services account ID.

          • VpcId (string) --

            The ID of the VPC.

          • VpcPeeringConnectionId (string) --

            The ID of the VPC peering connection.

        • Description (string) --

          The security group rule description.

        • Tags (list) --

          The tags applied to the security group rule.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeSecurityGroups
paginator = client.get_paginator('describe_security_groups')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_security_groups().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    GroupIds=[
        'string',
    ],
    GroupNames=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The 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.cidr - An IPv4 CIDR block for an outbound security group rule.
    • egress.ip-permission.from-port - For an outbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.
    • egress.ip-permission.group-id - The ID of a security group that has been referenced in an outbound security group rule.
    • egress.ip-permission.group-name - The name of a security group that is referenced in an outbound security group rule.
    • egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security group rule.
    • egress.ip-permission.prefix-list-id - The ID of a prefix list to which a security group rule allows outbound access.
    • egress.ip-permission.protocol - The IP protocol for an outbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • egress.ip-permission.to-port - For an outbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • egress.ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an outbound security group rule.
    • group-id - The ID of the security group.
    • group-name - The name of the security group.
    • ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule.
    • ip-permission.from-port - For an inbound rule, 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 referenced in an inbound security group rule.
    • ip-permission.group-name - The name of a security group that is referenced in an inbound security group rule.
    • ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group rule.
    • ip-permission.prefix-list-id - The ID of a prefix list from which a security group rule allows inbound access.
    • ip-permission.protocol - The IP protocol for an inbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • ip-permission.to-port - For an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an inbound security group rule.
    • owner-id - The Amazon Web Services account ID of the owner of the security group.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • GroupIds (list) --

    The IDs of the security groups. Required for security groups in a nondefault VPC.

    Default: Describes all of your security groups.

    • (string) --
  • GroupNames (list) --

    [EC2-Classic and default VPC only] The names of the security groups. 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 of your security groups.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'SecurityGroups': [
        {
            'Description': 'string',
            'GroupName': 'string',
            'IpPermissions': [
                {
                    'FromPort': 123,
                    'IpProtocol': 'string',
                    'IpRanges': [
                        {
                            'CidrIp': 'string',
                            'Description': 'string'
                        },
                    ],
                    'Ipv6Ranges': [
                        {
                            'CidrIpv6': 'string',
                            'Description': 'string'
                        },
                    ],
                    'PrefixListIds': [
                        {
                            'Description': 'string',
                            'PrefixListId': 'string'
                        },
                    ],
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'Description': 'string',
                            'GroupId': 'string',
                            'GroupName': 'string',
                            'PeeringStatus': 'string',
                            'UserId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string'
                        },
                    ]
                },
            ],
            'OwnerId': 'string',
            'GroupId': 'string',
            'IpPermissionsEgress': [
                {
                    'FromPort': 123,
                    'IpProtocol': 'string',
                    'IpRanges': [
                        {
                            'CidrIp': 'string',
                            'Description': 'string'
                        },
                    ],
                    'Ipv6Ranges': [
                        {
                            'CidrIpv6': 'string',
                            'Description': 'string'
                        },
                    ],
                    'PrefixListIds': [
                        {
                            'Description': 'string',
                            'PrefixListId': 'string'
                        },
                    ],
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'Description': 'string',
                            'GroupId': 'string',
                            'GroupName': 'string',
                            'PeeringStatus': 'string',
                            'UserId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string'
                        },
                    ]
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • SecurityGroups (list) --

      Information about the security groups.

      • (dict) --

        Describes a security group.

        • Description (string) --

          A description of the security group.

        • GroupName (string) --

          The name of the security group.

        • IpPermissions (list) --

          The inbound rules associated with the security group.

          • (dict) --

            Describes a set of permissions for a security group rule.

            • FromPort (integer) --

              The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • IpProtocol (string) --

              The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

              [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

            • IpRanges (list) --

              The IPv4 ranges.

              • (dict) --

                Describes an IPv4 range.

                • CidrIp (string) --

                  The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv4 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • Ipv6Ranges (list) --

              [VPC only] The IPv6 ranges.

              • (dict) --

                [EC2-VPC only] Describes an IPv6 range.

                • CidrIpv6 (string) --

                  The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv6 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • PrefixListIds (list) --

              [VPC only] The prefix list IDs.

              • (dict) --

                Describes a prefix list ID.

                • Description (string) --

                  A description for the security group rule that references this prefix list ID.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • PrefixListId (string) --

                  The ID of the prefix.

            • ToPort (integer) --

              The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • UserIdGroupPairs (list) --

              The security group and Amazon Web Services account ID pairs.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

                • 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.

        • OwnerId (string) --

          The Amazon Web Services account ID of the owner of the security group.

        • GroupId (string) --

          The ID of the security group.

        • IpPermissionsEgress (list) --

          [VPC only] The outbound rules associated with the security group.

          • (dict) --

            Describes a set of permissions for a security group rule.

            • FromPort (integer) --

              The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • IpProtocol (string) --

              The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

              [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

            • IpRanges (list) --

              The IPv4 ranges.

              • (dict) --

                Describes an IPv4 range.

                • CidrIp (string) --

                  The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv4 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • Ipv6Ranges (list) --

              [VPC only] The IPv6 ranges.

              • (dict) --

                [EC2-VPC only] Describes an IPv6 range.

                • CidrIpv6 (string) --

                  The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

                • Description (string) --

                  A description for the security group rule that references this IPv6 address range.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

            • PrefixListIds (list) --

              [VPC only] The prefix list IDs.

              • (dict) --

                Describes a prefix list ID.

                • Description (string) --

                  A description for the security group rule that references this prefix list ID.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • PrefixListId (string) --

                  The ID of the prefix.

            • ToPort (integer) --

              The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

            • UserIdGroupPairs (list) --

              The security group and Amazon Web Services account ID pairs.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

                • 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.

        • 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 256 Unicode characters.

        • VpcId (string) --

          [VPC only] The ID of the VPC for the security group.

class EC2.Paginator.DescribeSnapshotTierStatus
paginator = client.get_paginator('describe_snapshot_tier_status')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_snapshot_tier_status().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • snapshot-id - The snapshot ID.
    • volume-id - The ID of the volume the snapshot is for.
    • last-tiering-operation - The state of the last archive or restore action. (archival-in-progress | archival-completed | archival-failed | permanent-restore-in-progress | permanent-restore-completed | permanent-restore-failed | temporary-restore-in-progress | temporary-restore-completed | temporary-restore-failed )
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'SnapshotTierStatuses': [
        {
            'SnapshotId': 'string',
            'VolumeId': 'string',
            'Status': 'pending'|'completed'|'error'|'recoverable'|'recovering',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'StorageTier': 'archive'|'standard',
            'LastTieringStartTime': datetime(2015, 1, 1),
            'LastTieringProgress': 123,
            'LastTieringOperationStatus': 'archival-in-progress'|'archival-completed'|'archival-failed'|'temporary-restore-in-progress'|'temporary-restore-completed'|'temporary-restore-failed'|'permanent-restore-in-progress'|'permanent-restore-completed'|'permanent-restore-failed',
            'LastTieringOperationStatusDetail': 'string',
            'ArchivalCompleteTime': datetime(2015, 1, 1),
            'RestoreExpiryTime': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • SnapshotTierStatuses (list) --

      Information about the snapshot's storage tier.

      • (dict) --

        Provides information about a snapshot's storage tier.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeId (string) --

          The ID of the volume from which the snapshot was created.

        • Status (string) --

          The state of the snapshot.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the snapshot.

        • Tags (list) --

          The tags that are assigned to the snapshot.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • StorageTier (string) --

          The storage tier in which the snapshot is stored. standard indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. archive indicates that the snapshot is currently archived and that it must be restored before it can be used.

        • LastTieringStartTime (datetime) --

          The date and time when the last archive or restore process was started.

        • LastTieringProgress (integer) --

          The progress of the last archive or restore process, as a percentage.

        • LastTieringOperationStatus (string) --

          The status of the last archive or restore process.

        • LastTieringOperationStatusDetail (string) --

          A message describing the status of the last archive or restore process.

        • ArchivalCompleteTime (datetime) --

          The date and time when the last archive process was completed.

        • RestoreExpiryTime (datetime) --

          Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.

class EC2.Paginator.DescribeSnapshots
paginator = client.get_paginator('describe_snapshots')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_snapshots().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    OwnerIds=[
        'string',
    ],
    RestorableByUserIds=[
        'string',
    ],
    SnapshotIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • description - A description of the snapshot.
    • encrypted - Indicates whether the snapshot is encrypted (true | false )
    • owner-alias - The owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.
    • progress - The progress of the snapshot, as a percentage (for example, 80%).
    • snapshot-id - The snapshot ID.
    • start-time - The time stamp when the snapshot was initiated.
    • status - The status of the snapshot (pending | completed | error ).
    • storage-tier - The storage tier of the snapshot (archive | standard ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The ID of the volume the snapshot is for.
    • volume-size - The size of the volume, in GiB.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • OwnerIds (list) --

    Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , and amazon .

    • (string) --
  • RestorableByUserIds (list) --

    The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • (string) --
  • SnapshotIds (list) --

    The snapshot IDs.

    Default: Describes the snapshots for which you have create volume permissions.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Snapshots': [
        {
            'DataEncryptionKeyId': 'string',
            'Description': 'string',
            'Encrypted': True|False,
            'KmsKeyId': 'string',
            'OwnerId': 'string',
            'Progress': 'string',
            'SnapshotId': 'string',
            'StartTime': datetime(2015, 1, 1),
            'State': 'pending'|'completed'|'error'|'recoverable'|'recovering',
            'StateMessage': 'string',
            'VolumeId': 'string',
            'VolumeSize': 123,
            'OwnerAlias': 'string',
            'OutpostArn': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'StorageTier': 'archive'|'standard',
            'RestoreExpiryTime': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • Snapshots (list) --

      Information about the snapshots.

      • (dict) --

        Describes a snapshot.

        • DataEncryptionKeyId (string) --

          The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by DescribeSnapshots .

        • Description (string) --

          The description for the snapshot.

        • Encrypted (boolean) --

          Indicates whether the snapshot is encrypted.

        • KmsKeyId (string) --

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the EBS snapshot.

        • Progress (string) --

          The progress of the snapshot, as a percentage.

        • SnapshotId (string) --

          The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

        • StartTime (datetime) --

          The time stamp when the snapshot was initiated.

        • State (string) --

          The snapshot state.

        • StateMessage (string) --

          Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by DescribeSnapshots .

        • VolumeId (string) --

          The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

        • VolumeSize (integer) --

          The size of the volume, in GiB.

        • OwnerAlias (string) --

          The Amazon Web Services owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

        • Tags (list) --

          Any tags assigned to the snapshot.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • StorageTier (string) --

          The storage tier in which the snapshot is stored. standard indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. archive indicates that the snapshot is currently archived and that it must be restored before it can be used.

        • RestoreExpiryTime (datetime) --

          Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.

class EC2.Paginator.DescribeSpotFleetInstances
paginator = client.get_paginator('describe_spot_fleet_instances')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_spot_fleet_instances().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    SpotFleetRequestId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotFleetRequestId (string) --

    [REQUIRED]

    The ID of the Spot Fleet request.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ActiveInstances': [
        {
            'InstanceId': 'string',
            'InstanceType': 'string',
            'SpotInstanceRequestId': 'string',
            'InstanceHealth': 'healthy'|'unhealthy'
        },
    ],
    'SpotFleetRequestId': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotFleetInstances.

    • ActiveInstances (list) --

      The running instances. This list is refreshed periodically and might be out of date.

      • (dict) --

        Describes a running instance in a Spot Fleet.

        • InstanceId (string) --

          The ID of the instance.

        • InstanceType (string) --

          The instance type.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • InstanceHealth (string) --

          The health status of the instance. If the status of either the instance status check or the system status check is impaired , the health status of the instance is unhealthy . Otherwise, the health status is healthy .

    • SpotFleetRequestId (string) --

      The ID of the Spot Fleet request.

class EC2.Paginator.DescribeSpotFleetRequests
paginator = client.get_paginator('describe_spot_fleet_requests')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_spot_fleet_requests().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    SpotFleetRequestIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotFleetRequestIds (list) --

    The IDs of the Spot Fleet requests.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'SpotFleetRequestConfigs': [
        {
            'ActivityStatus': 'error'|'pending_fulfillment'|'pending_termination'|'fulfilled',
            'CreateTime': datetime(2015, 1, 1),
            'SpotFleetRequestConfig': {
                'AllocationStrategy': 'lowestPrice'|'diversified'|'capacityOptimized'|'capacityOptimizedPrioritized',
                'OnDemandAllocationStrategy': 'lowestPrice'|'prioritized',
                'SpotMaintenanceStrategies': {
                    'CapacityRebalance': {
                        'ReplacementStrategy': 'launch'|'launch-before-terminate',
                        'TerminationDelay': 123
                    }
                },
                'ClientToken': 'string',
                'ExcessCapacityTerminationPolicy': 'noTermination'|'default',
                'FulfilledCapacity': 123.0,
                'OnDemandFulfilledCapacity': 123.0,
                'IamFleetRole': 'string',
                'LaunchSpecifications': [
                    {
                        'SecurityGroups': [
                            {
                                'GroupName': 'string',
                                'GroupId': 'string'
                            },
                        ],
                        'AddressingType': 'string',
                        'BlockDeviceMappings': [
                            {
                                'DeviceName': 'string',
                                'VirtualName': 'string',
                                'Ebs': {
                                    'DeleteOnTermination': True|False,
                                    'Iops': 123,
                                    'SnapshotId': 'string',
                                    'VolumeSize': 123,
                                    'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                                    'KmsKeyId': 'string',
                                    'Throughput': 123,
                                    'OutpostArn': 'string',
                                    'Encrypted': True|False
                                },
                                'NoDevice': 'string'
                            },
                        ],
                        'EbsOptimized': True|False,
                        'IamInstanceProfile': {
                            'Arn': 'string',
                            'Name': 'string'
                        },
                        'ImageId': 'string',
                        'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                        'KernelId': 'string',
                        'KeyName': 'string',
                        'Monitoring': {
                            'Enabled': True|False
                        },
                        'NetworkInterfaces': [
                            {
                                'AssociatePublicIpAddress': True|False,
                                'DeleteOnTermination': True|False,
                                'Description': 'string',
                                'DeviceIndex': 123,
                                'Groups': [
                                    'string',
                                ],
                                'Ipv6AddressCount': 123,
                                'Ipv6Addresses': [
                                    {
                                        'Ipv6Address': 'string'
                                    },
                                ],
                                'NetworkInterfaceId': 'string',
                                'PrivateIpAddress': 'string',
                                'PrivateIpAddresses': [
                                    {
                                        'Primary': True|False,
                                        'PrivateIpAddress': 'string'
                                    },
                                ],
                                'SecondaryPrivateIpAddressCount': 123,
                                'SubnetId': 'string',
                                'AssociateCarrierIpAddress': True|False,
                                'InterfaceType': 'string',
                                'NetworkCardIndex': 123,
                                'Ipv4Prefixes': [
                                    {
                                        'Ipv4Prefix': 'string'
                                    },
                                ],
                                'Ipv4PrefixCount': 123,
                                'Ipv6Prefixes': [
                                    {
                                        'Ipv6Prefix': 'string'
                                    },
                                ],
                                'Ipv6PrefixCount': 123
                            },
                        ],
                        'Placement': {
                            'AvailabilityZone': 'string',
                            'GroupName': 'string',
                            'Tenancy': 'default'|'dedicated'|'host'
                        },
                        'RamdiskId': 'string',
                        'SpotPrice': 'string',
                        'SubnetId': 'string',
                        'UserData': 'string',
                        'WeightedCapacity': 123.0,
                        'TagSpecifications': [
                            {
                                'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                                'Tags': [
                                    {
                                        'Key': 'string',
                                        'Value': 'string'
                                    },
                                ]
                            },
                        ],
                        'InstanceRequirements': {
                            'VCpuCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'MemoryMiB': {
                                'Min': 123,
                                'Max': 123
                            },
                            'CpuManufacturers': [
                                'intel'|'amd'|'amazon-web-services',
                            ],
                            'MemoryGiBPerVCpu': {
                                'Min': 123.0,
                                'Max': 123.0
                            },
                            'ExcludedInstanceTypes': [
                                'string',
                            ],
                            'InstanceGenerations': [
                                'current'|'previous',
                            ],
                            'SpotMaxPricePercentageOverLowestPrice': 123,
                            'OnDemandMaxPricePercentageOverLowestPrice': 123,
                            'BareMetal': 'included'|'required'|'excluded',
                            'BurstablePerformance': 'included'|'required'|'excluded',
                            'RequireHibernateSupport': True|False,
                            'NetworkInterfaceCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'LocalStorage': 'included'|'required'|'excluded',
                            'LocalStorageTypes': [
                                'hdd'|'ssd',
                            ],
                            'TotalLocalStorageGB': {
                                'Min': 123.0,
                                'Max': 123.0
                            },
                            'BaselineEbsBandwidthMbps': {
                                'Min': 123,
                                'Max': 123
                            },
                            'AcceleratorTypes': [
                                'gpu'|'fpga'|'inference',
                            ],
                            'AcceleratorCount': {
                                'Min': 123,
                                'Max': 123
                            },
                            'AcceleratorManufacturers': [
                                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                            ],
                            'AcceleratorNames': [
                                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                            ],
                            'AcceleratorTotalMemoryMiB': {
                                'Min': 123,
                                'Max': 123
                            }
                        }
                    },
                ],
                'LaunchTemplateConfigs': [
                    {
                        'LaunchTemplateSpecification': {
                            'LaunchTemplateId': 'string',
                            'LaunchTemplateName': 'string',
                            'Version': 'string'
                        },
                        'Overrides': [
                            {
                                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                                'SpotPrice': 'string',
                                'SubnetId': 'string',
                                'AvailabilityZone': 'string',
                                'WeightedCapacity': 123.0,
                                'Priority': 123.0,
                                'InstanceRequirements': {
                                    'VCpuCount': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'MemoryMiB': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'CpuManufacturers': [
                                        'intel'|'amd'|'amazon-web-services',
                                    ],
                                    'MemoryGiBPerVCpu': {
                                        'Min': 123.0,
                                        'Max': 123.0
                                    },
                                    'ExcludedInstanceTypes': [
                                        'string',
                                    ],
                                    'InstanceGenerations': [
                                        'current'|'previous',
                                    ],
                                    'SpotMaxPricePercentageOverLowestPrice': 123,
                                    'OnDemandMaxPricePercentageOverLowestPrice': 123,
                                    'BareMetal': 'included'|'required'|'excluded',
                                    'BurstablePerformance': 'included'|'required'|'excluded',
                                    'RequireHibernateSupport': True|False,
                                    'NetworkInterfaceCount': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'LocalStorage': 'included'|'required'|'excluded',
                                    'LocalStorageTypes': [
                                        'hdd'|'ssd',
                                    ],
                                    'TotalLocalStorageGB': {
                                        'Min': 123.0,
                                        'Max': 123.0
                                    },
                                    'BaselineEbsBandwidthMbps': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'AcceleratorTypes': [
                                        'gpu'|'fpga'|'inference',
                                    ],
                                    'AcceleratorCount': {
                                        'Min': 123,
                                        'Max': 123
                                    },
                                    'AcceleratorManufacturers': [
                                        'nvidia'|'amd'|'amazon-web-services'|'xilinx',
                                    ],
                                    'AcceleratorNames': [
                                        'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
                                    ],
                                    'AcceleratorTotalMemoryMiB': {
                                        'Min': 123,
                                        'Max': 123
                                    }
                                }
                            },
                        ]
                    },
                ],
                'SpotPrice': 'string',
                'TargetCapacity': 123,
                'OnDemandTargetCapacity': 123,
                'OnDemandMaxTotalPrice': 'string',
                'SpotMaxTotalPrice': 'string',
                'TerminateInstancesWithExpiration': True|False,
                'Type': 'request'|'maintain'|'instant',
                'ValidFrom': datetime(2015, 1, 1),
                'ValidUntil': datetime(2015, 1, 1),
                'ReplaceUnhealthyInstances': True|False,
                'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate',
                'LoadBalancersConfig': {
                    'ClassicLoadBalancersConfig': {
                        'ClassicLoadBalancers': [
                            {
                                'Name': 'string'
                            },
                        ]
                    },
                    'TargetGroupsConfig': {
                        'TargetGroups': [
                            {
                                'Arn': 'string'
                            },
                        ]
                    }
                },
                'InstancePoolsToUseCount': 123,
                'Context': 'string',
                'TargetCapacityUnitType': 'vcpu'|'memory-mib'|'units',
                'TagSpecifications': [
                    {
                        'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
                        'Tags': [
                            {
                                'Key': 'string',
                                'Value': 'string'
                            },
                        ]
                    },
                ]
            },
            'SpotFleetRequestId': 'string',
            'SpotFleetRequestState': 'submitted'|'active'|'cancelled'|'failed'|'cancelled_running'|'cancelled_terminating'|'modifying',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': '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.

        • ActivityStatus (string) --

          The progress of the Spot Fleet request. If there is an error, the status is error . After all requests are placed, the status is pending_fulfillment . If the size of the fleet is equal to or greater than its target capacity, the status is fulfilled . If the size of the fleet is decreased, the status is pending_termination while Spot Instances are terminating.

        • CreateTime (datetime) --

          The creation date and time of the request.

        • SpotFleetRequestConfig (dict) --

          The configuration of the Spot Fleet request.

          • AllocationStrategy (string) --

            Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet request.

            If the allocation strategy is lowestPrice , Spot Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.

            If the allocation strategy is diversified , Spot Fleet launches instances from all the Spot Instance pools that you specify.

            If the allocation strategy is capacityOptimized (recommended), Spot Fleet launches instances from Spot Instance pools with optimal capacity for the number of instances that are launching. To give certain instance types a higher chance of launching first, use capacityOptimizedPrioritized . Set a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides . You can assign the same priority to different LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. capacityOptimizedPrioritized is supported only if your Spot Fleet uses a launch template. Note that if the OnDemandAllocationStrategy is set to prioritized , the same priority is applied when fulfilling On-Demand capacity.

          • OnDemandAllocationStrategy (string) --

            The order of the launch template overrides to use in fulfilling On-Demand capacity. If you specify lowestPrice , Spot Fleet uses price to determine the order, launching the lowest price first. If you specify prioritized , Spot Fleet uses the priority that you assign to each Spot Fleet launch template override, launching the highest priority first. If you do not specify a value, Spot Fleet defaults to lowestPrice .

          • SpotMaintenanceStrategies (dict) --

            The strategies for managing your Spot Instances that are at an elevated risk of being interrupted.

            • CapacityRebalance (dict) --

              The Spot Instance replacement strategy to use when Amazon EC2 emits a signal that your Spot Instance is at an elevated risk of being interrupted. For more information, see Capacity rebalancing in the Amazon EC2 User Guide for Linux Instances .

              • ReplacementStrategy (string) --

                The replacement strategy to use. Only available for fleets of type maintain .

                launch - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. Spot Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.

                launch-before-terminate - Spot Fleet launches a new replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in TerminationDelay ), terminates the instances that received a rebalance notification.

              • TerminationDelay (integer) --

                The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.

                Required when ReplacementStrategy is set to launch-before-terminate .

                Not valid when ReplacementStrategy is set to launch .

                Valid values: Minimum value of 120 seconds. Maximum value of 7200 seconds.

          • ClientToken (string) --

            A unique, case-sensitive identifier that you provide to ensure the idempotency of your listings. This helps to avoid duplicate listings. For more information, see Ensuring Idempotency .

          • ExcessCapacityTerminationPolicy (string) --

            Indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.

          • FulfilledCapacity (float) --

            The number of units fulfilled by this request compared to the set target capacity. You cannot set this value.

          • OnDemandFulfilledCapacity (float) --

            The number of On-Demand units fulfilled by this request compared to the set target On-Demand capacity.

          • IamFleetRole (string) --

            The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that grants the Spot Fleet the permission to request, launch, terminate, and tag instances on your behalf. For more information, see Spot Fleet prerequisites in the Amazon EC2 User Guide for Linux Instances . Spot Fleet can 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) --

            The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications , you can't specify LaunchTemplateConfigs . If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs .

            • (dict) --

              Describes the launch specification for one or more Spot Instances. If you include On-Demand capacity in your fleet request or want to specify an EFA network device, you can't use SpotFleetLaunchSpecification ; you must use LaunchTemplateConfig .

              Note

              We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide for Linux Instances .

              • 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.

              • AddressingType (string) --

                Deprecated.

              • BlockDeviceMappings (list) --

                One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.

                • (dict) --

                  Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

                  • DeviceName (string) --

                    The device name (for example, /dev/sdh or xvdh ).

                  • 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.

                    NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

                    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.

                  • Ebs (dict) --

                    Parameters used to automatically set up EBS volumes when the instance is launched.

                    • DeleteOnTermination (boolean) --

                      Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

                    • Iops (integer) --

                      The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                      The following are the supported values for each volume type:

                      • gp3 : 3,000-16,000 IOPS
                      • io1 : 100-64,000 IOPS
                      • io2 : 100-64,000 IOPS

                      For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

                      This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

                    • SnapshotId (string) --

                      The ID of the snapshot.

                    • VolumeSize (integer) --

                      The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                      The following are the supported volumes sizes for each volume type:

                      • gp2 and gp3 :1-16,384
                      • io1 and io2 : 4-16,384
                      • st1 and sc1 : 125-16,384
                      • standard : 1-1,024
                    • VolumeType (string) --

                      The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

                    • KmsKeyId (string) --

                      Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                      This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

                    • Throughput (integer) --

                      The throughput that the volume supports, in MiB/s.

                      This parameter is valid only for gp3 volumes.

                      Valid Range: Minimum value of 125. Maximum value of 1000.

                    • OutpostArn (string) --

                      The ARN of the Outpost on which the snapshot is stored.

                      This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

                    • Encrypted (boolean) --

                      Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

                      In no case can you remove encryption from an encrypted volume.

                      Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

                      This parameter is not returned by DescribeImageAttribute .

                  • NoDevice (string) --

                    To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

              • 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

              • 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.

              • ImageId (string) --

                The ID of the AMI.

              • InstanceType (string) --

                The instance type.

              • KernelId (string) --

                The ID of the kernel.

              • KeyName (string) --

                The name of the key pair.

              • Monitoring (dict) --

                Enable or disable monitoring for the instances.

                • Enabled (boolean) --

                  Enables monitoring for the instance.

                  Default: false

              • NetworkInterfaces (list) --

                One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

                Note

                SpotFleetLaunchSpecification currently does not support Elastic Fabric Adapter (EFA). To specify an EFA, you must use LaunchTemplateConfig .

                • (dict) --

                  Describes a network interface.

                  • AssociatePublicIpAddress (boolean) --

                    Indicates whether to assign a public IPv4 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 .

                  • 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.

                  • Description (string) --

                    The description of the network interface. Applies only if creating a network interface when launching an instance.

                  • DeviceIndex (integer) --

                    The position of the network interface in the attachment order. A primary network interface has a device index of 0.

                    If you specify a network interface when launching an instance, you must specify the device index.

                  • Groups (list) --

                    The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                    • (string) --
                  • Ipv6AddressCount (integer) --

                    A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

                  • Ipv6Addresses (list) --

                    One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                    • (dict) --

                      Describes an IPv6 address.

                      • Ipv6Address (string) --

                        The IPv6 address.

                  • NetworkInterfaceId (string) --

                    The ID of the network interface.

                    If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

                  • PrivateIpAddress (string) --

                    The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                  • PrivateIpAddresses (list) --

                    One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                    • (dict) --

                      Describes a secondary private IPv4 address for a network interface.

                      • Primary (boolean) --

                        Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                      • PrivateIpAddress (string) --

                        The private IPv4 addresses.

                  • SecondaryPrivateIpAddressCount (integer) --

                    The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                  • SubnetId (string) --

                    The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

                  • AssociateCarrierIpAddress (boolean) --

                    Indicates whether to assign a carrier IP address to the network interface.

                    You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

                  • InterfaceType (string) --

                    The type of network interface.

                    Valid values: interface | efa

                  • NetworkCardIndex (integer) --

                    The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

                    If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

                  • Ipv4Prefixes (list) --

                    One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

                  • Ipv4PrefixCount (integer) --

                    The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

                  • Ipv6Prefixes (list) --

                    One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

                    • (dict) --

                      Describes the IPv4 prefix option for a network interface.

                      • Ipv6Prefix (string) --

                        The IPv6 prefix.

                  • Ipv6PrefixCount (integer) --

                    The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

              • 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.

                • 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 Spot Instances.

              • RamdiskId (string) --

                The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the Amazon Web Services Resource Center and search for the kernel ID.

              • SpotPrice (string) --

                The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                Warning

                If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

              • SubnetId (string) --

                The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".

              • UserData (string) --

                The Base64-encoded user data that instances use when starting up.

              • 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 of 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, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.

              • TagSpecifications (list) --

                The tags to apply during creation.

                • (dict) --

                  The tags for a Spot Fleet resource.

                  • ResourceType (string) --

                    The type of resource. Currently, the only resource type that is supported is instance . To tag the Spot Fleet request on creation, use the TagSpecifications parameter in ` SpotFleetRequestConfigData https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html`__ .

                  • Tags (list) --

                    The tags.

                    • (dict) --

                      Describes a tag.

                      • Key (string) --

                        The key of the tag.

                        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

                      • Value (string) --

                        The value of the tag.

                        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

              • InstanceRequirements (dict) --

                The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

                Note

                If you specify InstanceRequirements , you can't specify InstanceTypes .

                • VCpuCount (dict) --

                  The minimum and maximum number of vCPUs.

                  • Min (integer) --

                    The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                  • Max (integer) --

                    The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                • MemoryMiB (dict) --

                  The minimum and maximum amount of memory, in MiB.

                  • Min (integer) --

                    The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                • CpuManufacturers (list) --

                  The CPU manufacturers to include.

                  • For instance types with Intel CPUs, specify intel .
                  • For instance types with AMD CPUs, specify amd .
                  • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                  Note

                  Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                  Default: Any manufacturer

                  • (string) --
                • MemoryGiBPerVCpu (dict) --

                  The minimum and maximum amount of memory per vCPU, in GiB.

                  Default: No minimum or maximum limits

                  • Min (float) --

                    The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                  • Max (float) --

                    The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                • ExcludedInstanceTypes (list) --

                  The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                  For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                  Default: No excluded instance types

                  • (string) --
                • InstanceGenerations (list) --

                  Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                  For current generation instance types, specify current .

                  For previous generation instance types, specify previous .

                  Default: Current and previous generation instance types

                  • (string) --
                • SpotMaxPricePercentageOverLowestPrice (integer) --

                  The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999 .

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                  Note

                  If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                  Default: 100

                • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                  The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                  The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                  To turn off price protection, specify a high value, such as 999999 .

                  This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                  Note

                  If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                  Default: 20

                • BareMetal (string) --

                  Indicates whether bare metal instance types must be included, excluded, or required.

                  • To include bare metal instance types, specify included .
                  • To require only bare metal instance types, specify required .
                  • To exclude bare metal instance types, specify excluded .

                  Default: excluded

                • BurstablePerformance (string) --

                  Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                  • To include burstable performance instance types, specify included .
                  • To require only burstable performance instance types, specify required .
                  • To exclude burstable performance instance types, specify excluded .

                  Default: excluded

                • RequireHibernateSupport (boolean) --

                  Indicates whether instance types must support hibernation for On-Demand Instances.

                  This parameter is not supported for GetSpotPlacementScores .

                  Default: false

                • NetworkInterfaceCount (dict) --

                  The minimum and maximum number of network interfaces.

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                • LocalStorage (string) --

                  Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                  • To include instance types with instance store volumes, specify included .
                  • To require only instance types with instance store volumes, specify required .
                  • To exclude instance types with instance store volumes, specify excluded .

                  Default: included

                • LocalStorageTypes (list) --

                  The type of local storage that is required.

                  • For instance types with hard disk drive (HDD) storage, specify hdd .
                  • For instance types with solid state drive (SSD) storage, specify ssd .

                  Default: hdd and ssd

                  • (string) --
                • TotalLocalStorageGB (dict) --

                  The minimum and maximum amount of total local storage, in GB.

                  Default: No minimum or maximum limits

                  • Min (float) --

                    The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                  • Max (float) --

                    The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                • BaselineEbsBandwidthMbps (dict) --

                  The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                • AcceleratorTypes (list) --

                  The accelerator types that must be on the instance type.

                  • For instance types with GPU accelerators, specify gpu .
                  • For instance types with FPGA accelerators, specify fpga .
                  • For instance types with inference accelerators, specify inference .

                  Default: Any accelerator type

                  • (string) --
                • AcceleratorCount (dict) --

                  The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                  To exclude accelerator-enabled instance types, set Max to 0 .

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                • AcceleratorManufacturers (list) --

                  Indicates whether instance types must have accelerators by specific manufacturers.

                  • For instance types with NVIDIA devices, specify nvidia .
                  • For instance types with AMD devices, specify amd .
                  • For instance types with Amazon Web Services devices, specify amazon-web-services .
                  • For instance types with Xilinx devices, specify xilinx .

                  Default: Any manufacturer

                  • (string) --
                • AcceleratorNames (list) --

                  The accelerators that must be on the instance type.

                  • For instance types with NVIDIA A100 GPUs, specify a100 .
                  • For instance types with NVIDIA V100 GPUs, specify v100 .
                  • For instance types with NVIDIA K80 GPUs, specify k80 .
                  • For instance types with NVIDIA T4 GPUs, specify t4 .
                  • For instance types with NVIDIA M60 GPUs, specify m60 .
                  • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                  • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                  Default: Any accelerator

                  • (string) --
                • AcceleratorTotalMemoryMiB (dict) --

                  The minimum and maximum amount of total accelerator memory, in MiB.

                  Default: No minimum or maximum limits

                  • Min (integer) --

                    The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                  • Max (integer) --

                    The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • LaunchTemplateConfigs (list) --

            The launch template and overrides. If you specify LaunchTemplateConfigs , you can't specify LaunchSpecifications . If you include On-Demand capacity in your request, you must use LaunchTemplateConfigs .

            • (dict) --

              Describes a launch template and overrides.

              • LaunchTemplateSpecification (dict) --

                The launch template.

                • LaunchTemplateId (string) --

                  The ID of the launch template.

                  You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

                • LaunchTemplateName (string) --

                  The name of the launch template.

                  You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

                • Version (string) --

                  The launch template version number, $Latest , or $Default . You must specify a value, otherwise the request fails.

                  If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

                  If the value is $Default , Amazon EC2 uses the default version of the launch template.

              • Overrides (list) --

                Any parameters that you specify override the same parameters in the launch template.

                • (dict) --

                  Describes overrides for a launch template.

                  • InstanceType (string) --

                    The instance type.

                  • SpotPrice (string) --

                    The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

                    Warning

                    If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

                  • SubnetId (string) --

                    The ID of the subnet in which to launch the instances.

                  • AvailabilityZone (string) --

                    The Availability Zone in which to launch the instances.

                  • WeightedCapacity (float) --

                    The number of units provided by the specified instance type.

                  • Priority (float) --

                    The priority for the launch template override. The highest priority is launched first.

                    If OnDemandAllocationStrategy is set to prioritized , Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.

                    If the Spot AllocationStrategy is set to capacityOptimizedPrioritized , Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.

                    Valid values are whole numbers starting at 0 . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.

                  • InstanceRequirements (dict) --

                    The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.

                    Note

                    If you specify InstanceRequirements , you can't specify InstanceTypes .

                    • VCpuCount (dict) --

                      The minimum and maximum number of vCPUs.

                      • Min (integer) --

                        The minimum number of vCPUs. If the value is 0 , there is no minimum limit.

                      • Max (integer) --

                        The maximum number of vCPUs. If this parameter is not specified, there is no maximum limit.

                    • MemoryMiB (dict) --

                      The minimum and maximum amount of memory, in MiB.

                      • Min (integer) --

                        The minimum amount of memory, in MiB. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum amount of memory, in MiB. If this parameter is not specified, there is no maximum limit.

                    • CpuManufacturers (list) --

                      The CPU manufacturers to include.

                      • For instance types with Intel CPUs, specify intel .
                      • For instance types with AMD CPUs, specify amd .
                      • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

                      Note

                      Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

                      Default: Any manufacturer

                      • (string) --
                    • MemoryGiBPerVCpu (dict) --

                      The minimum and maximum amount of memory per vCPU, in GiB.

                      Default: No minimum or maximum limits

                      • Min (float) --

                        The minimum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no minimum limit.

                      • Max (float) --

                        The maximum amount of memory per vCPU, in GiB. If this parameter is not specified, there is no maximum limit.

                    • ExcludedInstanceTypes (list) --

                      The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

                      For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

                      Default: No excluded instance types

                      • (string) --
                    • InstanceGenerations (list) --

                      Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

                      For current generation instance types, specify current .

                      For previous generation instance types, specify previous .

                      Default: Current and previous generation instance types

                      • (string) --
                    • SpotMaxPricePercentageOverLowestPrice (integer) --

                      The price protection threshold for Spot Instances. This is the maximum you’ll pay for a Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                      To turn off price protection, specify a high value, such as 999999 .

                      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                      Note

                      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                      Default: 100

                    • OnDemandMaxPricePercentageOverLowestPrice (integer) --

                      The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

                      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

                      To turn off price protection, specify a high value, such as 999999 .

                      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

                      Note

                      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

                      Default: 20

                    • BareMetal (string) --

                      Indicates whether bare metal instance types must be included, excluded, or required.

                      • To include bare metal instance types, specify included .
                      • To require only bare metal instance types, specify required .
                      • To exclude bare metal instance types, specify excluded .

                      Default: excluded

                    • BurstablePerformance (string) --

                      Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

                      • To include burstable performance instance types, specify included .
                      • To require only burstable performance instance types, specify required .
                      • To exclude burstable performance instance types, specify excluded .

                      Default: excluded

                    • RequireHibernateSupport (boolean) --

                      Indicates whether instance types must support hibernation for On-Demand Instances.

                      This parameter is not supported for GetSpotPlacementScores .

                      Default: false

                    • NetworkInterfaceCount (dict) --

                      The minimum and maximum number of network interfaces.

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum number of network interfaces. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum number of network interfaces. If this parameter is not specified, there is no maximum limit.

                    • LocalStorage (string) --

                      Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

                      • To include instance types with instance store volumes, specify included .
                      • To require only instance types with instance store volumes, specify required .
                      • To exclude instance types with instance store volumes, specify excluded .

                      Default: included

                    • LocalStorageTypes (list) --

                      The type of local storage that is required.

                      • For instance types with hard disk drive (HDD) storage, specify hdd .
                      • For instance types with solid state drive (SSD) storage, specify ssd .

                      Default: hdd and ssd

                      • (string) --
                    • TotalLocalStorageGB (dict) --

                      The minimum and maximum amount of total local storage, in GB.

                      Default: No minimum or maximum limits

                      • Min (float) --

                        The minimum amount of total local storage, in GB. If this parameter is not specified, there is no minimum limit.

                      • Max (float) --

                        The maximum amount of total local storage, in GB. If this parameter is not specified, there is no maximum limit.

                    • BaselineEbsBandwidthMbps (dict) --

                      The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum baseline bandwidth, in Mbps. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum baseline bandwidth, in Mbps. If this parameter is not specified, there is no maximum limit.

                    • AcceleratorTypes (list) --

                      The accelerator types that must be on the instance type.

                      • For instance types with GPU accelerators, specify gpu .
                      • For instance types with FPGA accelerators, specify fpga .
                      • For instance types with inference accelerators, specify inference .

                      Default: Any accelerator type

                      • (string) --
                    • AcceleratorCount (dict) --

                      The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

                      To exclude accelerator-enabled instance types, set Max to 0 .

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum number of accelerators. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum number of accelerators. If this parameter is not specified, there is no maximum limit.

                    • AcceleratorManufacturers (list) --

                      Indicates whether instance types must have accelerators by specific manufacturers.

                      • For instance types with NVIDIA devices, specify nvidia .
                      • For instance types with AMD devices, specify amd .
                      • For instance types with Amazon Web Services devices, specify amazon-web-services .
                      • For instance types with Xilinx devices, specify xilinx .

                      Default: Any manufacturer

                      • (string) --
                    • AcceleratorNames (list) --

                      The accelerators that must be on the instance type.

                      • For instance types with NVIDIA A100 GPUs, specify a100 .
                      • For instance types with NVIDIA V100 GPUs, specify v100 .
                      • For instance types with NVIDIA K80 GPUs, specify k80 .
                      • For instance types with NVIDIA T4 GPUs, specify t4 .
                      • For instance types with NVIDIA M60 GPUs, specify m60 .
                      • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
                      • For instance types with Xilinx VU9P FPGAs, specify vu9p .

                      Default: Any accelerator

                      • (string) --
                    • AcceleratorTotalMemoryMiB (dict) --

                      The minimum and maximum amount of total accelerator memory, in MiB.

                      Default: No minimum or maximum limits

                      • Min (integer) --

                        The minimum amount of accelerator memory, in MiB. If this parameter is not specified, there is no minimum limit.

                      • Max (integer) --

                        The maximum amount of accelerator memory, in MiB. If this parameter is not specified, there is no maximum limit.

          • SpotPrice (string) --

            The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

            Warning

            If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

          • TargetCapacity (integer) --

            The number of units to request for the Spot Fleet. 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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

          • OnDemandTargetCapacity (integer) --

            The number of On-Demand 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. If the request type is maintain , you can specify a target capacity of 0 and add capacity later.

          • OnDemandMaxTotalPrice (string) --

            The maximum amount per hour for On-Demand Instances that you're willing to pay. You can use the onDemandMaxTotalPrice parameter, the spotMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

          • SpotMaxTotalPrice (string) --

            The maximum amount per hour for Spot Instances that you're willing to pay. You can use the spotdMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter, or both parameters to ensure that your fleet cost does not exceed your budget. If you set a maximum price per hour for the On-Demand Instances and Spot Instances in your request, Spot Fleet will launch instances until it reaches the maximum amount you're willing to pay. When the maximum amount you're willing to pay is reached, the fleet stops launching instances even if it hasn’t met the target capacity.

          • TerminateInstancesWithExpiration (boolean) --

            Indicates whether running Spot Instances are terminated when the Spot Fleet request expires.

          • Type (string) --

            The type of request. Indicates whether the Spot Fleet only requests the target capacity or also attempts to maintain it. When this value is request , the Spot Fleet only places the required requests. It does not attempt to replenish Spot Instances if capacity is diminished, nor does it submit requests in alternative Spot pools if capacity is not available. When this value is maintain , the Spot Fleet maintains the target capacity. The Spot Fleet places the required requests to meet capacity and automatically replenishes any interrupted instances. Default: maintain . instant is listed but is not used by Spot Fleet.

          • ValidFrom (datetime) --

            The start date and time of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). By default, Amazon EC2 starts fulfilling the request immediately.

          • ValidUntil (datetime) --

            The end date and time of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). After the end date and time, no new Spot Instance requests are placed or able to fulfill the request. If no value is specified, the Spot Fleet request remains until you cancel it.

          • ReplaceUnhealthyInstances (boolean) --

            Indicates whether Spot Fleet should replace unhealthy instances.

          • InstanceInterruptionBehavior (string) --

            The behavior when a Spot Instance is interrupted. The default is terminate .

          • LoadBalancersConfig (dict) --

            One or more Classic Load Balancers and target groups to attach to the Spot Fleet request. Spot Fleet registers the running Spot Instances with the specified Classic Load Balancers and target groups.

            With Network Load Balancers, Spot Fleet cannot register instances that have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1.

            • ClassicLoadBalancersConfig (dict) --

              The Classic Load Balancers.

              • ClassicLoadBalancers (list) --

                One or more Classic Load Balancers.

                • (dict) --

                  Describes a Classic Load Balancer.

                  • Name (string) --

                    The name of the load balancer.

            • TargetGroupsConfig (dict) --

              The target groups.

              • TargetGroups (list) --

                One or more target groups.

                • (dict) --

                  Describes a load balancer target group.

                  • Arn (string) --

                    The Amazon Resource Name (ARN) of the target group.

          • InstancePoolsToUseCount (integer) --

            The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to lowest-price . Spot Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.

            Note that Spot Fleet attempts to draw Spot Instances from the number of pools that you specify on a best effort basis. If a pool runs out of Spot capacity before fulfilling your target capacity, Spot Fleet will continue to fulfill your request by drawing from the next cheapest pool. To ensure that your target capacity is met, you might receive Spot Instances from more than the number of pools that you specified. Similarly, if most of the pools have no Spot capacity, you might receive your full target capacity from fewer than the number of pools that you specified.

          • Context (string) --

            Reserved.

          • TargetCapacityUnitType (string) --

            The unit for the target capacity.

            Default: units (translates to number of instances)

          • TagSpecifications (list) --

            The key-value pair for tagging the Spot Fleet request on creation. The value for ResourceType must be spot-fleet-request , otherwise the Spot Fleet request fails. To tag instances at launch, specify the tags in the launch template (valid only if you use LaunchTemplateConfigs ) or in the ` SpotFleetTagSpecification https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html`__ (valid only if you use LaunchSpecifications ). For information about tagging after launch, see Tagging Your Resources .

            • (dict) --

              The tags to apply to a resource when the resource is being created.

              Note

              The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

              • ResourceType (string) --

                The type of resource to tag on creation.

              • Tags (list) --

                The tags to apply 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 256 Unicode characters.

        • SpotFleetRequestId (string) --

          The ID of the Spot Fleet request.

        • SpotFleetRequestState (string) --

          The state of the Spot Fleet request.

        • Tags (list) --

          The tags for a Spot Fleet 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 256 Unicode characters.

class EC2.Paginator.DescribeSpotInstanceRequests
paginator = client.get_paginator('describe_spot_instance_requests')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_spot_instance_requests().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    SpotInstanceRequestIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    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 EBS volume is deleted on instance termination.
    • launch.block-device-mapping.device-name - The device name for the volume in the block device mapping (for example, /dev/sdh or xvdh ).
    • launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS volume.
    • launch.block-device-mapping.volume-size - The size of the EBS volume, in GiB.
    • launch.block-device-mapping.volume-type - The type of EBS volume: gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic.
    • launch.group-id - The ID of the security group for the instance.
    • launch.group-name - The name of 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 detailed monitoring is enabled for the Spot Instance.
    • launch.ramdisk-id - The RAM disk ID.
    • launched-availability-zone - The Availability Zone in which the request is launched.
    • network-interface.addresses.primary - Indicates whether the IP address is the primary private IP address.
    • network-interface.delete-on-termination - Indicates whether the network interface is deleted when the instance is terminated.
    • network-interface.description - A description of the network interface.
    • network-interface.device-index - The index of the device for the network interface attachment on the instance.
    • network-interface.group-id - The ID of the security group associated with the network interface.
    • network-interface.network-interface-id - The ID of the network interface.
    • network-interface.private-ip-address - The primary private IP address of the network interface.
    • network-interface.subnet-id - The ID of the subnet for the instance.
    • 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 request status information can help you track your Amazon EC2 Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances .
    • 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • type - The type of Spot Instance request (one-time | persistent ).
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotInstanceRequestIds (list) --

    One or more Spot Instance request IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'SpotInstanceRequests': [
        {
            'ActualBlockHourlyPrice': 'string',
            'AvailabilityZoneGroup': 'string',
            'BlockDurationMinutes': 123,
            'CreateTime': datetime(2015, 1, 1),
            'Fault': {
                'Code': 'string',
                'Message': 'string'
            },
            'InstanceId': 'string',
            'LaunchGroup': 'string',
            'LaunchSpecification': {
                'UserData': 'string',
                'SecurityGroups': [
                    {
                        'GroupName': 'string',
                        'GroupId': 'string'
                    },
                ],
                'AddressingType': 'string',
                'BlockDeviceMappings': [
                    {
                        'DeviceName': 'string',
                        'VirtualName': 'string',
                        'Ebs': {
                            'DeleteOnTermination': True|False,
                            'Iops': 123,
                            'SnapshotId': 'string',
                            'VolumeSize': 123,
                            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                            'KmsKeyId': 'string',
                            'Throughput': 123,
                            'OutpostArn': 'string',
                            'Encrypted': True|False
                        },
                        'NoDevice': 'string'
                    },
                ],
                'EbsOptimized': True|False,
                'IamInstanceProfile': {
                    'Arn': 'string',
                    'Name': 'string'
                },
                'ImageId': 'string',
                'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
                'KernelId': 'string',
                'KeyName': 'string',
                'NetworkInterfaces': [
                    {
                        'AssociatePublicIpAddress': True|False,
                        'DeleteOnTermination': True|False,
                        'Description': 'string',
                        'DeviceIndex': 123,
                        'Groups': [
                            'string',
                        ],
                        'Ipv6AddressCount': 123,
                        'Ipv6Addresses': [
                            {
                                'Ipv6Address': 'string'
                            },
                        ],
                        'NetworkInterfaceId': 'string',
                        'PrivateIpAddress': 'string',
                        'PrivateIpAddresses': [
                            {
                                'Primary': True|False,
                                'PrivateIpAddress': 'string'
                            },
                        ],
                        'SecondaryPrivateIpAddressCount': 123,
                        'SubnetId': 'string',
                        'AssociateCarrierIpAddress': True|False,
                        'InterfaceType': 'string',
                        'NetworkCardIndex': 123,
                        'Ipv4Prefixes': [
                            {
                                'Ipv4Prefix': 'string'
                            },
                        ],
                        'Ipv4PrefixCount': 123,
                        'Ipv6Prefixes': [
                            {
                                'Ipv6Prefix': 'string'
                            },
                        ],
                        'Ipv6PrefixCount': 123
                    },
                ],
                'Placement': {
                    'AvailabilityZone': 'string',
                    'GroupName': 'string',
                    'Tenancy': 'default'|'dedicated'|'host'
                },
                'RamdiskId': 'string',
                'SubnetId': 'string',
                'Monitoring': {
                    'Enabled': True|False
                }
            },
            'LaunchedAvailabilityZone': 'string',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'SpotInstanceRequestId': 'string',
            'SpotPrice': 'string',
            'State': 'open'|'active'|'closed'|'cancelled'|'failed',
            'Status': {
                'Code': 'string',
                'Message': 'string',
                'UpdateTime': datetime(2015, 1, 1)
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'Type': 'one-time'|'persistent',
            'ValidFrom': datetime(2015, 1, 1),
            'ValidUntil': datetime(2015, 1, 1),
            'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
        },
    ],

}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotInstanceRequests.

    • SpotInstanceRequests (list) --

      One or more Spot Instance requests.

      • (dict) --

        Describes a Spot Instance request.

        • ActualBlockHourlyPrice (string) --

          Deprecated.

        • 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.

        • BlockDurationMinutes (integer) --

          Deprecated.

        • 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).

        • 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.

        • InstanceId (string) --

          The instance ID, if an instance has been launched to fulfill the Spot Instance request.

        • LaunchGroup (string) --

          The instance launch group. Launch groups are Spot Instances that launch together and terminate together.

        • LaunchSpecification (dict) --

          Additional information for launching instances.

          • UserData (string) --

            The Base64-encoded user data for the instance.

          • 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.

          • AddressingType (string) --

            Deprecated.

          • BlockDeviceMappings (list) --

            One or more block device mapping entries.

            • (dict) --

              Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

              • DeviceName (string) --

                The device name (for example, /dev/sdh or xvdh ).

              • 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.

                NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

                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.

              • Ebs (dict) --

                Parameters used to automatically set up EBS volumes when the instance is launched.

                • DeleteOnTermination (boolean) --

                  Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

                • Iops (integer) --

                  The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

                  The following are the supported values for each volume type:

                  • gp3 : 3,000-16,000 IOPS
                  • io1 : 100-64,000 IOPS
                  • io2 : 100-64,000 IOPS

                  For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

                  This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

                • SnapshotId (string) --

                  The ID of the snapshot.

                • VolumeSize (integer) --

                  The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

                  The following are the supported volumes sizes for each volume type:

                  • gp2 and gp3 :1-16,384
                  • io1 and io2 : 4-16,384
                  • st1 and sc1 : 125-16,384
                  • standard : 1-1,024
                • VolumeType (string) --

                  The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

                • KmsKeyId (string) --

                  Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

                  This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

                • Throughput (integer) --

                  The throughput that the volume supports, in MiB/s.

                  This parameter is valid only for gp3 volumes.

                  Valid Range: Minimum value of 125. Maximum value of 1000.

                • OutpostArn (string) --

                  The ARN of the Outpost on which the snapshot is stored.

                  This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

                • Encrypted (boolean) --

                  Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

                  In no case can you remove encryption from an encrypted volume.

                  Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

                  This parameter is not returned by DescribeImageAttribute .

              • NoDevice (string) --

                To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

          • 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

          • 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.

          • ImageId (string) --

            The ID of the AMI.

          • InstanceType (string) --

            The instance type. Only one instance type can be specified.

          • KernelId (string) --

            The ID of the kernel.

          • KeyName (string) --

            The name of the key pair.

          • NetworkInterfaces (list) --

            One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.

            • (dict) --

              Describes a network interface.

              • AssociatePublicIpAddress (boolean) --

                Indicates whether to assign a public IPv4 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 .

              • 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.

              • Description (string) --

                The description of the network interface. Applies only if creating a network interface when launching an instance.

              • DeviceIndex (integer) --

                The position of the network interface in the attachment order. A primary network interface has a device index of 0.

                If you specify a network interface when launching an instance, you must specify the device index.

              • Groups (list) --

                The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

                • (string) --
              • Ipv6AddressCount (integer) --

                A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

              • Ipv6Addresses (list) --

                One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

                • (dict) --

                  Describes an IPv6 address.

                  • Ipv6Address (string) --

                    The IPv6 address.

              • NetworkInterfaceId (string) --

                The ID of the network interface.

                If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

              • PrivateIpAddress (string) --

                The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • PrivateIpAddresses (list) --

                One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

                • (dict) --

                  Describes a secondary private IPv4 address for a network interface.

                  • Primary (boolean) --

                    Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

                  • PrivateIpAddress (string) --

                    The private IPv4 addresses.

              • SecondaryPrivateIpAddressCount (integer) --

                The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

              • SubnetId (string) --

                The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

              • AssociateCarrierIpAddress (boolean) --

                Indicates whether to assign a carrier IP address to the network interface.

                You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

              • InterfaceType (string) --

                The type of network interface.

                Valid values: interface | efa

              • NetworkCardIndex (integer) --

                The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

                If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

              • Ipv4Prefixes (list) --

                One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

              • Ipv4PrefixCount (integer) --

                The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

              • Ipv6Prefixes (list) --

                One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

                • (dict) --

                  Describes the IPv4 prefix option for a network interface.

                  • Ipv6Prefix (string) --

                    The IPv6 prefix.

              • Ipv6PrefixCount (integer) --

                The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

          • 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.

            • 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 Spot Instances.

          • RamdiskId (string) --

            The ID of the RAM disk.

          • SubnetId (string) --

            The ID of the subnet in which to launch the instance.

          • Monitoring (dict) --

            Describes the monitoring of an instance.

            • Enabled (boolean) --

              Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

        • LaunchedAvailabilityZone (string) --

          The Availability Zone in which the request is launched.

        • ProductDescription (string) --

          The product description associated with the Spot Instance.

        • SpotInstanceRequestId (string) --

          The ID of the Spot Instance request.

        • SpotPrice (string) --

          The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • State (string) --

          The state of the Spot Instance request. Spot request status information helps track your Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances .

        • 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 request status codes in the Amazon EC2 User Guide for Linux Instances .

          • Message (string) --

            The description for the status code.

          • 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).

        • 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 256 Unicode characters.

        • Type (string) --

          The Spot Instance request type.

        • 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 (YYYY -MM -DD T*HH* :MM :SS Z).

          • For a persistent request, the request remains active until the validUntil date and time is reached. Otherwise, the request remains active until you cancel it.
          • For a one-time request, the request remains active until all instances launch, the request is canceled, or the validUntil date and time is reached. By default, the request is valid for 7 days from the date the request was created.
        • InstanceInterruptionBehavior (string) --

          The behavior when a Spot Instance is interrupted.

class EC2.Paginator.DescribeSpotPriceHistory
paginator = client.get_paginator('describe_spot_price_history')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_spot_price_history().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    AvailabilityZone='string',
    DryRun=True|False,
    EndTime=datetime(2015, 1, 1),
    InstanceTypes=[
        'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    ],
    ProductDescriptions=[
        'string',
    ],
    StartTime=datetime(2015, 1, 1),
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    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 | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | Red Hat Enterprise Linux (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 time stamp 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • AvailabilityZone (string) -- Filters the results by the specified Availability Zone.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EndTime (datetime) -- 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).
  • InstanceTypes (list) --

    Filters the results by the specified instance types.

    • (string) --
  • ProductDescriptions (list) --

    Filters the results by the specified basic product descriptions.

    • (string) --
  • StartTime (datetime) -- 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).
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'SpotPriceHistory': [
        {
            'AvailabilityZone': 'string',
            'InstanceType': 'a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
            'ProductDescription': 'Linux/UNIX'|'Linux/UNIX (Amazon VPC)'|'Windows'|'Windows (Amazon VPC)',
            'SpotPrice': 'string',
            'Timestamp': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    Contains the output of DescribeSpotPriceHistory.

    • SpotPriceHistory (list) --

      The historical Spot prices.

      • (dict) --

        The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

        Warning

        If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • AvailabilityZone (string) --

          The Availability Zone.

        • InstanceType (string) --

          The instance type.

        • ProductDescription (string) --

          A general description of the AMI.

        • SpotPrice (string) --

          The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

          Warning

          If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.

        • Timestamp (datetime) --

          The date and time the request was created, in UTC format (for example, YYYY -MM -DD T*HH* :MM :SS Z).

class EC2.Paginator.DescribeStaleSecurityGroups
paginator = client.get_paginator('describe_stale_security_groups')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_stale_security_groups().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    VpcId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'StaleSecurityGroupSet': [
        {
            'Description': 'string',
            'GroupId': 'string',
            'GroupName': 'string',
            'StaleIpPermissions': [
                {
                    'FromPort': 123,
                    'IpProtocol': 'string',
                    'IpRanges': [
                        'string',
                    ],
                    'PrefixListIds': [
                        'string',
                    ],
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'Description': 'string',
                            'GroupId': 'string',
                            'GroupName': 'string',
                            'PeeringStatus': 'string',
                            'UserId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string'
                        },
                    ]
                },
            ],
            'StaleIpPermissionsEgress': [
                {
                    'FromPort': 123,
                    'IpProtocol': 'string',
                    'IpRanges': [
                        'string',
                    ],
                    'PrefixListIds': [
                        'string',
                    ],
                    'ToPort': 123,
                    'UserIdGroupPairs': [
                        {
                            'Description': 'string',
                            'GroupId': 'string',
                            'GroupName': 'string',
                            'PeeringStatus': 'string',
                            'UserId': 'string',
                            'VpcId': 'string',
                            'VpcPeeringConnectionId': 'string'
                        },
                    ]
                },
            ],
            'VpcId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • StaleSecurityGroupSet (list) --

      Information about the stale security groups.

      • (dict) --

        Describes a stale security group (a security group that contains stale rules).

        • Description (string) --

          The description of the security group.

        • GroupId (string) --

          The ID of the security group.

        • GroupName (string) --

          The name of the security group.

        • StaleIpPermissions (list) --

          Information about the stale inbound rules in the security group.

          • (dict) --

            Describes a stale rule in a security group.

            • FromPort (integer) --

              The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

            • IpProtocol (string) --

              The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers) .

            • IpRanges (list) --

              The IP ranges. Not applicable for stale security group rules.

              • (string) --
            • PrefixListIds (list) --

              The prefix list IDs. Not applicable for stale security group rules.

              • (string) --
            • ToPort (integer) --

              The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

            • UserIdGroupPairs (list) --

              The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

                • 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.

        • StaleIpPermissionsEgress (list) --

          Information about the stale outbound rules in the security group.

          • (dict) --

            Describes a stale rule in a security group.

            • FromPort (integer) --

              The start of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

            • IpProtocol (string) --

              The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol Numbers) .

            • IpRanges (list) --

              The IP ranges. Not applicable for stale security group rules.

              • (string) --
            • PrefixListIds (list) --

              The prefix list IDs. Not applicable for stale security group rules.

              • (string) --
            • ToPort (integer) --

              The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

            • UserIdGroupPairs (list) --

              The security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.

              • (dict) --

                Describes a security group and Amazon Web Services account ID pair.

                Note

                We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

                • Description (string) --

                  A description for the security group rule that references this user ID group pair.

                  Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

                • GroupId (string) --

                  The ID of the security group.

                • 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 the security group ID.

                  For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

                • PeeringStatus (string) --

                  The status of a VPC peering connection, if applicable.

                • UserId (string) --

                  The ID of an Amazon Web Services account.

                  For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

                  [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

                • 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.

        • VpcId (string) --

          The ID of the VPC for the security group.

class EC2.Paginator.DescribeStoreImageTasks
paginator = client.get_paginator('describe_store_image_tasks')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_store_image_tasks().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ImageIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ImageIds (list) --

    The AMI IDs for which to show progress. Up to 20 AMI IDs can be included in a request.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • task-state - Returns tasks in a certain state (InProgress | Completed | Failed )
    • bucket - Returns task information for tasks that targeted a specific bucket. For the filter value, specify the bucket name.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'StoreImageTaskResults': [
        {
            'AmiId': 'string',
            'TaskStartTime': datetime(2015, 1, 1),
            'Bucket': 'string',
            'S3objectKey': 'string',
            'ProgressPercentage': 123,
            'StoreTaskState': 'string',
            'StoreTaskFailureReason': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • StoreImageTaskResults (list) --

      The information about the AMI store tasks.

      • (dict) --

        The information about the AMI store task, including the progress of the task.

        • AmiId (string) --

          The ID of the AMI that is being stored.

        • TaskStartTime (datetime) --

          The time the task started.

        • Bucket (string) --

          The name of the Amazon S3 bucket that contains the stored AMI object.

        • S3objectKey (string) --

          The name of the stored AMI object in the bucket.

        • ProgressPercentage (integer) --

          The progress of the task as a percentage.

        • StoreTaskState (string) --

          The state of the store task (InProgress , Completed , or Failed ).

        • StoreTaskFailureReason (string) --

          If the tasks fails, the reason for the failure is returned. If the task succeeds, null is returned.

class EC2.Paginator.DescribeSubnets
paginator = client.get_paginator('describe_subnets')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_subnets().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SubnetIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • availability-zone - The Availability Zone for the subnet. You can also use availabilityZone as the filter name.
    • availability-zone-id - The ID of the Availability Zone for the subnet. You can also use availabilityZoneId as the filter name.
    • available-ip-address-count - The number of IPv4 addresses in the subnet that are available.
    • cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.
    • default-for-az - Indicates whether this is the default subnet for the Availability Zone (true | false ). You can also use defaultForAz as the filter name.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the subnet.
    • ipv6-native - Indicates whether this is an IPv6 only subnet (true | false ).
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the subnet.
    • state - The state of the subnet (pending | available ).
    • subnet-arn - The Amazon Resource Name (ARN) of the subnet.
    • subnet-id - The ID of the subnet.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the subnet.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • SubnetIds (list) --

    One or more subnet IDs.

    Default: Describes all your subnets.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Subnets': [
        {
            'AvailabilityZone': 'string',
            'AvailabilityZoneId': 'string',
            'AvailableIpAddressCount': 123,
            'CidrBlock': 'string',
            'DefaultForAz': True|False,
            'EnableLniAtDeviceIndex': 123,
            'MapPublicIpOnLaunch': True|False,
            'MapCustomerOwnedIpOnLaunch': True|False,
            'CustomerOwnedIpv4Pool': 'string',
            'State': 'pending'|'available',
            'SubnetId': 'string',
            'VpcId': 'string',
            'OwnerId': 'string',
            'AssignIpv6AddressOnCreation': True|False,
            'Ipv6CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'Ipv6CidrBlock': 'string',
                    'Ipv6CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'SubnetArn': 'string',
            'OutpostArn': 'string',
            'EnableDns64': True|False,
            'Ipv6Native': True|False,
            'PrivateDnsNameOptionsOnLaunch': {
                'HostnameType': 'ip-name'|'resource-name',
                'EnableResourceNameDnsARecord': True|False,
                'EnableResourceNameDnsAAAARecord': True|False
            }
        },
    ],

}

Response Structure

  • (dict) --

    • Subnets (list) --

      Information about one or more subnets.

      • (dict) --

        Describes a subnet.

        • AvailabilityZone (string) --

          The Availability Zone of the subnet.

        • AvailabilityZoneId (string) --

          The AZ ID of the subnet.

        • AvailableIpAddressCount (integer) --

          The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

        • CidrBlock (string) --

          The IPv4 CIDR block assigned to the subnet.

        • DefaultForAz (boolean) --

          Indicates whether this is the default subnet for the Availability Zone.

        • EnableLniAtDeviceIndex (integer) --

          Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).

        • MapPublicIpOnLaunch (boolean) --

          Indicates whether instances launched in this subnet receive a public IPv4 address.

        • MapCustomerOwnedIpOnLaunch (boolean) --

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives a customer-owned IPv4 address.

        • CustomerOwnedIpv4Pool (string) --

          The customer-owned IPv4 address pool associated with the subnet.

        • State (string) --

          The current state of the subnet.

        • SubnetId (string) --

          The ID of the subnet.

        • VpcId (string) --

          The ID of the VPC the subnet is in.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the subnet.

        • AssignIpv6AddressOnCreation (boolean) --

          Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives an IPv6 address.

        • Ipv6CidrBlockAssociationSet (list) --

          Information about the IPv6 CIDR blocks associated with the subnet.

          • (dict) --

            Describes an association between a subnet and an IPv6 CIDR block.

            • AssociationId (string) --

              The ID of the association.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

            • Ipv6CidrBlockState (dict) --

              The state of the CIDR block.

              • State (string) --

                The state of a CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

        • Tags (list) --

          Any tags assigned to the subnet.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • SubnetArn (string) --

          The Amazon Resource Name (ARN) of the subnet.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • EnableDns64 (boolean) --

          Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

        • Ipv6Native (boolean) --

          Indicates whether this is an IPv6 only subnet.

        • PrivateDnsNameOptionsOnLaunch (dict) --

          The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.

          • HostnameType (string) --

            The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

          • EnableResourceNameDnsARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

          • EnableResourceNameDnsAAAARecord (boolean) --

            Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.

class EC2.Paginator.DescribeTags
paginator = client.get_paginator('describe_tags')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_tags().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    The filters.

    • key - The tag key.
    • resource-id - The ID of the resource.
    • resource-type - The resource type (customer-gateway | dedicated-host | dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | instance | internet-gateway | key-pair | launch-template | natgateway | network-acl | network-interface | placement-group | reserved-instances | route-table | security-group | snapshot | spot-instances-request | subnet | volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | vpn-connection | vpn-gateway ).
    • tag :<key> - The key/value combination of the tag. For example, specify "tag:Owner" for the filter name and "TeamA" for the filter value to find resources with the tag "Owner=TeamA".
    • value - The tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'ResourceId': 'string',
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Tags (list) --

      The tags.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The tag key.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The resource type.

        • Value (string) --

          The tag value.

class EC2.Paginator.DescribeTrafficMirrorFilters
paginator = client.get_paginator('describe_traffic_mirror_filters')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_traffic_mirror_filters().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TrafficMirrorFilterIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TrafficMirrorFilterIds (list) --

    The ID of the Traffic Mirror filter.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters. The possible values are:

    • description : The Traffic Mirror filter description.
    • traffic-mirror-filter-id : The ID of the Traffic Mirror filter.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorFilters': [
        {
            'TrafficMirrorFilterId': 'string',
            'IngressFilterRules': [
                {
                    'TrafficMirrorFilterRuleId': 'string',
                    'TrafficMirrorFilterId': 'string',
                    'TrafficDirection': 'ingress'|'egress',
                    'RuleNumber': 123,
                    'RuleAction': 'accept'|'reject',
                    'Protocol': 123,
                    'DestinationPortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'SourcePortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'DestinationCidrBlock': 'string',
                    'SourceCidrBlock': 'string',
                    'Description': 'string'
                },
            ],
            'EgressFilterRules': [
                {
                    'TrafficMirrorFilterRuleId': 'string',
                    'TrafficMirrorFilterId': 'string',
                    'TrafficDirection': 'ingress'|'egress',
                    'RuleNumber': 123,
                    'RuleAction': 'accept'|'reject',
                    'Protocol': 123,
                    'DestinationPortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'SourcePortRange': {
                        'FromPort': 123,
                        'ToPort': 123
                    },
                    'DestinationCidrBlock': 'string',
                    'SourceCidrBlock': 'string',
                    'Description': 'string'
                },
            ],
            'NetworkServices': [
                'amazon-dns',
            ],
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TrafficMirrorFilters (list) --

      Information about one or more Traffic Mirror filters.

      • (dict) --

        Describes the Traffic Mirror filter.

        • TrafficMirrorFilterId (string) --

          The ID of the Traffic Mirror filter.

        • IngressFilterRules (list) --

          Information about the ingress rules that are associated with the Traffic Mirror filter.

          • (dict) --

            Describes the Traffic Mirror rule.

            • TrafficMirrorFilterRuleId (string) --

              The ID of the Traffic Mirror rule.

            • TrafficMirrorFilterId (string) --

              The ID of the Traffic Mirror filter that the rule is associated with.

            • TrafficDirection (string) --

              The traffic direction assigned to the Traffic Mirror rule.

            • RuleNumber (integer) --

              The rule number of the Traffic Mirror rule.

            • RuleAction (string) --

              The action assigned to the Traffic Mirror rule.

            • Protocol (integer) --

              The protocol assigned to the Traffic Mirror rule.

            • DestinationPortRange (dict) --

              The destination port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • SourcePortRange (dict) --

              The source port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • DestinationCidrBlock (string) --

              The destination CIDR block assigned to the Traffic Mirror rule.

            • SourceCidrBlock (string) --

              The source CIDR block assigned to the Traffic Mirror rule.

            • Description (string) --

              The description of the Traffic Mirror rule.

        • EgressFilterRules (list) --

          Information about the egress rules that are associated with the Traffic Mirror filter.

          • (dict) --

            Describes the Traffic Mirror rule.

            • TrafficMirrorFilterRuleId (string) --

              The ID of the Traffic Mirror rule.

            • TrafficMirrorFilterId (string) --

              The ID of the Traffic Mirror filter that the rule is associated with.

            • TrafficDirection (string) --

              The traffic direction assigned to the Traffic Mirror rule.

            • RuleNumber (integer) --

              The rule number of the Traffic Mirror rule.

            • RuleAction (string) --

              The action assigned to the Traffic Mirror rule.

            • Protocol (integer) --

              The protocol assigned to the Traffic Mirror rule.

            • DestinationPortRange (dict) --

              The destination port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • SourcePortRange (dict) --

              The source port range assigned to the Traffic Mirror rule.

              • FromPort (integer) --

                The start of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

              • ToPort (integer) --

                The end of the Traffic Mirror port range. This applies to the TCP and UDP protocols.

            • DestinationCidrBlock (string) --

              The destination CIDR block assigned to the Traffic Mirror rule.

            • SourceCidrBlock (string) --

              The source CIDR block assigned to the Traffic Mirror rule.

            • Description (string) --

              The description of the Traffic Mirror rule.

        • NetworkServices (list) --

          The network service traffic that is associated with the Traffic Mirror filter.

          • (string) --
        • Description (string) --

          The description of the Traffic Mirror filter.

        • Tags (list) --

          The tags assigned to the Traffic Mirror filter.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTrafficMirrorSessions
paginator = client.get_paginator('describe_traffic_mirror_sessions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_traffic_mirror_sessions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TrafficMirrorSessionIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TrafficMirrorSessionIds (list) --

    The ID of the Traffic Mirror session.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters. The possible values are:

    • description : The Traffic Mirror session description.
    • network-interface-id : The ID of the Traffic Mirror session network interface.
    • owner-id : The ID of the account that owns the Traffic Mirror session.
    • packet-length : The assigned number of packets to mirror.
    • session-number : The assigned session number.
    • traffic-mirror-filter-id : The ID of the Traffic Mirror filter.
    • traffic-mirror-session-id : The ID of the Traffic Mirror session.
    • traffic-mirror-target-id : The ID of the Traffic Mirror target.
    • virtual-network-id : The virtual network ID of the Traffic Mirror session.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorSessions': [
        {
            'TrafficMirrorSessionId': 'string',
            'TrafficMirrorTargetId': 'string',
            'TrafficMirrorFilterId': 'string',
            'NetworkInterfaceId': 'string',
            'OwnerId': 'string',
            'PacketLength': 123,
            'SessionNumber': 123,
            'VirtualNetworkId': 123,
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TrafficMirrorSessions (list) --

      Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror sessions are described. Alternatively, you can filter the results.

      • (dict) --

        Describes a Traffic Mirror session.

        • TrafficMirrorSessionId (string) --

          The ID for the Traffic Mirror session.

        • TrafficMirrorTargetId (string) --

          The ID of the Traffic Mirror target.

        • TrafficMirrorFilterId (string) --

          The ID of the Traffic Mirror filter.

        • NetworkInterfaceId (string) --

          The ID of the Traffic Mirror session's network interface.

        • OwnerId (string) --

          The ID of the account that owns the Traffic Mirror session.

        • PacketLength (integer) --

          The number of bytes in each packet to mirror. These are the bytes after the VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the filter criteria are copied to the target. Do not specify this parameter when you want to mirror the entire packet

        • SessionNumber (integer) --

          The session number determines the order in which sessions are evaluated when an interface is used by multiple sessions. The first session with a matching filter is the one that mirrors the packets.

          Valid values are 1-32766.

        • VirtualNetworkId (integer) --

          The virtual network ID associated with the Traffic Mirror session.

        • Description (string) --

          The description of the Traffic Mirror session.

        • Tags (list) --

          The tags assigned to the Traffic Mirror session.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTrafficMirrorTargets
paginator = client.get_paginator('describe_traffic_mirror_targets')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_traffic_mirror_targets().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TrafficMirrorTargetIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TrafficMirrorTargetIds (list) --

    The ID of the Traffic Mirror targets.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters. The possible values are:

    • description : The Traffic Mirror target description.
    • network-interface-id : The ID of the Traffic Mirror session network interface.
    • network-load-balancer-arn : The Amazon Resource Name (ARN) of the Network Load Balancer that is associated with the session.
    • owner-id : The ID of the account that owns the Traffic Mirror session.
    • traffic-mirror-target-id : The ID of the Traffic Mirror target.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TrafficMirrorTargets': [
        {
            'TrafficMirrorTargetId': 'string',
            'NetworkInterfaceId': 'string',
            'NetworkLoadBalancerArn': 'string',
            'Type': 'network-interface'|'network-load-balancer'|'gateway-load-balancer-endpoint',
            'Description': 'string',
            'OwnerId': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'GatewayLoadBalancerEndpointId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • TrafficMirrorTargets (list) --

      Information about one or more Traffic Mirror targets.

      • (dict) --

        Describes a Traffic Mirror target.

        • TrafficMirrorTargetId (string) --

          The ID of the Traffic Mirror target.

        • NetworkInterfaceId (string) --

          The network interface ID that is attached to the target.

        • NetworkLoadBalancerArn (string) --

          The Amazon Resource Name (ARN) of the Network Load Balancer.

        • Type (string) --

          The type of Traffic Mirror target.

        • Description (string) --

          Information about the Traffic Mirror target.

        • OwnerId (string) --

          The ID of the account that owns the Traffic Mirror target.

        • Tags (list) --

          The tags assigned to the Traffic Mirror target.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • GatewayLoadBalancerEndpointId (string) --

          The ID of the Gateway Load Balancer endpoint.

class EC2.Paginator.DescribeTransitGatewayAttachments
paginator = client.get_paginator('describe_transit_gateway_attachments')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_attachments().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    The IDs of the attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • association.state - The state of the association (associating | associated | disassociating ).
    • association.transit-gateway-route-table-id - The ID of the route table for the transit gateway.
    • resource-id - The ID of the resource.
    • resource-owner-id - The ID of the Amazon Web Services account that owns the resource.
    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect .
    • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting .
    • transit-gateway-attachment-id - The ID of the attachment.
    • transit-gateway-id - The ID of the transit gateway.
    • transit-gateway-owner-id - The ID of the Amazon Web Services account that owns the transit gateway.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayAttachments': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransitGatewayId': 'string',
            'TransitGatewayOwnerId': 'string',
            'ResourceOwnerId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceId': 'string',
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'Association': {
                'TransitGatewayRouteTableId': 'string',
                'State': 'associating'|'associated'|'disassociating'|'disassociated'
            },
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayAttachments (list) --

      Information about the attachments.

      • (dict) --

        Describes an attachment between a resource and a transit gateway.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • TransitGatewayOwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • ResourceOwnerId (string) --

          The ID of the Amazon Web Services account that owns the resource.

        • ResourceType (string) --

          The resource type. Note that the tgw-peering resource type has been deprecated.

        • ResourceId (string) --

          The ID of the resource.

        • State (string) --

          The attachment state. Note that the initiating state has been deprecated.

        • Association (dict) --

          The association.

          • TransitGatewayRouteTableId (string) --

            The ID of the route table for the transit gateway.

          • State (string) --

            The state of the association.

        • CreationTime (datetime) --

          The creation time.

        • Tags (list) --

          The tags for the attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayConnectPeers
paginator = client.get_paginator('describe_transit_gateway_connect_peers')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_connect_peers().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayConnectPeerIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayConnectPeerIds (list) --

    The IDs of the Connect peers.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • state - The state of the Connect peer (pending | available | deleting | deleted ).
    • transit-gateway-attachment-id - The ID of the attachment.
    • transit-gateway-connect-peer-id - The ID of the Connect peer.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnectPeers': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransitGatewayConnectPeerId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'ConnectPeerConfiguration': {
                'TransitGatewayAddress': 'string',
                'PeerAddress': 'string',
                'InsideCidrBlocks': [
                    'string',
                ],
                'Protocol': 'gre',
                'BgpConfigurations': [
                    {
                        'TransitGatewayAsn': 123,
                        'PeerAsn': 123,
                        'TransitGatewayAddress': 'string',
                        'PeerAddress': 'string',
                        'BgpStatus': 'up'|'down'
                    },
                ]
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayConnectPeers (list) --

      Information about the Connect peers.

      • (dict) --

        Describes a transit gateway Connect peer.

        • TransitGatewayAttachmentId (string) --

          The ID of the Connect attachment.

        • TransitGatewayConnectPeerId (string) --

          The ID of the Connect peer.

        • State (string) --

          The state of the Connect peer.

        • CreationTime (datetime) --

          The creation time.

        • ConnectPeerConfiguration (dict) --

          The Connect peer details.

          • TransitGatewayAddress (string) --

            The Connect peer IP address on the transit gateway side of the tunnel.

          • PeerAddress (string) --

            The Connect peer IP address on the appliance side of the tunnel.

          • InsideCidrBlocks (list) --

            The range of interior BGP peer IP addresses.

            • (string) --
          • Protocol (string) --

            The tunnel protocol.

          • BgpConfigurations (list) --

            The BGP configuration details.

            • (dict) --

              The BGP configuration information.

              • TransitGatewayAsn (integer) --

                The transit gateway Autonomous System Number (ASN).

              • PeerAsn (integer) --

                The peer Autonomous System Number (ASN).

              • TransitGatewayAddress (string) --

                The interior BGP peer IP address for the transit gateway.

              • PeerAddress (string) --

                The interior BGP peer IP address for the appliance.

              • BgpStatus (string) --

                The BGP status.

        • Tags (list) --

          The tags for the Connect peer.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayConnects
paginator = client.get_paginator('describe_transit_gateway_connects')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_connects().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    The IDs of the attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • options.protocol - The tunnel protocol (gre ).
    • state - The state of the attachment (initiating | initiatingRequest | pendingAcceptance | rollingBack | pending | available | modifying | deleting | deleted | failed | rejected | rejecting | failing ).
    • transit-gateway-attachment-id - The ID of the Connect attachment.
    • transit-gateway-id - The ID of the transit gateway.
    • transport-transit-gateway-attachment-id - The ID of the transit gateway attachment from which the Connect attachment was created.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayConnects': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransportTransitGatewayAttachmentId': 'string',
            'TransitGatewayId': 'string',
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'CreationTime': datetime(2015, 1, 1),
            'Options': {
                'Protocol': 'gre'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayConnects (list) --

      Information about the Connect attachments.

      • (dict) --

        Describes a transit gateway Connect attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the Connect attachment.

        • TransportTransitGatewayAttachmentId (string) --

          The ID of the attachment from which the Connect attachment was created.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • State (string) --

          The state of the attachment.

        • CreationTime (datetime) --

          The creation time.

        • Options (dict) --

          The Connect attachment options.

          • Protocol (string) --

            The tunnel protocol.

        • Tags (list) --

          The tags for the attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayMulticastDomains
paginator = client.get_paginator('describe_transit_gateway_multicast_domains')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_multicast_domains().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayMulticastDomainIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayMulticastDomainIds (list) --

    The ID of the transit gateway multicast domain.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • state - The state of the transit gateway multicast domain. Valid values are pending | available | deleting | deleted .
    • transit-gateway-id - The ID of the transit gateway.
    • transit-gateway-multicast-domain-id - The ID of the transit gateway multicast domain.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayMulticastDomains': [
        {
            'TransitGatewayMulticastDomainId': 'string',
            'TransitGatewayId': 'string',
            'TransitGatewayMulticastDomainArn': 'string',
            'OwnerId': 'string',
            'Options': {
                'Igmpv2Support': 'enable'|'disable',
                'StaticSourcesSupport': 'enable'|'disable',
                'AutoAcceptSharedAssociations': 'enable'|'disable'
            },
            'State': 'pending'|'available'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayMulticastDomains (list) --

      Information about the transit gateway multicast domains.

      • (dict) --

        Describes the transit gateway multicast domain.

        • TransitGatewayMulticastDomainId (string) --

          The ID of the transit gateway multicast domain.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • TransitGatewayMulticastDomainArn (string) --

          The Amazon Resource Name (ARN) of the transit gateway multicast domain.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain.

        • Options (dict) --

          The options for the transit gateway multicast domain.

          • Igmpv2Support (string) --

            Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned on for the transit gateway multicast domain.

          • StaticSourcesSupport (string) --

            Indicates whether support for statically configuring transit gateway multicast group sources is turned on.

          • AutoAcceptSharedAssociations (string) --

            Indicates whether to automatically cross-account subnet associations that are associated with the transit gateway multicast domain.

        • State (string) --

          The state of the transit gateway multicast domain.

        • CreationTime (datetime) --

          The time the transit gateway multicast domain was created.

        • Tags (list) --

          The tags for the transit gateway multicast domain.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayPeeringAttachments
paginator = client.get_paginator('describe_transit_gateway_peering_attachments')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_peering_attachments().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    One or more IDs of the transit gateway peering attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • transit-gateway-attachment-id - The ID of the transit gateway attachment.
    • local-owner-id - The ID of your Amazon Web Services account.
    • remote-owner-id - The ID of the Amazon Web Services account in the remote Region that owns the transit gateway.
    • state - The state of the peering attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • transit-gateway-id - The ID of the transit gateway.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPeeringAttachments': [
        {
            'TransitGatewayAttachmentId': 'string',
            'AccepterTransitGatewayAttachmentId': 'string',
            'RequesterTgwInfo': {
                'TransitGatewayId': 'string',
                'CoreNetworkId': 'string',
                'OwnerId': 'string',
                'Region': 'string'
            },
            'AccepterTgwInfo': {
                'TransitGatewayId': 'string',
                'CoreNetworkId': 'string',
                'OwnerId': 'string',
                'Region': 'string'
            },
            'Options': {
                'DynamicRouting': 'enable'|'disable'
            },
            'Status': {
                'Code': 'string',
                'Message': 'string'
            },
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayPeeringAttachments (list) --

      The transit gateway peering attachments.

      • (dict) --

        Describes the transit gateway peering attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway peering attachment.

        • AccepterTransitGatewayAttachmentId (string) --

          The ID of the accepter transit gateway attachment.

        • RequesterTgwInfo (dict) --

          Information about the requester transit gateway.

          • TransitGatewayId (string) --

            The ID of the transit gateway.

          • CoreNetworkId (string) --

            The ID of the core network where the transit gateway peer is located.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region (string) --

            The Region of the transit gateway.

        • AccepterTgwInfo (dict) --

          Information about the accepter transit gateway.

          • TransitGatewayId (string) --

            The ID of the transit gateway.

          • CoreNetworkId (string) --

            The ID of the core network where the transit gateway peer is located.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the transit gateway.

          • Region (string) --

            The Region of the transit gateway.

        • Options (dict) --

          Details about the transit gateway peering attachment.

          • DynamicRouting (string) --

            Describes whether dynamic routing is enabled or disabled for the transit gateway peering attachment.

        • Status (dict) --

          The status of the transit gateway peering attachment.

          • Code (string) --

            The status code.

          • Message (string) --

            The status message, if applicable.

        • State (string) --

          The state of the transit gateway peering attachment. Note that the initiating state has been deprecated.

        • CreationTime (datetime) --

          The time the transit gateway peering attachment was created.

        • Tags (list) --

          The tags for the transit gateway peering attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayPolicyTables
paginator = client.get_paginator('describe_transit_gateway_policy_tables')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_policy_tables().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayPolicyTableIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayPolicyTableIds (list) --

    The IDs of the transit gateway policy tables.

    • (string) --
  • Filters (list) --

    The filters associated with the transit gateway policy table.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPolicyTables': [
        {
            'TransitGatewayPolicyTableId': 'string',
            'TransitGatewayId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayPolicyTables (list) --

      Describes the transit gateway policy tables.

      • (dict) --

        Describes a transit gateway policy table.

        • TransitGatewayPolicyTableId (string) --

          The ID of the transit gateway policy table.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • State (string) --

          The state of the transit gateway policy table

        • CreationTime (datetime) --

          The timestamp when the transit gateway policy table was created.

        • Tags (list) --

          he key-value pairs associated with the transit gateway policy table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayRouteTableAnnouncements
paginator = client.get_paginator('describe_transit_gateway_route_table_announcements')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_route_table_announcements().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayRouteTableAnnouncementIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayRouteTableAnnouncementIds (list) --

    The IDs of the transit gateway route tables that are being advertised.

    • (string) --
  • Filters (list) --

    The filters associated with the transit gateway policy table.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTableAnnouncements': [
        {
            'TransitGatewayRouteTableAnnouncementId': 'string',
            'TransitGatewayId': 'string',
            'CoreNetworkId': 'string',
            'PeerTransitGatewayId': 'string',
            'PeerCoreNetworkId': 'string',
            'PeeringAttachmentId': 'string',
            'AnnouncementDirection': 'outgoing'|'incoming',
            'TransitGatewayRouteTableId': 'string',
            'State': 'available'|'pending'|'failing'|'failed'|'deleting'|'deleted',
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayRouteTableAnnouncements (list) --

      Describes the transit gateway route table announcement.

      • (dict) --

        Describes a transit gateway route table announcement.

        • TransitGatewayRouteTableAnnouncementId (string) --

          The ID of the transit gateway route table announcement.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • CoreNetworkId (string) --

          The ID of the core network for the transit gateway route table announcement.

        • PeerTransitGatewayId (string) --

          The ID of the peer transit gateway.

        • PeerCoreNetworkId (string) --

          The ID of the core network ID for the peer.

        • PeeringAttachmentId (string) --

          The ID of the peering attachment.

        • AnnouncementDirection (string) --

          The direction for the route table announcement.

        • TransitGatewayRouteTableId (string) --

          The ID of the transit gateway route table.

        • State (string) --

          The state of the transit gateway announcement.

        • CreationTime (datetime) --

          The timestamp when the transit gateway route table announcement was created.

        • Tags (list) --

          The key-value pairs associated with the route table announcement.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayRouteTables
paginator = client.get_paginator('describe_transit_gateway_route_tables')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_route_tables().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayRouteTableIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayRouteTableIds (list) --

    The IDs of the transit gateway route tables.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • default-association-route-table - Indicates whether this is the default association route table for the transit gateway (true | false ).
    • default-propagation-route-table - Indicates whether this is the default propagation route table for the transit gateway (true | false ).
    • state - The state of the route table (available | deleting | deleted | pending ).
    • transit-gateway-id - The ID of the transit gateway.
    • transit-gateway-route-table-id - The ID of the transit gateway route table.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTables': [
        {
            'TransitGatewayRouteTableId': 'string',
            'TransitGatewayId': 'string',
            'State': 'pending'|'available'|'deleting'|'deleted',
            'DefaultAssociationRouteTable': True|False,
            'DefaultPropagationRouteTable': True|False,
            'CreationTime': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayRouteTables (list) --

      Information about the transit gateway route tables.

      • (dict) --

        Describes a transit gateway route table.

        • TransitGatewayRouteTableId (string) --

          The ID of the transit gateway route table.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • State (string) --

          The state of the transit gateway route table.

        • DefaultAssociationRouteTable (boolean) --

          Indicates whether this is the default association route table for the transit gateway.

        • DefaultPropagationRouteTable (boolean) --

          Indicates whether this is the default propagation route table for the transit gateway.

        • CreationTime (datetime) --

          The creation time.

        • Tags (list) --

          Any tags assigned to the route table.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGatewayVpcAttachments
paginator = client.get_paginator('describe_transit_gateway_vpc_attachments')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateway_vpc_attachments().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayAttachmentIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayAttachmentIds (list) --

    The IDs of the attachments.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • state - The state of the attachment. Valid values are available | deleted | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance | pending | rollingBack | rejected | rejecting .
    • transit-gateway-attachment-id - The ID of the attachment.
    • transit-gateway-id - The ID of the transit gateway.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayVpcAttachments': [
        {
            'TransitGatewayAttachmentId': 'string',
            'TransitGatewayId': 'string',
            'VpcId': 'string',
            'VpcOwnerId': 'string',
            'State': 'initiating'|'initiatingRequest'|'pendingAcceptance'|'rollingBack'|'pending'|'available'|'modifying'|'deleting'|'deleted'|'failed'|'rejected'|'rejecting'|'failing',
            'SubnetIds': [
                'string',
            ],
            'CreationTime': datetime(2015, 1, 1),
            'Options': {
                'DnsSupport': 'enable'|'disable',
                'Ipv6Support': 'enable'|'disable',
                'ApplianceModeSupport': 'enable'|'disable'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayVpcAttachments (list) --

      Information about the VPC attachments.

      • (dict) --

        Describes a VPC attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • VpcId (string) --

          The ID of the VPC.

        • VpcOwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • State (string) --

          The state of the VPC attachment. Note that the initiating state has been deprecated.

        • SubnetIds (list) --

          The IDs of the subnets.

          • (string) --
        • CreationTime (datetime) --

          The creation time.

        • Options (dict) --

          The VPC attachment options.

          • DnsSupport (string) --

            Indicates whether DNS support is enabled.

          • Ipv6Support (string) --

            Indicates whether IPv6 support is disabled.

          • ApplianceModeSupport (string) --

            Indicates whether appliance mode support is enabled.

        • Tags (list) --

          The tags for the VPC attachment.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTransitGateways
paginator = client.get_paginator('describe_transit_gateways')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_transit_gateways().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayIds (list) --

    The IDs of the transit gateways.

    • (string) --
  • Filters (list) --

    One or more filters. The possible values are:

    • options.propagation-default-route-table-id - The ID of the default propagation route table.
    • options.amazon-side-asn - The private ASN for the Amazon side of a BGP session.
    • options.association-default-route-table-id - The ID of the default association route table.
    • options.auto-accept-shared-attachments - Indicates whether there is automatic acceptance of attachment requests (enable | disable ).
    • options.default-route-table-association - Indicates whether resource attachments are automatically associated with the default association route table (enable | disable ).
    • options.default-route-table-propagation - Indicates whether resource attachments automatically propagate routes to the default propagation route table (enable | disable ).
    • options.dns-support - Indicates whether DNS support is enabled (enable | disable ).
    • options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol support is enabled (enable | disable ).
    • owner-id - The ID of the Amazon Web Services account that owns the transit gateway.
    • state - The state of the transit gateway (available | deleted | deleting | modifying | pending ).
    • transit-gateway-id - The ID of the transit gateway.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGateways': [
        {
            'TransitGatewayId': 'string',
            'TransitGatewayArn': 'string',
            'State': 'pending'|'available'|'modifying'|'deleting'|'deleted',
            'OwnerId': 'string',
            'Description': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'Options': {
                'AmazonSideAsn': 123,
                'TransitGatewayCidrBlocks': [
                    'string',
                ],
                'AutoAcceptSharedAttachments': 'enable'|'disable',
                'DefaultRouteTableAssociation': 'enable'|'disable',
                'AssociationDefaultRouteTableId': 'string',
                'DefaultRouteTablePropagation': 'enable'|'disable',
                'PropagationDefaultRouteTableId': 'string',
                'VpnEcmpSupport': 'enable'|'disable',
                'DnsSupport': 'enable'|'disable',
                'MulticastSupport': 'enable'|'disable'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGateways (list) --

      Information about the transit gateways.

      • (dict) --

        Describes a transit gateway.

        • TransitGatewayId (string) --

          The ID of the transit gateway.

        • TransitGatewayArn (string) --

          The Amazon Resource Name (ARN) of the transit gateway.

        • State (string) --

          The state of the transit gateway.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway.

        • Description (string) --

          The description of the transit gateway.

        • CreationTime (datetime) --

          The creation time.

        • Options (dict) --

          The transit gateway options.

          • AmazonSideAsn (integer) --

            A private Autonomous System Number (ASN) for the Amazon side of a BGP session. The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for 32-bit ASNs.

          • TransitGatewayCidrBlocks (list) --

            The transit gateway CIDR blocks.

            • (string) --
          • AutoAcceptSharedAttachments (string) --

            Indicates whether attachment requests are automatically accepted.

          • DefaultRouteTableAssociation (string) --

            Indicates whether resource attachments are automatically associated with the default association route table.

          • AssociationDefaultRouteTableId (string) --

            The ID of the default association route table.

          • DefaultRouteTablePropagation (string) --

            Indicates whether resource attachments automatically propagate routes to the default propagation route table.

          • PropagationDefaultRouteTableId (string) --

            The ID of the default propagation route table.

          • VpnEcmpSupport (string) --

            Indicates whether Equal Cost Multipath Protocol support is enabled.

          • DnsSupport (string) --

            Indicates whether DNS support is enabled.

          • MulticastSupport (string) --

            Indicates whether multicast is enabled on the transit gateway

        • Tags (list) --

          The tags for the transit gateway.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeTrunkInterfaceAssociations
paginator = client.get_paginator('describe_trunk_interface_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_trunk_interface_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    AssociationIds=[
        'string',
    ],
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • AssociationIds (list) --

    The IDs of the associations.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • gre-key - The ID of a trunk interface association.
    • interface-protocol - The interface protocol. Valid values are VLAN and GRE .
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InterfaceAssociations': [
        {
            'AssociationId': 'string',
            'BranchInterfaceId': 'string',
            'TrunkInterfaceId': 'string',
            'InterfaceProtocol': 'VLAN'|'GRE',
            'VlanId': 123,
            'GreKey': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • InterfaceAssociations (list) --

      Information about the trunk associations.

      • (dict) --

        Note

        Currently available in limited preview only . If you are interested in using this feature, contact your account manager.

        Information about an association between a branch network interface with a trunk network interface.

        • AssociationId (string) --

          The ID of the association.

        • BranchInterfaceId (string) --

          The ID of the branch network interface.

        • TrunkInterfaceId (string) --

          The ID of the trunk network interface.

        • InterfaceProtocol (string) --

          The interface protocol. Valid values are VLAN and GRE .

        • VlanId (integer) --

          The ID of the VLAN when you use the VLAN protocol.

        • GreKey (integer) --

          The application key when you use the GRE protocol.

        • Tags (list) --

          The tags for the trunk interface association.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeVolumeStatus
paginator = client.get_paginator('describe_volume_status')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_volume_status().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • action.code - The action code for the event (for example, enable-volume-io ).
    • action.description - A description of the action.
    • action.event-id - The event ID associated with the action.
    • availability-zone - The Availability Zone of the instance.
    • event.description - A description of the event.
    • event.event-id - The event ID.
    • event.event-type - The event type (for io-enabled : passed | failed ; for io-performance : io-performance:degraded | io-performance:severely-degraded | io-performance:stalled ).
    • event.not-after - The latest end time for the event.
    • event.not-before - The earliest start time for the event.
    • volume-status.details-name - The cause for volume-status.status (io-enabled | io-performance ).
    • volume-status.details-status - The status of volume-status.details-name (for io-enabled : passed | failed ; for io-performance : normal | degraded | severely-degraded | stalled ).
    • volume-status.status - The status of the volume (ok | impaired | warning | insufficient-data ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VolumeIds (list) --

    The IDs of the volumes.

    Default: Describes all your volumes.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'VolumeStatuses': [
        {
            'Actions': [
                {
                    'Code': 'string',
                    'Description': 'string',
                    'EventId': 'string',
                    'EventType': 'string'
                },
            ],
            'AvailabilityZone': 'string',
            'OutpostArn': 'string',
            'Events': [
                {
                    'Description': 'string',
                    'EventId': 'string',
                    'EventType': 'string',
                    'NotAfter': datetime(2015, 1, 1),
                    'NotBefore': datetime(2015, 1, 1),
                    'InstanceId': 'string'
                },
            ],
            'VolumeId': 'string',
            'VolumeStatus': {
                'Details': [
                    {
                        'Name': 'io-enabled'|'io-performance',
                        'Status': 'string'
                    },
                ],
                'Status': 'ok'|'impaired'|'insufficient-data'
            },
            'AttachmentStatuses': [
                {
                    'IoPerformance': 'string',
                    'InstanceId': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • VolumeStatuses (list) --

      Information about the status of the volumes.

      • (dict) --

        Describes the volume status.

        • Actions (list) --

          The details of the operation.

          • (dict) --

            Describes a volume status operation code.

            • Code (string) --

              The code identifying the operation, for example, enable-volume-io .

            • Description (string) --

              A description of the operation.

            • EventId (string) --

              The ID of the event associated with this operation.

            • EventType (string) --

              The event type associated with this operation.

        • AvailabilityZone (string) --

          The Availability Zone of the volume.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • Events (list) --

          A list of events associated with the volume.

          • (dict) --

            Describes a volume status event.

            • Description (string) --

              A description of the event.

            • EventId (string) --

              The ID of this event.

            • EventType (string) --

              The type of this event.

            • NotAfter (datetime) --

              The latest end time of the event.

            • NotBefore (datetime) --

              The earliest start time of the event.

            • InstanceId (string) --

              The ID of the instance associated with the event.

        • VolumeId (string) --

          The volume ID.

        • VolumeStatus (dict) --

          The volume status.

          • Details (list) --

            The details of the volume status.

            • (dict) --

              Describes a volume status.

              • Name (string) --

                The name of the volume status.

              • Status (string) --

                The intended status of the volume status.

          • Status (string) --

            The status of the volume.

        • AttachmentStatuses (list) --

          Information about the instances to which the volume is attached.

          • (dict) --

            Information about the instances to which the volume is attached.

            • IoPerformance (string) --

              The maximum IOPS supported by the attached instance.

            • InstanceId (string) --

              The ID of the attached instance.

class EC2.Paginator.DescribeVolumes
paginator = client.get_paginator('describe_volumes')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_volumes().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    The filters.

    • attachment.attach-time - The time stamp when the attachment initiated.
    • attachment.delete-on-termination - Whether the volume is deleted on instance termination.
    • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1 ).
    • attachment.instance-id - The ID of the instance the volume is attached to.
    • attachment.status - The attachment state (attaching | attached | detaching ).
    • availability-zone - The Availability Zone in which the volume was created.
    • create-time - The time stamp when the volume was created.
    • encrypted - Indicates whether the volume is encrypted (true | false )
    • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false )
    • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false ).
    • size - The size of the volume, in GiB.
    • snapshot-id - The snapshot from which the volume was created.
    • status - The state of the volume (creating | available | in-use | deleting | deleted | error ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The volume ID.
    • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1 | standard )
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VolumeIds (list) --

    The volume IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Volumes': [
        {
            'Attachments': [
                {
                    'AttachTime': datetime(2015, 1, 1),
                    'Device': 'string',
                    'InstanceId': 'string',
                    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
                    'VolumeId': 'string',
                    'DeleteOnTermination': True|False
                },
            ],
            'AvailabilityZone': 'string',
            'CreateTime': datetime(2015, 1, 1),
            'Encrypted': True|False,
            'KmsKeyId': 'string',
            'OutpostArn': 'string',
            'Size': 123,
            'SnapshotId': 'string',
            'State': 'creating'|'available'|'in-use'|'deleting'|'deleted'|'error',
            'VolumeId': 'string',
            'Iops': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
            'FastRestored': True|False,
            'MultiAttachEnabled': True|False,
            'Throughput': 123
        },
    ],

}

Response Structure

  • (dict) --

    • Volumes (list) --

      Information about the volumes.

      • (dict) --

        Describes a volume.

        • Attachments (list) --

          Information about the volume attachments.

          • (dict) --

            Describes volume attachment details.

            • AttachTime (datetime) --

              The time stamp when the attachment initiated.

            • Device (string) --

              The device name.

            • InstanceId (string) --

              The ID of the instance.

            • State (string) --

              The attachment state of the volume.

            • VolumeId (string) --

              The ID of the volume.

            • DeleteOnTermination (boolean) --

              Indicates whether the EBS volume is deleted on instance termination.

        • AvailabilityZone (string) --

          The Availability Zone for the volume.

        • CreateTime (datetime) --

          The time stamp when volume creation was initiated.

        • Encrypted (boolean) --

          Indicates whether the volume is encrypted.

        • KmsKeyId (string) --

          The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • Size (integer) --

          The size of the volume, in GiBs.

        • SnapshotId (string) --

          The snapshot from which the volume was created, if applicable.

        • State (string) --

          The volume state.

        • VolumeId (string) --

          The ID of the volume.

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

        • Tags (list) --

          Any tags assigned to the volume.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • VolumeType (string) --

          The volume type.

        • FastRestored (boolean) --

          Indicates whether the volume was created using fast snapshot restore.

        • MultiAttachEnabled (boolean) --

          Indicates whether Amazon EBS Multi-Attach is enabled.

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

class EC2.Paginator.DescribeVolumesModifications
paginator = client.get_paginator('describe_volumes_modifications')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_volumes_modifications().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    VolumeIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VolumeIds (list) --

    The IDs of the volumes.

    • (string) --
  • Filters (list) --

    The filters.

    • modification-state - The current modification state (modifying | optimizing | completed | failed).
    • original-iops - The original IOPS rate of the volume.
    • original-size - The original size of the volume, in GiB.
    • original-volume-type - The original volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).
    • originalMultiAttachEnabled - Indicates whether Multi-Attach support was enabled (true | false).
    • start-time - The modification start time.
    • target-iops - The target IOPS rate of the volume.
    • target-size - The target size of the volume, in GiB.
    • target-volume-type - The target volume type of the volume (standard | io1 | io2 | gp2 | sc1 | st1).
    • targetMultiAttachEnabled - Indicates whether Multi-Attach support is to be enabled (true | false).
    • volume-id - The ID of the volume.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'VolumesModifications': [
        {
            'VolumeId': 'string',
            'ModificationState': 'modifying'|'optimizing'|'completed'|'failed',
            'StatusMessage': 'string',
            'TargetSize': 123,
            'TargetIops': 123,
            'TargetVolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
            'TargetThroughput': 123,
            'TargetMultiAttachEnabled': True|False,
            'OriginalSize': 123,
            'OriginalIops': 123,
            'OriginalVolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
            'OriginalThroughput': 123,
            'OriginalMultiAttachEnabled': True|False,
            'Progress': 123,
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • VolumesModifications (list) --

      Information about the volume modifications.

      • (dict) --

        Describes the modification status of an EBS volume.

        If the volume has never been modified, some element values will be null.

        • VolumeId (string) --

          The ID of the volume.

        • ModificationState (string) --

          The current modification state. The modification state is null for unmodified volumes.

        • StatusMessage (string) --

          A status message about the modification progress or failure.

        • TargetSize (integer) --

          The target size of the volume, in GiB.

        • TargetIops (integer) --

          The target IOPS rate of the volume.

        • TargetVolumeType (string) --

          The target EBS volume type of the volume.

        • TargetThroughput (integer) --

          The target throughput of the volume, in MiB/s.

        • TargetMultiAttachEnabled (boolean) --

          The target setting for Amazon EBS Multi-Attach.

        • OriginalSize (integer) --

          The original size of the volume, in GiB.

        • OriginalIops (integer) --

          The original IOPS rate of the volume.

        • OriginalVolumeType (string) --

          The original EBS volume type of the volume.

        • OriginalThroughput (integer) --

          The original throughput of the volume, in MiB/s.

        • OriginalMultiAttachEnabled (boolean) --

          The original setting for Amazon EBS Multi-Attach.

        • Progress (integer) --

          The modification progress, from 0 to 100 percent complete.

        • StartTime (datetime) --

          The modification start time.

        • EndTime (datetime) --

          The modification completion or failure time.

class EC2.Paginator.DescribeVpcClassicLinkDnsSupport
paginator = client.get_paginator('describe_vpc_classic_link_dns_support')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_classic_link_dns_support().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    VpcIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • VpcIds (list) --

    One or more VPC IDs.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Vpcs': [
        {
            'ClassicLinkDnsSupported': True|False,
            'VpcId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Vpcs (list) --

      Information about the ClassicLink DNS support status of the VPCs.

      • (dict) --

        Describes the ClassicLink DNS support status of a VPC.

        • ClassicLinkDnsSupported (boolean) --

          Indicates whether ClassicLink DNS support is enabled for the VPC.

        • VpcId (string) --

          The ID of the VPC.

class EC2.Paginator.DescribeVpcEndpointConnectionNotifications
paginator = client.get_paginator('describe_vpc_endpoint_connection_notifications')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_endpoint_connection_notifications().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    ConnectionNotificationId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ConnectionNotificationId (string) -- The ID of the notification.
  • Filters (list) --

    One or more filters.

    • connection-notification-arn - The ARN of the SNS topic for the notification.
    • connection-notification-id - The ID of the notification.
    • connection-notification-state - The state of the notification (Enabled | Disabled ).
    • connection-notification-type - The type of notification (Topic ).
    • service-id - The ID of the endpoint service.
    • vpc-endpoint-id - The ID of the VPC endpoint.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ConnectionNotificationSet': [
        {
            'ConnectionNotificationId': 'string',
            'ServiceId': 'string',
            'VpcEndpointId': 'string',
            'ConnectionNotificationType': 'Topic',
            'ConnectionNotificationArn': 'string',
            'ConnectionEvents': [
                'string',
            ],
            'ConnectionNotificationState': 'Enabled'|'Disabled'
        },
    ],

}

Response Structure

  • (dict) --

    • ConnectionNotificationSet (list) --

      One or more notifications.

      • (dict) --

        Describes a connection notification for a VPC endpoint or VPC endpoint service.

        • ConnectionNotificationId (string) --

          The ID of the notification.

        • ServiceId (string) --

          The ID of the endpoint service.

        • VpcEndpointId (string) --

          The ID of the VPC endpoint.

        • ConnectionNotificationType (string) --

          The type of notification.

        • ConnectionNotificationArn (string) --

          The ARN of the SNS topic for the notification.

        • ConnectionEvents (list) --

          The events for the notification. Valid values are Accept , Connect , Delete , and Reject .

          • (string) --
        • ConnectionNotificationState (string) --

          The state of the notification.

class EC2.Paginator.DescribeVpcEndpointConnections
paginator = client.get_paginator('describe_vpc_endpoint_connections')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_endpoint_connections().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • ip-address-type - The IP address type (ipv4 | ipv6 ).
    • service-id - The ID of the service.
    • vpc-endpoint-owner - The ID of the Amazon Web Services account ID that owns the endpoint.
    • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed ).
    • vpc-endpoint-id - The ID of the endpoint.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'VpcEndpointConnections': [
        {
            'ServiceId': 'string',
            'VpcEndpointId': 'string',
            'VpcEndpointOwner': 'string',
            'VpcEndpointState': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired',
            'CreationTimestamp': datetime(2015, 1, 1),
            'DnsEntries': [
                {
                    'DnsName': 'string',
                    'HostedZoneId': 'string'
                },
            ],
            'NetworkLoadBalancerArns': [
                'string',
            ],
            'GatewayLoadBalancerArns': [
                'string',
            ],
            'IpAddressType': 'ipv4'|'dualstack'|'ipv6'
        },
    ],

}

Response Structure

  • (dict) --

    • VpcEndpointConnections (list) --

      Information about one or more VPC endpoint connections.

      • (dict) --

        Describes a VPC endpoint connection to a service.

        • ServiceId (string) --

          The ID of the service to which the endpoint is connected.

        • VpcEndpointId (string) --

          The ID of the VPC endpoint.

        • VpcEndpointOwner (string) --

          The ID of the Amazon Web Services account that owns the VPC endpoint.

        • VpcEndpointState (string) --

          The state of the VPC endpoint.

        • CreationTimestamp (datetime) --

          The date and time that the VPC endpoint was created.

        • DnsEntries (list) --

          The DNS entries for the VPC endpoint.

          • (dict) --

            Describes a DNS entry.

            • DnsName (string) --

              The DNS name.

            • HostedZoneId (string) --

              The ID of the private hosted zone.

        • NetworkLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the network load balancers for the service.

          • (string) --
        • GatewayLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

          • (string) --
        • IpAddressType (string) --

          The IP address type for the endpoint.

class EC2.Paginator.DescribeVpcEndpointServiceConfigurations
paginator = client.get_paginator('describe_vpc_endpoint_service_configurations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_endpoint_service_configurations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    ServiceIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceIds (list) --

    The IDs of one or more services.

    • (string) --
  • Filters (list) --

    One or more filters.

    • service-name - The name of the service.
    • service-id - The ID of the service.
    • service-state - The state of the service (Pending | Available | Deleting | Deleted | Failed ).
    • supported-ip-address-types - The IP address type (ipv4 | ipv6 ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ServiceConfigurations': [
        {
            'ServiceType': [
                {
                    'ServiceType': 'Interface'|'Gateway'|'GatewayLoadBalancer'
                },
            ],
            'ServiceId': 'string',
            'ServiceName': 'string',
            'ServiceState': 'Pending'|'Available'|'Deleting'|'Deleted'|'Failed',
            'AvailabilityZones': [
                'string',
            ],
            'AcceptanceRequired': True|False,
            'ManagesVpcEndpoints': True|False,
            'NetworkLoadBalancerArns': [
                'string',
            ],
            'GatewayLoadBalancerArns': [
                'string',
            ],
            'SupportedIpAddressTypes': [
                'ipv4'|'ipv6',
            ],
            'BaseEndpointDnsNames': [
                'string',
            ],
            'PrivateDnsName': 'string',
            'PrivateDnsNameConfiguration': {
                'State': 'pendingVerification'|'verified'|'failed',
                'Type': 'string',
                'Value': 'string',
                'Name': 'string'
            },
            'PayerResponsibility': 'ServiceOwner',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • ServiceConfigurations (list) --

      Information about one or more services.

      • (dict) --

        Describes a service configuration for a VPC endpoint service.

        • ServiceType (list) --

          The type of service.

          • (dict) --

            Describes the type of service for a VPC endpoint.

            • ServiceType (string) --

              The type of service.

        • ServiceId (string) --

          The ID of the service.

        • ServiceName (string) --

          The name of the service.

        • ServiceState (string) --

          The service state.

        • AvailabilityZones (list) --

          The Availability Zones in which the service is available.

          • (string) --
        • AcceptanceRequired (boolean) --

          Indicates whether requests from other Amazon Web Services accounts to create an endpoint to the service must first be accepted.

        • ManagesVpcEndpoints (boolean) --

          Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

        • NetworkLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the Network Load Balancers for the service.

          • (string) --
        • GatewayLoadBalancerArns (list) --

          The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service.

          • (string) --
        • SupportedIpAddressTypes (list) --

          The supported IP address types.

          • (string) --
        • BaseEndpointDnsNames (list) --

          The DNS names for the service.

          • (string) --
        • PrivateDnsName (string) --

          The private DNS name for the service.

        • PrivateDnsNameConfiguration (dict) --

          Information about the endpoint service private DNS name configuration.

          • State (string) --

            The verification state of the VPC endpoint service.

            >Consumers of the endpoint service can use the private name only when the state is verified .

          • Type (string) --

            The endpoint service verification type, for example TXT.

          • Value (string) --

            The value the service provider adds to the private DNS name domain record before verification.

          • Name (string) --

            The name of the record subdomain the service provider needs to create. The service provider adds the value text to the name .

        • PayerResponsibility (string) --

          The payer responsibility.

        • Tags (list) --

          Any tags assigned to the service.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.DescribeVpcEndpointServicePermissions
paginator = client.get_paginator('describe_vpc_endpoint_service_permissions')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_endpoint_service_permissions().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    ServiceId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceId (string) --

    [REQUIRED]

    The ID of the service.

  • Filters (list) --

    One or more filters.

    • principal - The ARN of the principal.
    • principal-type - The principal type (All | Service | OrganizationUnit | Account | User | Role ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'AllowedPrincipals': [
        {
            'PrincipalType': 'All'|'Service'|'OrganizationUnit'|'Account'|'User'|'Role',
            'Principal': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • AllowedPrincipals (list) --

      Information about one or more allowed principals.

      • (dict) --

        Describes a principal.

        • PrincipalType (string) --

          The type of principal.

        • Principal (string) --

          The Amazon Resource Name (ARN) of the principal.

class EC2.Paginator.DescribeVpcEndpointServices
paginator = client.get_paginator('describe_vpc_endpoint_services')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_endpoint_services().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    ServiceNames=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ServiceNames (list) --

    One or more service names.

    • (string) --
  • Filters (list) --

    One or more filters.

    • service-name - The name of the service.
    • service-type - The type of service (Interface | Gateway ).
    • supported-ip-address-types - The IP address type (ipv4 | ipv6 ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ServiceNames': [
        'string',
    ],
    'ServiceDetails': [
        {
            'ServiceName': 'string',
            'ServiceId': 'string',
            'ServiceType': [
                {
                    'ServiceType': 'Interface'|'Gateway'|'GatewayLoadBalancer'
                },
            ],
            'AvailabilityZones': [
                'string',
            ],
            'Owner': 'string',
            'BaseEndpointDnsNames': [
                'string',
            ],
            'PrivateDnsName': 'string',
            'PrivateDnsNames': [
                {
                    'PrivateDnsName': 'string'
                },
            ],
            'VpcEndpointPolicySupported': True|False,
            'AcceptanceRequired': True|False,
            'ManagesVpcEndpoints': True|False,
            'PayerResponsibility': 'ServiceOwner',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'PrivateDnsNameVerificationState': 'pendingVerification'|'verified'|'failed',
            'SupportedIpAddressTypes': [
                'ipv4'|'ipv6',
            ]
        },
    ],

}

Response Structure

  • (dict) --

    Contains the output of DescribeVpcEndpointServices.

    • ServiceNames (list) --

      A list of supported services.

      • (string) --
    • ServiceDetails (list) --

      Information about the service.

      • (dict) --

        Describes a VPC endpoint service.

        • ServiceName (string) --

          The name of the service.

        • ServiceId (string) --

          The ID of the endpoint service.

        • ServiceType (list) --

          The type of service.

          • (dict) --

            Describes the type of service for a VPC endpoint.

            • ServiceType (string) --

              The type of service.

        • AvailabilityZones (list) --

          The Availability Zones in which the service is available.

          • (string) --
        • Owner (string) --

          The Amazon Web Services account ID of the service owner.

        • BaseEndpointDnsNames (list) --

          The DNS names for the service.

          • (string) --
        • PrivateDnsName (string) --

          The private DNS name for the service.

        • PrivateDnsNames (list) --

          The private DNS names assigned to the VPC endpoint service.

          • (dict) --

            Information about the Private DNS name for interface endpoints.

            • PrivateDnsName (string) --

              The private DNS name assigned to the VPC endpoint service.

        • VpcEndpointPolicySupported (boolean) --

          Indicates whether the service supports endpoint policies.

        • AcceptanceRequired (boolean) --

          Indicates whether VPC endpoint connection requests to the service must be accepted by the service owner.

        • ManagesVpcEndpoints (boolean) --

          Indicates whether the service manages its VPC endpoints. Management of the service VPC endpoints using the VPC endpoint API is restricted.

        • PayerResponsibility (string) --

          The payer responsibility.

        • Tags (list) --

          Any tags assigned to the service.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • PrivateDnsNameVerificationState (string) --

          The verification state of the VPC endpoint service.

          Consumers of the endpoint service cannot use the private name when the state is not verified .

        • SupportedIpAddressTypes (list) --

          The supported IP address types.

          • (string) --

class EC2.Paginator.DescribeVpcEndpoints
paginator = client.get_paginator('describe_vpc_endpoints')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_endpoints().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    VpcEndpointIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointIds (list) --

    One or more endpoint IDs.

    • (string) --
  • Filters (list) --

    One or more filters.

    • ip-address-type - The IP address type (ipv4 | ipv6 ).
    • service-name - The name of the service.
    • vpc-id - The ID of the VPC in which the endpoint resides.
    • vpc-endpoint-id - The ID of the endpoint.
    • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed ).
    • vpc-endpoint-type - The type of VPC endpoint (Interface | Gateway | GatewayLoadBalancer ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'VpcEndpoints': [
        {
            'VpcEndpointId': 'string',
            'VpcEndpointType': 'Interface'|'Gateway'|'GatewayLoadBalancer',
            'VpcId': 'string',
            'ServiceName': 'string',
            'State': 'PendingAcceptance'|'Pending'|'Available'|'Deleting'|'Deleted'|'Rejected'|'Failed'|'Expired',
            'PolicyDocument': 'string',
            'RouteTableIds': [
                'string',
            ],
            'SubnetIds': [
                'string',
            ],
            'Groups': [
                {
                    'GroupId': 'string',
                    'GroupName': 'string'
                },
            ],
            'IpAddressType': 'ipv4'|'dualstack'|'ipv6',
            'DnsOptions': {
                'DnsRecordIpType': 'ipv4'|'dualstack'|'ipv6'|'service-defined'
            },
            'PrivateDnsEnabled': True|False,
            'RequesterManaged': True|False,
            'NetworkInterfaceIds': [
                'string',
            ],
            'DnsEntries': [
                {
                    'DnsName': 'string',
                    'HostedZoneId': 'string'
                },
            ],
            'CreationTimestamp': datetime(2015, 1, 1),
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'OwnerId': 'string',
            'LastError': {
                'Message': 'string',
                'Code': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) --

    Contains the output of DescribeVpcEndpoints.

    • VpcEndpoints (list) --

      Information about the endpoints.

      • (dict) --

        Describes a VPC endpoint.

        • VpcEndpointId (string) --

          The ID of the endpoint.

        • VpcEndpointType (string) --

          The type of endpoint.

        • VpcId (string) --

          The ID of the VPC to which the endpoint is associated.

        • ServiceName (string) --

          The name of the service to which the endpoint is associated.

        • State (string) --

          The state of the endpoint.

        • PolicyDocument (string) --

          The policy document associated with the endpoint, if applicable.

        • RouteTableIds (list) --

          (Gateway endpoint) One or more route tables associated with the endpoint.

          • (string) --
        • SubnetIds (list) --

          (Interface endpoint) The subnets for the endpoint.

          • (string) --
        • Groups (list) --

          (Interface endpoint) Information about the security groups that are associated with the network interface.

          • (dict) --

            Describes a security group.

            • GroupId (string) --

              The ID of the security group.

            • GroupName (string) --

              The name of the security group.

        • IpAddressType (string) --

          The IP address type for the endpoint.

        • DnsOptions (dict) --

          The DNS options for the endpoint.

          • DnsRecordIpType (string) --

            The DNS records created for the endpoint.

        • PrivateDnsEnabled (boolean) --

          (Interface endpoint) Indicates whether the VPC is associated with a private hosted zone.

        • RequesterManaged (boolean) --

          Indicates whether the endpoint is being managed by its service.

        • NetworkInterfaceIds (list) --

          (Interface endpoint) One or more network interfaces for the endpoint.

          • (string) --
        • DnsEntries (list) --

          (Interface endpoint) The DNS entries for the endpoint.

          • (dict) --

            Describes a DNS entry.

            • DnsName (string) --

              The DNS name.

            • HostedZoneId (string) --

              The ID of the private hosted zone.

        • CreationTimestamp (datetime) --

          The date and time that the endpoint was created.

        • Tags (list) --

          Any tags assigned to the endpoint.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the endpoint.

        • LastError (dict) --

          The last error that occurred for endpoint.

          • Message (string) --

            The error message for the VPC endpoint error.

          • Code (string) --

            The error code for the VPC endpoint error.

class EC2.Paginator.DescribeVpcPeeringConnections
paginator = client.get_paginator('describe_vpc_peering_connections')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpc_peering_connections().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    VpcPeeringConnectionIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.
    • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.
    • accepter-vpc-info.vpc-id - The ID of the accepter VPC.
    • expiration-time - The expiration date and time for the VPC peering connection.
    • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.
    • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.
    • requester-vpc-info.vpc-id - The ID of the requester VPC.
    • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected ).
    • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-peering-connection-id - The ID of the VPC peering connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionIds (list) --

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'VpcPeeringConnections': [
        {
            'AccepterVpcInfo': {
                'CidrBlock': 'string',
                'Ipv6CidrBlockSet': [
                    {
                        'Ipv6CidrBlock': 'string'
                    },
                ],
                'CidrBlockSet': [
                    {
                        'CidrBlock': 'string'
                    },
                ],
                'OwnerId': 'string',
                'PeeringOptions': {
                    'AllowDnsResolutionFromRemoteVpc': True|False,
                    'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                    'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                },
                'VpcId': 'string',
                'Region': 'string'
            },
            'ExpirationTime': datetime(2015, 1, 1),
            'RequesterVpcInfo': {
                'CidrBlock': 'string',
                'Ipv6CidrBlockSet': [
                    {
                        'Ipv6CidrBlock': 'string'
                    },
                ],
                'CidrBlockSet': [
                    {
                        'CidrBlock': 'string'
                    },
                ],
                'OwnerId': 'string',
                'PeeringOptions': {
                    'AllowDnsResolutionFromRemoteVpc': True|False,
                    'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                    'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
                },
                'VpcId': 'string',
                'Region': 'string'
            },
            'Status': {
                'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
                'Message': 'string'
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcPeeringConnectionId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • VpcPeeringConnections (list) --

      Information about the VPC peering connections.

      • (dict) --

        Describes a VPC peering connection.

        • AccepterVpcInfo (dict) --

          Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock (string) --

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet (list) --

            The IPv6 CIDR block for the VPC.

            • (dict) --

              Describes an IPv6 CIDR block.

              • Ipv6CidrBlock (string) --

                The IPv6 CIDR block.

          • CidrBlockSet (list) --

            Information about the IPv4 CIDR blocks for the VPC.

            • (dict) --

              Describes an IPv4 CIDR block.

              • CidrBlock (string) --

                The IPv4 CIDR block.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions (dict) --

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc (boolean) --

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

          • VpcId (string) --

            The ID of the VPC.

          • Region (string) --

            The Region in which the VPC is located.

        • ExpirationTime (datetime) --

          The time that an unaccepted VPC peering connection will expire.

        • RequesterVpcInfo (dict) --

          Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

          • CidrBlock (string) --

            The IPv4 CIDR block for the VPC.

          • Ipv6CidrBlockSet (list) --

            The IPv6 CIDR block for the VPC.

            • (dict) --

              Describes an IPv6 CIDR block.

              • Ipv6CidrBlock (string) --

                The IPv6 CIDR block.

          • CidrBlockSet (list) --

            Information about the IPv4 CIDR blocks for the VPC.

            • (dict) --

              Describes an IPv4 CIDR block.

              • CidrBlock (string) --

                The IPv4 CIDR block.

          • OwnerId (string) --

            The ID of the Amazon Web Services account that owns the VPC.

          • PeeringOptions (dict) --

            Information about the VPC peering connection options for the accepter or requester VPC.

            • AllowDnsResolutionFromRemoteVpc (boolean) --

              Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

            • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

              Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

            • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

              Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

          • VpcId (string) --

            The ID of the VPC.

          • Region (string) --

            The Region in which the VPC is located.

        • Status (dict) --

          The status of the VPC peering connection.

          • Code (string) --

            The status of the VPC peering connection.

          • Message (string) --

            A message that provides more information about the status, if applicable.

        • 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 256 Unicode characters.

        • VpcPeeringConnectionId (string) --

          The ID of the VPC peering connection.

class EC2.Paginator.DescribeVpcs
paginator = client.get_paginator('describe_vpcs')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.describe_vpcs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpcIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28 ).
    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
    • dhcp-options-id - The ID of a set of DHCP options.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.
    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
    • is-default - Indicates whether the VPC is the default VPC.
    • owner-id - The ID of the Amazon Web Services account that owns the VPC.
    • state - The state of the VPC (pending | available ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpcIds (list) --

    One or more VPC IDs.

    Default: Describes all your VPCs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Vpcs': [
        {
            'CidrBlock': 'string',
            'DhcpOptionsId': 'string',
            'State': 'pending'|'available',
            'VpcId': 'string',
            'OwnerId': 'string',
            'InstanceTenancy': 'default'|'dedicated'|'host',
            'Ipv6CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'Ipv6CidrBlock': 'string',
                    'Ipv6CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    },
                    'NetworkBorderGroup': 'string',
                    'Ipv6Pool': 'string'
                },
            ],
            'CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'CidrBlock': 'string',
                    'CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'IsDefault': True|False,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • Vpcs (list) --

      Information about one or more VPCs.

      • (dict) --

        Describes a VPC.

        • CidrBlock (string) --

          The primary IPv4 CIDR block for the VPC.

        • DhcpOptionsId (string) --

          The ID of the set of DHCP options you've associated with the VPC.

        • State (string) --

          The current state of the VPC.

        • VpcId (string) --

          The ID of the VPC.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • InstanceTenancy (string) --

          The allowed tenancy of instances launched into the VPC.

        • Ipv6CidrBlockAssociationSet (list) --

          Information about the IPv6 CIDR blocks associated with the VPC.

          • (dict) --

            Describes an IPv6 CIDR block associated with a VPC.

            • AssociationId (string) --

              The association ID for the IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

            • Ipv6CidrBlockState (dict) --

              Information about the state of the CIDR block.

              • State (string) --

                The state of the CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

            • NetworkBorderGroup (string) --

              The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1 .

            • Ipv6Pool (string) --

              The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

        • CidrBlockAssociationSet (list) --

          Information about the IPv4 CIDR blocks associated with the VPC.

          • (dict) --

            Describes an IPv4 CIDR block associated with a VPC.

            • AssociationId (string) --

              The association ID for the IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

            • CidrBlockState (dict) --

              Information about the state of the CIDR block.

              • State (string) --

                The state of the CIDR block.

              • StatusMessage (string) --

                A message about the status of the CIDR block, if applicable.

        • IsDefault (boolean) --

          Indicates whether the VPC is the default VPC.

        • Tags (list) --

          Any tags assigned to the VPC.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

class EC2.Paginator.GetAssociatedIpv6PoolCidrs
paginator = client.get_paginator('get_associated_ipv6_pool_cidrs')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_associated_ipv6_pool_cidrs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PoolId='string',
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • PoolId (string) --

    [REQUIRED]

    The ID of the IPv6 address pool.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Ipv6CidrAssociations': [
        {
            'Ipv6Cidr': 'string',
            'AssociatedResource': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Ipv6CidrAssociations (list) --

      Information about the IPv6 CIDR block associations.

      • (dict) --

        Describes an IPv6 CIDR block association.

        • Ipv6Cidr (string) --

          The IPv6 CIDR block.

        • AssociatedResource (string) --

          The resource that's associated with the IPv6 CIDR block.

class EC2.Paginator.GetGroupsForCapacityReservation
paginator = client.get_paginator('get_groups_for_capacity_reservation')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_groups_for_capacity_reservation().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    CapacityReservationId='string',
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • CapacityReservationId (string) --

    [REQUIRED]

    The ID of the Capacity Reservation.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'CapacityReservationGroups': [
        {
            'GroupArn': 'string',
            'OwnerId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • CapacityReservationGroups (list) --

      Information about the resource groups to which the Capacity Reservation has been added.

      • (dict) --

        Describes a resource group to which a Capacity Reservation has been added.

        • GroupArn (string) --

          The ARN of the resource group.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the resource group.

class EC2.Paginator.GetInstanceTypesFromInstanceRequirements
paginator = client.get_paginator('get_instance_types_from_instance_requirements')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_instance_types_from_instance_requirements().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    ArchitectureTypes=[
        'i386'|'x86_64'|'arm64'|'x86_64_mac',
    ],
    VirtualizationTypes=[
        'hvm'|'paravirtual',
    ],
    InstanceRequirements={
        'VCpuCount': {
            'Min': 123,
            'Max': 123
        },
        'MemoryMiB': {
            'Min': 123,
            'Max': 123
        },
        'CpuManufacturers': [
            'intel'|'amd'|'amazon-web-services',
        ],
        'MemoryGiBPerVCpu': {
            'Min': 123.0,
            'Max': 123.0
        },
        'ExcludedInstanceTypes': [
            'string',
        ],
        'InstanceGenerations': [
            'current'|'previous',
        ],
        'SpotMaxPricePercentageOverLowestPrice': 123,
        'OnDemandMaxPricePercentageOverLowestPrice': 123,
        'BareMetal': 'included'|'required'|'excluded',
        'BurstablePerformance': 'included'|'required'|'excluded',
        'RequireHibernateSupport': True|False,
        'NetworkInterfaceCount': {
            'Min': 123,
            'Max': 123
        },
        'LocalStorage': 'included'|'required'|'excluded',
        'LocalStorageTypes': [
            'hdd'|'ssd',
        ],
        'TotalLocalStorageGB': {
            'Min': 123.0,
            'Max': 123.0
        },
        'BaselineEbsBandwidthMbps': {
            'Min': 123,
            'Max': 123
        },
        'AcceleratorTypes': [
            'gpu'|'fpga'|'inference',
        ],
        'AcceleratorCount': {
            'Min': 123,
            'Max': 123
        },
        'AcceleratorManufacturers': [
            'nvidia'|'amd'|'amazon-web-services'|'xilinx',
        ],
        'AcceleratorNames': [
            'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
        ],
        'AcceleratorTotalMemoryMiB': {
            'Min': 123,
            'Max': 123
        }
    },
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • ArchitectureTypes (list) --

    [REQUIRED]

    The processor architecture type.

    • (string) --
  • VirtualizationTypes (list) --

    [REQUIRED]

    The virtualization type.

    • (string) --
  • InstanceRequirements (dict) --

    [REQUIRED]

    The attributes required for the instance types.

    • VCpuCount (dict) -- [REQUIRED]

      The minimum and maximum number of vCPUs.

      • Min (integer) -- [REQUIRED]

        The minimum number of vCPUs. To specify no minimum limit, specify 0 .

      • Max (integer) --

        The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

    • MemoryMiB (dict) -- [REQUIRED]

      The minimum and maximum amount of memory, in MiB.

      • Min (integer) -- [REQUIRED]

        The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

      • Max (integer) --

        The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

    • CpuManufacturers (list) --

      The CPU manufacturers to include.

      • For instance types with Intel CPUs, specify intel .
      • For instance types with AMD CPUs, specify amd .
      • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

      Note

      Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

      Default: Any manufacturer

      • (string) --
    • MemoryGiBPerVCpu (dict) --

      The minimum and maximum amount of memory per vCPU, in GiB.

      Default: No minimum or maximum limits

      • Min (float) --

        The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

      • Max (float) --

        The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

    • ExcludedInstanceTypes (list) --

      The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

      For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

      Default: No excluded instance types

      • (string) --
    • InstanceGenerations (list) --

      Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

      For current generation instance types, specify current .

      For previous generation instance types, specify previous .

      Default: Current and previous generation instance types

      • (string) --
    • SpotMaxPricePercentageOverLowestPrice (integer) --

      The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

      To turn off price protection, specify a high value, such as 999999 .

      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

      Note

      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

      Default: 100

    • OnDemandMaxPricePercentageOverLowestPrice (integer) --

      The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

      The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

      To turn off price protection, specify a high value, such as 999999 .

      This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

      Note

      If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

      Default: 20

    • BareMetal (string) --

      Indicates whether bare metal instance types must be included, excluded, or required.

      • To include bare metal instance types, specify included .
      • To require only bare metal instance types, specify required .
      • To exclude bare metal instance types, specify excluded .

      Default: excluded

    • BurstablePerformance (string) --

      Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

      • To include burstable performance instance types, specify included .
      • To require only burstable performance instance types, specify required .
      • To exclude burstable performance instance types, specify excluded .

      Default: excluded

    • RequireHibernateSupport (boolean) --

      Indicates whether instance types must support hibernation for On-Demand Instances.

      This parameter is not supported for GetSpotPlacementScores .

      Default: false

    • NetworkInterfaceCount (dict) --

      The minimum and maximum number of network interfaces.

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

    • LocalStorage (string) --

      Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

      • To include instance types with instance store volumes, specify included .
      • To require only instance types with instance store volumes, specify required .
      • To exclude instance types with instance store volumes, specify excluded .

      Default: included

    • LocalStorageTypes (list) --

      The type of local storage that is required.

      • For instance types with hard disk drive (HDD) storage, specify hdd .
      • For instance types with solid state drive (SSD) storage, specify ssd .

      Default: hdd and ssd

      • (string) --
    • TotalLocalStorageGB (dict) --

      The minimum and maximum amount of total local storage, in GB.

      Default: No minimum or maximum limits

      • Min (float) --

        The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

      • Max (float) --

        The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

    • BaselineEbsBandwidthMbps (dict) --

      The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

    • AcceleratorTypes (list) --

      The accelerator types that must be on the instance type.

      • To include instance types with GPU hardware, specify gpu .
      • To include instance types with FPGA hardware, specify fpga .
      • To include instance types with inference hardware, specify inference .

      Default: Any accelerator type

      • (string) --
    • AcceleratorCount (dict) --

      The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

      To exclude accelerator-enabled instance types, set Max to 0 .

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum number of accelerators. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

    • AcceleratorManufacturers (list) --

      Indicates whether instance types must have accelerators by specific manufacturers.

      • For instance types with NVIDIA devices, specify nvidia .
      • For instance types with AMD devices, specify amd .
      • For instance types with Amazon Web Services devices, specify amazon-web-services .
      • For instance types with Xilinx devices, specify xilinx .

      Default: Any manufacturer

      • (string) --
    • AcceleratorNames (list) --

      The accelerators that must be on the instance type.

      • For instance types with NVIDIA A100 GPUs, specify a100 .
      • For instance types with NVIDIA V100 GPUs, specify v100 .
      • For instance types with NVIDIA K80 GPUs, specify k80 .
      • For instance types with NVIDIA T4 GPUs, specify t4 .
      • For instance types with NVIDIA M60 GPUs, specify m60 .
      • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
      • For instance types with Xilinx VU9P FPGAs, specify vu9p .

      Default: Any accelerator

      • (string) --
    • AcceleratorTotalMemoryMiB (dict) --

      The minimum and maximum amount of total accelerator memory, in MiB.

      Default: No minimum or maximum limits

      • Min (integer) --

        The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

      • Max (integer) --

        The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'InstanceTypes': [
        {
            'InstanceType': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • InstanceTypes (list) --

      The instance types with the specified instance attributes.

      • (dict) --

        The list of instance types with the specified instance attributes.

        • InstanceType (string) --

          The matching instance type.

class EC2.Paginator.GetIpamAddressHistory
paginator = client.get_paginator('get_ipam_address_history')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_ipam_address_history().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Cidr='string',
    IpamScopeId='string',
    VpcId='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Cidr (string) --

    [REQUIRED]

    The CIDR you want the history of. The CIDR can be an IPv4 or IPv6 IP address range. If you enter a /16 IPv4 CIDR, you will get records that match it exactly. You will not get records for any subnets within the /16 CIDR.

  • IpamScopeId (string) --

    [REQUIRED]

    The ID of the IPAM scope that the CIDR is in.

  • VpcId (string) -- The ID of the VPC you want your history records filtered by.
  • StartTime (datetime) -- The start of the time period for which you are looking for history. If you omit this option, it will default to the value of EndTime.
  • EndTime (datetime) -- The end of the time period for which you are looking for history. If you omit this option, it will default to the current time.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'HistoryRecords': [
        {
            'ResourceOwnerId': 'string',
            'ResourceRegion': 'string',
            'ResourceType': 'eip'|'vpc'|'subnet'|'network-interface'|'instance',
            'ResourceId': 'string',
            'ResourceCidr': 'string',
            'ResourceName': 'string',
            'ResourceComplianceStatus': 'compliant'|'noncompliant'|'unmanaged'|'ignored',
            'ResourceOverlapStatus': 'overlapping'|'nonoverlapping'|'ignored',
            'VpcId': 'string',
            'SampledStartTime': datetime(2015, 1, 1),
            'SampledEndTime': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • HistoryRecords (list) --

      A historical record for a CIDR within an IPAM scope. If the CIDR is associated with an EC2 instance, you will see an object in the response for the instance and one for the network interface.

      • (dict) --

        The historical record of a CIDR within an IPAM scope. For more information, see View the history of IP addresses in the Amazon VPC IPAM User Guide .

        • ResourceOwnerId (string) --

          The ID of the resource owner.

        • ResourceRegion (string) --

          The Amazon Web Services Region of the resource.

        • ResourceType (string) --

          The type of the resource.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceCidr (string) --

          The CIDR of the resource.

        • ResourceName (string) --

          The name of the resource.

        • ResourceComplianceStatus (string) --

          The compliance status of a resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • ResourceOverlapStatus (string) --

          The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • VpcId (string) --

          The VPC ID of the resource.

        • SampledStartTime (datetime) --

          Sampled start time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the start time may have occurred before this specific time.

        • SampledEndTime (datetime) --

          Sampled end time of the resource-to-CIDR association within the IPAM scope. Changes are picked up in periodic snapshots, so the end time may have occurred before this specific time.

class EC2.Paginator.GetIpamPoolAllocations
paginator = client.get_paginator('get_ipam_pool_allocations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_ipam_pool_allocations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    IpamPoolId='string',
    IpamPoolAllocationId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool you want to see the allocations for.

  • IpamPoolAllocationId (string) -- The ID of the allocation.
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'IpamPoolAllocations': [
        {
            'Cidr': 'string',
            'IpamPoolAllocationId': 'string',
            'Description': 'string',
            'ResourceId': 'string',
            'ResourceType': 'ipam-pool'|'vpc'|'ec2-public-ipv4-pool'|'custom',
            'ResourceRegion': 'string',
            'ResourceOwner': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • IpamPoolAllocations (list) --

      The IPAM pool allocations you want information on.

      • (dict) --

        In IPAM, an allocation is a CIDR assignment from an IPAM pool to another resource or IPAM pool.

        • Cidr (string) --

          The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .

        • IpamPoolAllocationId (string) --

          The ID of an allocation.

        • Description (string) --

          A description of the pool allocation.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of the resource.

        • ResourceRegion (string) --

          The Amazon Web Services Region of the resource.

        • ResourceOwner (string) --

          The owner of the resource.

class EC2.Paginator.GetIpamPoolCidrs
paginator = client.get_paginator('get_ipam_pool_cidrs')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_ipam_pool_cidrs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    IpamPoolId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • IpamPoolId (string) --

    [REQUIRED]

    The ID of the IPAM pool you want the CIDR for.

  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'IpamPoolCidrs': [
        {
            'Cidr': 'string',
            'State': 'pending-provision'|'provisioned'|'failed-provision'|'pending-deprovision'|'deprovisioned'|'failed-deprovision'|'pending-import'|'failed-import',
            'FailureReason': {
                'Code': 'cidr-not-available',
                'Message': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) --

    • IpamPoolCidrs (list) --

      Information about the CIDRs provisioned to an IPAM pool.

      • (dict) --

        A CIDR provisioned to an IPAM pool.

        • Cidr (string) --

          The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 .

        • State (string) --

          The state of the CIDR.

        • FailureReason (dict) --

          Details related to why an IPAM pool CIDR failed to be provisioned.

          • Code (string) --

            An error code related to why an IPAM pool CIDR failed to be provisioned.

          • Message (string) --

            A message related to why an IPAM pool CIDR failed to be provisioned.

class EC2.Paginator.GetIpamResourceCidrs
paginator = client.get_paginator('get_ipam_resource_cidrs')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_ipam_resource_cidrs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    IpamScopeId='string',
    IpamPoolId='string',
    ResourceId='string',
    ResourceType='vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool',
    ResourceTag={
        'Key': 'string',
        'Value': 'string'
    },
    ResourceOwner='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- A check for 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 .
  • Filters (list) --

    One or more filters for the request. For more information about filtering, see Filtering CLI output .

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • IpamScopeId (string) --

    [REQUIRED]

    The ID of the scope that the resource is in.

  • IpamPoolId (string) -- The ID of the IPAM pool that the resource is in.
  • ResourceId (string) -- The ID of the resource.
  • ResourceType (string) -- The resource type.
  • ResourceTag (dict) --

    A tag on an IPAM resource.

    • Key (string) --

      The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

    • Value (string) --

      The value for the tag.

  • ResourceOwner (string) -- The ID of the Amazon Web Services account that owns the resource.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'IpamResourceCidrs': [
        {
            'IpamId': 'string',
            'IpamScopeId': 'string',
            'IpamPoolId': 'string',
            'ResourceRegion': 'string',
            'ResourceOwnerId': 'string',
            'ResourceId': 'string',
            'ResourceName': 'string',
            'ResourceCidr': 'string',
            'ResourceType': 'vpc'|'subnet'|'eip'|'public-ipv4-pool'|'ipv6-pool',
            'ResourceTags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'IpUsage': 123.0,
            'ComplianceStatus': 'compliant'|'noncompliant'|'unmanaged'|'ignored',
            'ManagementState': 'managed'|'unmanaged'|'ignored',
            'OverlapStatus': 'overlapping'|'nonoverlapping'|'ignored',
            'VpcId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • IpamResourceCidrs (list) --

      The resource CIDRs.

      • (dict) --

        The CIDR for an IPAM resource.

        • IpamId (string) --

          The IPAM ID for an IPAM resource.

        • IpamScopeId (string) --

          The scope ID for an IPAM resource.

        • IpamPoolId (string) --

          The pool ID for an IPAM resource.

        • ResourceRegion (string) --

          The Amazon Web Services Region for an IPAM resource.

        • ResourceOwnerId (string) --

          The Amazon Web Services account number of the owner of an IPAM resource.

        • ResourceId (string) --

          The ID of an IPAM resource.

        • ResourceName (string) --

          The name of an IPAM resource.

        • ResourceCidr (string) --

          The CIDR for an IPAM resource.

        • ResourceType (string) --

          The type of IPAM resource.

        • ResourceTags (list) --

          The tags for an IPAM resource.

          • (dict) --

            The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

            • Key (string) --

              The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

            • Value (string) --

              The value of the tag.

        • IpUsage (float) --

          The percentage of IP address space in use. To convert the decimal to a percentage, multiply the decimal by 100. Note the following:

          • For a resources that are VPCs, this is the percentage of IP address space in the VPC that's taken up by subnet CIDRs.
          • For resources that are subnets, if the subnet has an IPv4 CIDR provisioned to it, this is the percentage of IPv4 address space in the subnet that's in use. If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address space in use is not represented. The percentage of IPv6 address space in use cannot currently be calculated.
          • For resources that are public IPv4 pools, this is the percentage of IP address space in the pool that's been allocated to Elastic IP addresses (EIPs).
        • ComplianceStatus (string) --

          The compliance status of the IPAM resource. For more information on compliance statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • ManagementState (string) --

          The management state of the resource. For more information about management states, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • OverlapStatus (string) --

          The overlap status of an IPAM resource. The overlap status tells you if the CIDR for a resource overlaps with another CIDR in the scope. For more information on overlap statuses, see Monitor CIDR usage by resource in the Amazon VPC IPAM User Guide .

        • VpcId (string) --

          The ID of a VPC.

class EC2.Paginator.GetManagedPrefixListAssociations
paginator = client.get_paginator('get_managed_prefix_list_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_managed_prefix_list_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    PrefixListId='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'PrefixListAssociations': [
        {
            'ResourceId': 'string',
            'ResourceOwner': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • PrefixListAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes the resource with which a prefix list is associated.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceOwner (string) --

          The owner of the resource.

class EC2.Paginator.GetManagedPrefixListEntries
paginator = client.get_paginator('get_managed_prefix_list_entries')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_managed_prefix_list_entries().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    PrefixListId='string',
    TargetVersion=123,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PrefixListId (string) --

    [REQUIRED]

    The ID of the prefix list.

  • TargetVersion (integer) -- The version of the prefix list for which to return the entries. The default is the current version.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Entries': [
        {
            'Cidr': 'string',
            'Description': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Entries (list) --

      Information about the prefix list entries.

      • (dict) --

        Describes a prefix list entry.

        • Cidr (string) --

          The CIDR block.

        • Description (string) --

          The description.

class EC2.Paginator.GetSpotPlacementScores
paginator = client.get_paginator('get_spot_placement_scores')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_spot_placement_scores().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    InstanceTypes=[
        'string',
    ],
    TargetCapacity=123,
    TargetCapacityUnitType='vcpu'|'memory-mib'|'units',
    SingleAvailabilityZone=True|False,
    RegionNames=[
        'string',
    ],
    InstanceRequirementsWithMetadata={
        'ArchitectureTypes': [
            'i386'|'x86_64'|'arm64'|'x86_64_mac',
        ],
        'VirtualizationTypes': [
            'hvm'|'paravirtual',
        ],
        'InstanceRequirements': {
            'VCpuCount': {
                'Min': 123,
                'Max': 123
            },
            'MemoryMiB': {
                'Min': 123,
                'Max': 123
            },
            'CpuManufacturers': [
                'intel'|'amd'|'amazon-web-services',
            ],
            'MemoryGiBPerVCpu': {
                'Min': 123.0,
                'Max': 123.0
            },
            'ExcludedInstanceTypes': [
                'string',
            ],
            'InstanceGenerations': [
                'current'|'previous',
            ],
            'SpotMaxPricePercentageOverLowestPrice': 123,
            'OnDemandMaxPricePercentageOverLowestPrice': 123,
            'BareMetal': 'included'|'required'|'excluded',
            'BurstablePerformance': 'included'|'required'|'excluded',
            'RequireHibernateSupport': True|False,
            'NetworkInterfaceCount': {
                'Min': 123,
                'Max': 123
            },
            'LocalStorage': 'included'|'required'|'excluded',
            'LocalStorageTypes': [
                'hdd'|'ssd',
            ],
            'TotalLocalStorageGB': {
                'Min': 123.0,
                'Max': 123.0
            },
            'BaselineEbsBandwidthMbps': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorTypes': [
                'gpu'|'fpga'|'inference',
            ],
            'AcceleratorCount': {
                'Min': 123,
                'Max': 123
            },
            'AcceleratorManufacturers': [
                'nvidia'|'amd'|'amazon-web-services'|'xilinx',
            ],
            'AcceleratorNames': [
                'a100'|'v100'|'k80'|'t4'|'m60'|'radeon-pro-v520'|'vu9p',
            ],
            'AcceleratorTotalMemoryMiB': {
                'Min': 123,
                'Max': 123
            }
        }
    },
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • InstanceTypes (list) --

    The instance types. We recommend that you specify at least three instance types. If you specify one or two instance types, or specify variations of a single instance type (for example, an m3.xlarge with and without instance storage), the returned placement score will always be low.

    If you specify InstanceTypes , you can't specify InstanceRequirementsWithMetadata .

    • (string) --
  • TargetCapacity (integer) --

    [REQUIRED]

    The target capacity.

  • TargetCapacityUnitType (string) --

    The unit for the target capacity.

    Default: units (translates to number of instances)

  • SingleAvailabilityZone (boolean) --

    Specify true so that the response returns a list of scored Availability Zones. Otherwise, the response returns a list of scored Regions.

    A list of scored Availability Zones is useful if you want to launch all of your Spot capacity into a single Availability Zone.

  • RegionNames (list) --

    The Regions used to narrow down the list of Regions to be scored. Enter the Region code, for example, us-east-1 .

    • (string) --
  • InstanceRequirementsWithMetadata (dict) --

    The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

    If you specify InstanceRequirementsWithMetadata , you can't specify InstanceTypes .

    • ArchitectureTypes (list) --

      The architecture type.

      • (string) --
    • VirtualizationTypes (list) --

      The virtualization type.

      • (string) --
    • InstanceRequirements (dict) --

      The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.

      • VCpuCount (dict) -- [REQUIRED]

        The minimum and maximum number of vCPUs.

        • Min (integer) -- [REQUIRED]

          The minimum number of vCPUs. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum number of vCPUs. To specify no maximum limit, omit this parameter.

      • MemoryMiB (dict) -- [REQUIRED]

        The minimum and maximum amount of memory, in MiB.

        • Min (integer) -- [REQUIRED]

          The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 .

        • Max (integer) --

          The maximum amount of memory, in MiB. To specify no maximum limit, omit this parameter.

      • CpuManufacturers (list) --

        The CPU manufacturers to include.

        • For instance types with Intel CPUs, specify intel .
        • For instance types with AMD CPUs, specify amd .
        • For instance types with Amazon Web Services CPUs, specify amazon-web-services .

        Note

        Don't confuse the CPU manufacturer with the CPU architecture. Instances will be launched with a compatible CPU architecture based on the Amazon Machine Image (AMI) that you specify in your launch template.

        Default: Any manufacturer

        • (string) --
      • MemoryGiBPerVCpu (dict) --

        The minimum and maximum amount of memory per vCPU, in GiB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, omit this parameter.

      • ExcludedInstanceTypes (list) --

        The instance types to exclude. You can use strings with one or more wild cards, represented by an asterisk (* ), to exclude an instance family, type, size, or generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* .

        For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance family, which includes all C5a and C5n instance types. If you specify m5a.* , Amazon EC2 will exclude all the M5a instance types, but not the M5n instance types.

        Default: No excluded instance types

        • (string) --
      • InstanceGenerations (list) --

        Indicates whether current or previous generation instance types are included. The current generation instance types are recommended for use. Current generation instance types are typically the latest two to three generations in each instance family. For more information, see Instance types in the Amazon EC2 User Guide .

        For current generation instance types, specify current .

        For previous generation instance types, specify previous .

        Default: Current and previous generation instance types

        • (string) --
      • SpotMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for Spot Instance. This is the maximum you’ll pay for an Spot Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 100

      • OnDemandMaxPricePercentageOverLowestPrice (integer) --

        The price protection threshold for On-Demand Instances. This is the maximum you’ll pay for an On-Demand Instance, expressed as a percentage above the least expensive current generation M, C, or R instance type with your specified attributes. When Amazon EC2 selects instance types with your attributes, it excludes instance types priced above your threshold.

        The parameter accepts an integer, which Amazon EC2 interprets as a percentage.

        To turn off price protection, specify a high value, such as 999999 .

        This parameter is not supported for GetSpotPlacementScores and GetInstanceTypesFromInstanceRequirements .

        Note

        If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is applied based on the per-vCPU or per-memory price instead of the per-instance price.

        Default: 20

      • BareMetal (string) --

        Indicates whether bare metal instance types must be included, excluded, or required.

        • To include bare metal instance types, specify included .
        • To require only bare metal instance types, specify required .
        • To exclude bare metal instance types, specify excluded .

        Default: excluded

      • BurstablePerformance (string) --

        Indicates whether burstable performance T instance types are included, excluded, or required. For more information, see Burstable performance instances .

        • To include burstable performance instance types, specify included .
        • To require only burstable performance instance types, specify required .
        • To exclude burstable performance instance types, specify excluded .

        Default: excluded

      • RequireHibernateSupport (boolean) --

        Indicates whether instance types must support hibernation for On-Demand Instances.

        This parameter is not supported for GetSpotPlacementScores .

        Default: false

      • NetworkInterfaceCount (dict) --

        The minimum and maximum number of network interfaces.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of network interfaces. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of network interfaces. To specify no maximum limit, omit this parameter.

      • LocalStorage (string) --

        Indicates whether instance types with instance store volumes are included, excluded, or required. For more information, Amazon EC2 instance store in the Amazon EC2 User Guide .

        • To include instance types with instance store volumes, specify included .
        • To require only instance types with instance store volumes, specify required .
        • To exclude instance types with instance store volumes, specify excluded .

        Default: included

      • LocalStorageTypes (list) --

        The type of local storage that is required.

        • For instance types with hard disk drive (HDD) storage, specify hdd .
        • For instance types with solid state drive (SSD) storage, specify ssd .

        Default: hdd and ssd

        • (string) --
      • TotalLocalStorageGB (dict) --

        The minimum and maximum amount of total local storage, in GB.

        Default: No minimum or maximum limits

        • Min (float) --

          The minimum amount of total local storage, in GB. To specify no minimum limit, omit this parameter.

        • Max (float) --

          The maximum amount of total local storage, in GB. To specify no maximum limit, omit this parameter.

      • BaselineEbsBandwidthMbps (dict) --

        The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more information, see Amazon EBS–optimized instances in the Amazon EC2 User Guide .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this parameter.

      • AcceleratorTypes (list) --

        The accelerator types that must be on the instance type.

        • To include instance types with GPU hardware, specify gpu .
        • To include instance types with FPGA hardware, specify fpga .
        • To include instance types with inference hardware, specify inference .

        Default: Any accelerator type

        • (string) --
      • AcceleratorCount (dict) --

        The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web Services Inferentia chips) on an instance.

        To exclude accelerator-enabled instance types, set Max to 0 .

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum number of accelerators. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum number of accelerators. To specify no maximum limit, omit this parameter. To exclude accelerator-enabled instance types, set Max to 0 .

      • AcceleratorManufacturers (list) --

        Indicates whether instance types must have accelerators by specific manufacturers.

        • For instance types with NVIDIA devices, specify nvidia .
        • For instance types with AMD devices, specify amd .
        • For instance types with Amazon Web Services devices, specify amazon-web-services .
        • For instance types with Xilinx devices, specify xilinx .

        Default: Any manufacturer

        • (string) --
      • AcceleratorNames (list) --

        The accelerators that must be on the instance type.

        • For instance types with NVIDIA A100 GPUs, specify a100 .
        • For instance types with NVIDIA V100 GPUs, specify v100 .
        • For instance types with NVIDIA K80 GPUs, specify k80 .
        • For instance types with NVIDIA T4 GPUs, specify t4 .
        • For instance types with NVIDIA M60 GPUs, specify m60 .
        • For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 .
        • For instance types with Xilinx VU9P FPGAs, specify vu9p .

        Default: Any accelerator

        • (string) --
      • AcceleratorTotalMemoryMiB (dict) --

        The minimum and maximum amount of total accelerator memory, in MiB.

        Default: No minimum or maximum limits

        • Min (integer) --

          The minimum amount of accelerator memory, in MiB. To specify no minimum limit, omit this parameter.

        • Max (integer) --

          The maximum amount of accelerator memory, in MiB. To specify no maximum limit, omit this parameter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'SpotPlacementScores': [
        {
            'Region': 'string',
            'AvailabilityZoneId': 'string',
            'Score': 123
        },
    ],

}

Response Structure

  • (dict) --

    • SpotPlacementScores (list) --

      The Spot placement score for the top 10 Regions or Availability Zones, scored on a scale from 1 to 10. Each score reflects how likely it is that each Region or Availability Zone will succeed at fulfilling the specified target capacity at the time of the Spot placement score request . A score of 10 means that your Spot capacity request is highly likely to succeed in that Region or Availability Zone.

      If you request a Spot placement score for Regions, a high score assumes that your fleet request will be configured to use all Availability Zones and the capacity-optimized allocation strategy. If you request a Spot placement score for Availability Zones, a high score assumes that your fleet request will be configured to use a single Availability Zone and the capacity-optimized allocation strategy.

      Different Regions or Availability Zones might return the same score.

      Note

      The Spot placement score serves as a recommendation only. No score guarantees that your Spot request will be fully or partially fulfilled.

      • (dict) --

        The Spot placement score for this Region or Availability Zone. The score is calculated based on the assumption that the capacity-optimized allocation strategy is used and that all of the Availability Zones in the Region can be used.

        • Region (string) --

          The Region.

        • AvailabilityZoneId (string) --

          The Availability Zone.

        • Score (integer) --

          The placement score, on a scale from 1 to 10 . A score of 10 indicates that your Spot request is highly likely to succeed in this Region or Availability Zone. A score of 1 indicates that your Spot request is not likely to succeed.

class EC2.Paginator.GetTransitGatewayAttachmentPropagations
paginator = client.get_paginator('get_transit_gateway_attachment_propagations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_transit_gateway_attachment_propagations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayAttachmentId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayAttachmentId (string) --

    [REQUIRED]

    The ID of the attachment.

  • Filters (list) --

    One or more filters. The possible values are:

    • transit-gateway-route-table-id - The ID of the transit gateway route table.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayAttachmentPropagations': [
        {
            'TransitGatewayRouteTableId': 'string',
            'State': 'enabling'|'enabled'|'disabling'|'disabled'
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayAttachmentPropagations (list) --

      Information about the propagation route tables.

      • (dict) --

        Describes a propagation route table.

        • TransitGatewayRouteTableId (string) --

          The ID of the propagation route table.

        • State (string) --

          The state of the propagation route table.

class EC2.Paginator.GetTransitGatewayMulticastDomainAssociations
paginator = client.get_paginator('get_transit_gateway_multicast_domain_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_transit_gateway_multicast_domain_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayMulticastDomainId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • Filters (list) --

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.
    • resource-type - The type of resource. The valid value is: vpc .
    • state - The state of the subnet association. Valid values are associated | associating | disassociated | disassociating .
    • subnet-id - The ID of the subnet.
    • transit-gateway-attachment-id - The id of the transit gateway attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'MulticastDomainAssociations': [
        {
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceOwnerId': 'string',
            'Subnet': {
                'SubnetId': 'string',
                'State': 'pendingAcceptance'|'associating'|'associated'|'disassociating'|'disassociated'|'rejected'|'failed'
            }
        },
    ],

}

Response Structure

  • (dict) --

    • MulticastDomainAssociations (list) --

      Information about the multicast domain associations.

      • (dict) --

        Describes the resources associated with the transit gateway multicast domain.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway attachment.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of resource, for example a VPC attachment.

        • ResourceOwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain association resource.

        • Subnet (dict) --

          The subnet associated with the transit gateway multicast domain.

          • SubnetId (string) --

            The ID of the subnet.

          • State (string) --

            The state of the subnet association.

class EC2.Paginator.GetTransitGatewayPolicyTableAssociations
paginator = client.get_paginator('get_transit_gateway_policy_table_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_transit_gateway_policy_table_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayPolicyTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayPolicyTableId (string) --

    [REQUIRED]

    The ID of the transit gateway policy table.

  • Filters (list) --

    The filters associated with the transit gateway policy table.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Associations': [
        {
            'TransitGatewayPolicyTableId': 'string',
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'State': 'associating'|'associated'|'disassociating'|'disassociated'
        },
    ],

}

Response Structure

  • (dict) --

    • Associations (list) --

      Returns details about the transit gateway policy table association.

      • (dict) --

        Describes a transit gateway policy table association.

        • TransitGatewayPolicyTableId (string) --

          The ID of the transit gateway policy table.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway attachment.

        • ResourceId (string) --

          The resource ID of the transit gateway attachment.

        • ResourceType (string) --

          The resource type for the transit gateway policy table association.

        • State (string) --

          The state of the transit gateway policy table association.

class EC2.Paginator.GetTransitGatewayPrefixListReferences
paginator = client.get_paginator('get_transit_gateway_prefix_list_references')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_transit_gateway_prefix_list_references().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • Filters (list) --

    One or more filters. The possible values are:

    • attachment.resource-id - The ID of the resource for the attachment.
    • attachment.resource-type - The type of resource for the attachment. Valid values are vpc | vpn | direct-connect-gateway | peering .
    • attachment.transit-gateway-attachment-id - The ID of the attachment.
    • is-blackhole - Whether traffic matching the route is blocked (true | false ).
    • prefix-list-id - The ID of the prefix list.
    • prefix-list-owner-id - The ID of the owner of the prefix list.
    • state - The state of the prefix list reference (pending | available | modifying | deleting ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayPrefixListReferences': [
        {
            'TransitGatewayRouteTableId': 'string',
            'PrefixListId': 'string',
            'PrefixListOwnerId': 'string',
            'State': 'pending'|'available'|'modifying'|'deleting',
            'Blackhole': True|False,
            'TransitGatewayAttachment': {
                'TransitGatewayAttachmentId': 'string',
                'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
                'ResourceId': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayPrefixListReferences (list) --

      Information about the prefix list references.

      • (dict) --

        Describes a prefix list reference.

        • TransitGatewayRouteTableId (string) --

          The ID of the transit gateway route table.

        • PrefixListId (string) --

          The ID of the prefix list.

        • PrefixListOwnerId (string) --

          The ID of the prefix list owner.

        • State (string) --

          The state of the prefix list reference.

        • Blackhole (boolean) --

          Indicates whether traffic that matches this route is dropped.

        • TransitGatewayAttachment (dict) --

          Information about the transit gateway attachment.

          • TransitGatewayAttachmentId (string) --

            The ID of the attachment.

          • ResourceType (string) --

            The resource type. Note that the tgw-peering resource type has been deprecated.

          • ResourceId (string) --

            The ID of the resource.

class EC2.Paginator.GetTransitGatewayRouteTableAssociations
paginator = client.get_paginator('get_transit_gateway_route_table_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_transit_gateway_route_table_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • Filters (list) --

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.
    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect .
    • transit-gateway-attachment-id - The ID of the attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Associations': [
        {
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'State': 'associating'|'associated'|'disassociating'|'disassociated'
        },
    ],

}

Response Structure

  • (dict) --

    • Associations (list) --

      Information about the associations.

      • (dict) --

        Describes an association between a route table and a resource attachment.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The resource type. Note that the tgw-peering resource type has been deprecated.

        • State (string) --

          The state of the association.

class EC2.Paginator.GetTransitGatewayRouteTablePropagations
paginator = client.get_paginator('get_transit_gateway_route_table_propagations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_transit_gateway_route_table_propagations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the transit gateway route table.

  • Filters (list) --

    One or more filters. The possible values are:

    • resource-id - The ID of the resource.
    • resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect .
    • transit-gateway-attachment-id - The ID of the attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TransitGatewayRouteTablePropagations': [
        {
            'TransitGatewayAttachmentId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'State': 'enabling'|'enabled'|'disabling'|'disabled',
            'TransitGatewayRouteTableAnnouncementId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • TransitGatewayRouteTablePropagations (list) --

      Information about the route table propagations.

      • (dict) --

        Describes a route table propagation.

        • TransitGatewayAttachmentId (string) --

          The ID of the attachment.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of resource. Note that the tgw-peering resource type has been deprecated.

        • State (string) --

          The state of the resource.

        • TransitGatewayRouteTableAnnouncementId (string) --

          The ID of the transit gateway route table announcement.

class EC2.Paginator.GetVpnConnectionDeviceTypes
paginator = client.get_paginator('get_vpn_connection_device_types')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.get_vpn_connection_device_types().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'VpnConnectionDeviceTypes': [
        {
            'VpnConnectionDeviceTypeId': 'string',
            'Vendor': 'string',
            'Platform': 'string',
            'Software': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • VpnConnectionDeviceTypes (list) --

      List of customer gateway devices that have a sample configuration file available for use.

      • (dict) --

        List of customer gateway devices that have a sample configuration file available for use. You can also see the list of device types with sample configuration files available under Your customer gateway device in the Amazon Web Services Site-to-Site VPN User Guide .

        • VpnConnectionDeviceTypeId (string) --

          Customer gateway device identifier.

        • Vendor (string) --

          Customer gateway device vendor.

        • Platform (string) --

          Customer gateway device platform.

        • Software (string) --

          Customer gateway device software version.

class EC2.Paginator.ListImagesInRecycleBin
paginator = client.get_paginator('list_images_in_recycle_bin')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.list_images_in_recycle_bin().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    ImageIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • ImageIds (list) --

    The IDs of the AMIs to list. Omit this parameter to list all of the AMIs that are in the Recycle Bin. You can specify up to 20 IDs in a single request.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Images': [
        {
            'ImageId': 'string',
            'Name': 'string',
            'Description': 'string',
            'RecycleBinEnterTime': datetime(2015, 1, 1),
            'RecycleBinExitTime': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --

    • Images (list) --

      Information about the AMIs.

      • (dict) --

        Information about an AMI that is currently in the Recycle Bin.

        • ImageId (string) --

          The ID of the AMI.

        • Name (string) --

          The name of the AMI.

        • Description (string) --

          The description of the AMI.

        • RecycleBinEnterTime (datetime) --

          The date and time when the AMI entered the Recycle Bin.

        • RecycleBinExitTime (datetime) --

          The date and time when the AMI is to be permanently deleted from the Recycle Bin.

class EC2.Paginator.ListSnapshotsInRecycleBin
paginator = client.get_paginator('list_snapshots_in_recycle_bin')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.list_snapshots_in_recycle_bin().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    SnapshotIds=[
        'string',
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • SnapshotIds (list) --

    The IDs of the snapshots to list. Omit this parameter to list all of the snapshots that are in the Recycle Bin.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Snapshots': [
        {
            'SnapshotId': 'string',
            'RecycleBinEnterTime': datetime(2015, 1, 1),
            'RecycleBinExitTime': datetime(2015, 1, 1),
            'Description': 'string',
            'VolumeId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Snapshots (list) --

      Information about the snapshots.

      • (dict) --

        Information about a snapshot that is currently in the Recycle Bin.

        • SnapshotId (string) --

          The ID of the snapshot.

        • RecycleBinEnterTime (datetime) --

          The date and time when the snaphsot entered the Recycle Bin.

        • RecycleBinExitTime (datetime) --

          The date and time when the snapshot is to be permanently deleted from the Recycle Bin.

        • Description (string) --

          The description for the snapshot.

        • VolumeId (string) --

          The ID of the volume from which the snapshot was created.

class EC2.Paginator.SearchLocalGatewayRoutes
paginator = client.get_paginator('search_local_gateway_routes')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.search_local_gateway_routes().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    LocalGatewayRouteTableId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • LocalGatewayRouteTableId (string) --

    [REQUIRED]

    The ID of the local gateway route table.

  • Filters (list) --

    One or more filters.

    • route-search.exact-match - The exact match of the specified filter.
    • route-search.longest-prefix-match - The longest prefix that matches the route.
    • route-search.subnet-of-match - The routes with a subnet that match the specified CIDR filter.
    • route-search.supernet-of-match - The routes with a CIDR that encompass the CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your route table and you specify supernet-of-match as 10.0.1.0/30, then the result returns 10.0.1.0/29.
    • state - The state of the route.
    • type - The route type.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Routes': [
        {
            'DestinationCidrBlock': 'string',
            'LocalGatewayVirtualInterfaceGroupId': 'string',
            'Type': 'static'|'propagated',
            'State': 'pending'|'active'|'blackhole'|'deleting'|'deleted',
            'LocalGatewayRouteTableId': 'string',
            'LocalGatewayRouteTableArn': 'string',
            'OwnerId': 'string'
        },
    ],

}

Response Structure

  • (dict) --

    • Routes (list) --

      Information about the routes.

      • (dict) --

        Describes a route for a local gateway route table.

        • DestinationCidrBlock (string) --

          The CIDR block used for destination matches.

        • LocalGatewayVirtualInterfaceGroupId (string) --

          The ID of the virtual interface group.

        • Type (string) --

          The route type.

        • State (string) --

          The state of the route.

        • LocalGatewayRouteTableId (string) --

          The ID of the local gateway route table.

        • LocalGatewayRouteTableArn (string) --

          The Amazon Resource Name (ARN) of the local gateway route table.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the local gateway route.

class EC2.Paginator.SearchTransitGatewayMulticastGroups
paginator = client.get_paginator('search_transit_gateway_multicast_groups')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EC2.Client.search_transit_gateway_multicast_groups().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TransitGatewayMulticastDomainId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TransitGatewayMulticastDomainId (string) -- The ID of the transit gateway multicast domain.
  • Filters (list) --

    One or more filters. The possible values are:

    • group-ip-address - The IP address of the transit gateway multicast group.
    • is-group-member - The resource is a group member. Valid values are true | false .
    • is-group-source - The resource is a group source. Valid values are true | false .
    • member-type - The member type. Valid values are igmp | static .
    • resource-id - The ID of the resource.
    • resource-type - The type of resource. Valid values are vpc | vpn | direct-connect-gateway | tgw-peering .
    • source-type - The source type. Valid values are igmp | static .
    • subnet-id - The ID of the subnet.
    • transit-gateway-attachment-id - The id of the transit gateway attachment.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'MulticastGroups': [
        {
            'GroupIpAddress': 'string',
            'TransitGatewayAttachmentId': 'string',
            'SubnetId': 'string',
            'ResourceId': 'string',
            'ResourceType': 'vpc'|'vpn'|'direct-connect-gateway'|'connect'|'peering'|'tgw-peering',
            'ResourceOwnerId': 'string',
            'NetworkInterfaceId': 'string',
            'GroupMember': True|False,
            'GroupSource': True|False,
            'MemberType': 'static'|'igmp',
            'SourceType': 'static'|'igmp'
        },
    ],

}

Response Structure

  • (dict) --

    • MulticastGroups (list) --

      Information about the transit gateway multicast group.

      • (dict) --

        Describes the transit gateway multicast group resources.

        • GroupIpAddress (string) --

          The IP address assigned to the transit gateway multicast group.

        • TransitGatewayAttachmentId (string) --

          The ID of the transit gateway attachment.

        • SubnetId (string) --

          The ID of the subnet.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceType (string) --

          The type of resource, for example a VPC attachment.

        • ResourceOwnerId (string) --

          The ID of the Amazon Web Services account that owns the transit gateway multicast domain group resource.

        • NetworkInterfaceId (string) --

          The ID of the transit gateway attachment.

        • GroupMember (boolean) --

          Indicates that the resource is a transit gateway multicast group member.

        • GroupSource (boolean) --

          Indicates that the resource is a transit gateway multicast group member.

        • MemberType (string) --

          The member type (for example, static ).

        • SourceType (string) --

          The source type.

Waiters

The available waiters are:

class EC2.Waiter.BundleTaskComplete
waiter = client.get_waiter('bundle_task_complete')
wait(**kwargs)

Polls EC2.Client.describe_bundle_tasks() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    BundleIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • BundleIds (list) --

    The bundle task IDs.

    Default: Describes all your bundle tasks.

    • (string) --
  • Filters (list) --

    The filters.

    • bundle-id - The ID of the bundle task.
    • error-code - If the task failed, the error code returned.
    • error-message - If the task failed, the error message returned.
    • instance-id - The ID of the instance.
    • progress - The level of task completion, as a percentage (for example, 20%).
    • s3-bucket - The Amazon S3 bucket to store the AMI.
    • s3-prefix - The beginning of the AMI name.
    • start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z).
    • state - The state of the task (pending | waiting-for-shutdown | bundling | storing | cancelling | complete | failed ).
    • update-time - The time of the most recent update for the task.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.ConversionTaskCancelled
waiter = client.get_waiter('conversion_task_cancelled')
wait(**kwargs)

Polls EC2.Client.describe_conversion_tasks() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    ConversionTaskIds=[
        'string',
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • ConversionTaskIds (list) --

    The conversion task IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.ConversionTaskCompleted
waiter = client.get_waiter('conversion_task_completed')
wait(**kwargs)

Polls EC2.Client.describe_conversion_tasks() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    ConversionTaskIds=[
        'string',
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • ConversionTaskIds (list) --

    The conversion task IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.ConversionTaskDeleted
waiter = client.get_waiter('conversion_task_deleted')
wait(**kwargs)

Polls EC2.Client.describe_conversion_tasks() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    ConversionTaskIds=[
        'string',
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • ConversionTaskIds (list) --

    The conversion task IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.CustomerGatewayAvailable
waiter = client.get_waiter('customer_gateway_available')
wait(**kwargs)

Polls EC2.Client.describe_customer_gateways() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    CustomerGatewayIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • CustomerGatewayIds (list) --

    One or more customer gateway IDs.

    Default: Describes all your customer gateways.

    • (string) --
  • Filters (list) --

    One or more filters.

    • bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN).
    • customer-gateway-id - The ID of the customer gateway.
    • ip-address - The IP address of the customer gateway device's external interface.
    • state - The state of the customer gateway (pending | available | deleting | deleted ).
    • type - The type of customer gateway. Currently, the only supported type is ipsec.1 .
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.ExportTaskCancelled
waiter = client.get_waiter('export_task_cancelled')
wait(**kwargs)

Polls EC2.Client.describe_export_tasks() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    ExportTaskIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • ExportTaskIds (list) --

    The export task IDs.

    • (string) --
  • Filters (list) --

    the filters for the export tasks.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.ExportTaskCompleted
waiter = client.get_waiter('export_task_completed')
wait(**kwargs)

Polls EC2.Client.describe_export_tasks() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    ExportTaskIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • ExportTaskIds (list) --

    The export task IDs.

    • (string) --
  • Filters (list) --

    the filters for the export tasks.

    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.ImageAvailable
waiter = client.get_waiter('image_available')
wait(**kwargs)

Polls EC2.Client.describe_images() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    ExecutableUsers=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImageIds=[
        'string',
    ],
    Owners=[
        'string',
    ],
    IncludeDeprecated=True|False,
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • ExecutableUsers (list) --

    Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

    • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.
    • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.
    • If you specify all , all public AMIs are returned.
    • (string) --
  • Filters (list) --

    The filters.

    • architecture - The image architecture (i386 | x86_64 | arm64 ).
    • block-device-mapping.delete-on-termination - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.
    • block-device-mapping.device-name - The device name specified in the block device mapping (for example, /dev/sdh or xvdh ).
    • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.
    • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.
    • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard ).
    • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.
    • creation-date - The time when the image was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • description - The description of the image (provided during image creation).
    • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.
    • hypervisor - The hypervisor type (ovm | xen ).
    • image-id - The ID of the image.
    • image-type - The image type (machine | kernel | ramdisk ).
    • is-public - A Boolean that indicates whether the image is public.
    • kernel-id - The kernel ID.
    • manifest-location - The location of the image manifest.
    • name - The name of the AMI (provided during image creation).
    • owner-alias - The owner alias (amazon | aws-marketplace ). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.
    • platform - The platform. To only list Windows-based AMIs, use windows .
    • product-code - The product code.
    • product-code.type - The type of the product code (marketplace ).
    • ramdisk-id - The RAM disk ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (ebs | instance-store ).
    • state - The state of the image (available | pending | failed ).
    • state-reason-code - The reason code for the state change.
    • state-reason-message - The message for the state change.
    • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • virtualization-type - The virtualization type (paravirtual | hvm ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImageIds (list) --

    The image IDs.

    Default: Describes all images available to you.

    • (string) --
  • Owners (list) --

    Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , amazon , and aws-marketplace . If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • (string) --
  • IncludeDeprecated (boolean) --

    If true , all deprecated AMIs are included in the response. If false , no deprecated AMIs are included in the response. If no value is specified, the default value is false .

    Note

    If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false ) that you set for this parameter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.ImageExists
waiter = client.get_waiter('image_exists')
wait(**kwargs)

Polls EC2.Client.describe_images() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    ExecutableUsers=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImageIds=[
        'string',
    ],
    Owners=[
        'string',
    ],
    IncludeDeprecated=True|False,
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • ExecutableUsers (list) --

    Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

    • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.
    • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.
    • If you specify all , all public AMIs are returned.
    • (string) --
  • Filters (list) --

    The filters.

    • architecture - The image architecture (i386 | x86_64 | arm64 ).
    • block-device-mapping.delete-on-termination - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.
    • block-device-mapping.device-name - The device name specified in the block device mapping (for example, /dev/sdh or xvdh ).
    • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.
    • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.
    • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard ).
    • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.
    • creation-date - The time when the image was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • description - The description of the image (provided during image creation).
    • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.
    • hypervisor - The hypervisor type (ovm | xen ).
    • image-id - The ID of the image.
    • image-type - The image type (machine | kernel | ramdisk ).
    • is-public - A Boolean that indicates whether the image is public.
    • kernel-id - The kernel ID.
    • manifest-location - The location of the image manifest.
    • name - The name of the AMI (provided during image creation).
    • owner-alias - The owner alias (amazon | aws-marketplace ). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.
    • platform - The platform. To only list Windows-based AMIs, use windows .
    • product-code - The product code.
    • product-code.type - The type of the product code (marketplace ).
    • ramdisk-id - The RAM disk ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (ebs | instance-store ).
    • state - The state of the image (available | pending | failed ).
    • state-reason-code - The reason code for the state change.
    • state-reason-message - The message for the state change.
    • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • virtualization-type - The virtualization type (paravirtual | hvm ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImageIds (list) --

    The image IDs.

    Default: Describes all images available to you.

    • (string) --
  • Owners (list) --

    Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , amazon , and aws-marketplace . If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • (string) --
  • IncludeDeprecated (boolean) --

    If true , all deprecated AMIs are included in the response. If false , no deprecated AMIs are included in the response. If no value is specified, the default value is false .

    Note

    If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false ) that you set for this parameter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.InstanceExists
waiter = client.get_waiter('instance_exists')
wait(**kwargs)

Polls EC2.Client.describe_instances() every 5 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 5

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.InstanceRunning
waiter = client.get_waiter('instance_running')
wait(**kwargs)

Polls EC2.Client.describe_instances() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.InstanceStatusOk
waiter = client.get_waiter('instance_status_ok')
wait(**kwargs)

Polls EC2.Client.describe_instance_status() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False,
    IncludeAllInstances=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone of the instance.
    • event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop ).
    • event.description - A description of the event.
    • event.instance-event-id - The ID of the event whose date and time you are modifying.
    • event.not-after - The latest end time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before - The earliest start time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before-deadline - The deadline for starting the event (for example, 2014-09-15T17:15:20.000Z ).
    • instance-state-code - The code for the instance state, as a 16-bit unsigned integer. The high byte is used for internal purposes 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-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 100 explicitly specified instance IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to retrieve the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IncludeAllInstances (boolean) --

    When true , includes the health status for all instances. When false , includes the health status for running instances only.

    Default: false

  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.InstanceStopped
waiter = client.get_waiter('instance_stopped')
wait(**kwargs)

Polls EC2.Client.describe_instances() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.InstanceTerminated
waiter = client.get_waiter('instance_terminated')
wait(**kwargs)

Polls EC2.Client.describe_instances() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.InternetGatewayExists
waiter = client.get_waiter('internet_gateway_exists')
wait(**kwargs)

Polls EC2.Client.describe_internet_gateways() every 5 seconds until a successful state is reached. An error is returned after 6 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    InternetGatewayIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • attachment.state - The current state of the attachment between the gateway and the VPC (available ). Present only if a VPC is attached.
    • attachment.vpc-id - The ID of an attached VPC.
    • internet-gateway-id - The ID of the Internet gateway.
    • owner-id - The ID of the Amazon Web Services account that owns the internet gateway.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayIds (list) --

    One or more internet gateway IDs.

    Default: Describes all your internet gateways.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 5

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 6

Returns

None

class EC2.Waiter.KeyPairExists
waiter = client.get_waiter('key_pair_exists')
wait(**kwargs)

Polls EC2.Client.describe_key_pairs() every 5 seconds until a successful state is reached. An error is returned after 6 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    KeyNames=[
        'string',
    ],
    KeyPairIds=[
        'string',
    ],
    DryRun=True|False,
    IncludePublicKey=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • key-pair-id - The ID of the key pair.
    • fingerprint - The fingerprint of the key pair.
    • key-name - The name of the key pair.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • KeyNames (list) --

    The key pair names.

    Default: Describes all of your key pairs.

    • (string) --
  • KeyPairIds (list) --

    The IDs of the key pairs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IncludePublicKey (boolean) --

    If true , the public key material is included in the response.

    Default: false

  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 5

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 6

Returns

None

class EC2.Waiter.NatGatewayAvailable
waiter = client.get_waiter('nat_gateway_available')
wait(**kwargs)

Polls EC2.Client.describe_nat_gateways() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NatGatewayIds=[
        'string',
    ],
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • nat-gateway-id - The ID of the NAT gateway.
    • state - The state of the NAT gateway (pending | failed | available | deleting | deleted ).
    • subnet-id - The ID of the subnet in which the NAT gateway resides.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC in which the NAT gateway resides.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NatGatewayIds (list) --

    One or more NAT gateway IDs.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.NatGatewayDeleted
waiter = client.get_waiter('nat_gateway_deleted')
wait(**kwargs)

Polls EC2.Client.describe_nat_gateways() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NatGatewayIds=[
        'string',
    ],
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Filters (list) --

    One or more filters.

    • nat-gateway-id - The ID of the NAT gateway.
    • state - The state of the NAT gateway (pending | failed | available | deleting | deleted ).
    • subnet-id - The ID of the subnet in which the NAT gateway resides.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC in which the NAT gateway resides.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • NatGatewayIds (list) --

    One or more NAT gateway IDs.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.NetworkInterfaceAvailable
waiter = client.get_waiter('network_interface_available')
wait(**kwargs)

Polls EC2.Client.describe_network_interfaces() every 20 seconds until a successful state is reached. An error is returned after 10 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkInterfaceIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • addresses.private-ip-address - The private IPv4 addresses associated with the network interface.
    • addresses.primary - Whether the private IPv4 address is the primary IP address associated with the network interface.
    • addresses.association.public-ip - The association ID returned when the network interface was associated with the Elastic IP address (IPv4).
    • addresses.association.owner-id - The owner ID of the addresses associated with the network interface.
    • association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • association.public-dns-name - The public DNS name for the network interface (IPv4).
    • attachment.attachment-id - The ID of the interface attachment.
    • attachment.attach-time - The time that the network interface was attached to an instance.
    • attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.
    • attachment.device-index - The device index to which the network interface is attached.
    • attachment.instance-id - The ID of the instance to which the network interface is attached.
    • attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.
    • attachment.status - The status of the attachment (attaching | attached | detaching | detached ).
    • availability-zone - The Availability Zone of the network interface.
    • description - The description of the network interface.
    • group-id - The ID of a security group associated with the network interface.
    • group-name - The name of a security group associated with the network interface.
    • ipv6-addresses.ipv6-address - An IPv6 address associated with the network interface.
    • interface-type - The type of network interface (api_gateway_managed | aws_codestar_connections_managed | branch | efa | gateway_load_balancer | gateway_load_balancer_endpoint | global_accelerator_managed | interface | iot_rules_managed | lambda | load_balancer | nat_gateway | network_load_balancer | quicksight | transit_gateway | trunk | vpc_endpoint ).
    • mac-address - The MAC address of the network interface.
    • network-interface-id - The ID of the network interface.
    • owner-id - The Amazon Web Services account ID of the network interface owner.
    • private-ip-address - The private IPv4 address or addresses of the network interface.
    • private-dns-name - The private DNS name of the network interface (IPv4).
    • requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.
    • requester-managed - Indicates whether the network interface is being managed by an Amazon Web Service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).
    • source-dest-check - Indicates 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.
    • status - The status of the network interface. If the network interface is not attached to an instance, the status is available ; if a network interface is attached to an instance the status is in-use .
    • subnet-id - The ID of the subnet for the network interface.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the network interface.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceIds (list) --

    One or more network interface IDs.

    Default: Describes all your network interfaces.

    • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. You cannot specify this parameter and the network interface IDs parameter in the same request.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 20

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 10

Returns

None

class EC2.Waiter.PasswordDataAvailable
waiter = client.get_waiter('password_data_available')
wait(**kwargs)

Polls EC2.Client.get_password_data() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    InstanceId='string',
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The ID of the Windows instance.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.SecurityGroupExists
waiter = client.get_waiter('security_group_exists')
wait(**kwargs)

Polls EC2.Client.describe_security_groups() every 5 seconds until a successful state is reached. An error is returned after 6 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    GroupIds=[
        'string',
    ],
    GroupNames=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The 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.cidr - An IPv4 CIDR block for an outbound security group rule.
    • egress.ip-permission.from-port - For an outbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.
    • egress.ip-permission.group-id - The ID of a security group that has been referenced in an outbound security group rule.
    • egress.ip-permission.group-name - The name of a security group that is referenced in an outbound security group rule.
    • egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security group rule.
    • egress.ip-permission.prefix-list-id - The ID of a prefix list to which a security group rule allows outbound access.
    • egress.ip-permission.protocol - The IP protocol for an outbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • egress.ip-permission.to-port - For an outbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • egress.ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an outbound security group rule.
    • group-id - The ID of the security group.
    • group-name - The name of the security group.
    • ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule.
    • ip-permission.from-port - For an inbound rule, 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 referenced in an inbound security group rule.
    • ip-permission.group-name - The name of a security group that is referenced in an inbound security group rule.
    • ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group rule.
    • ip-permission.prefix-list-id - The ID of a prefix list from which a security group rule allows inbound access.
    • ip-permission.protocol - The IP protocol for an inbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • ip-permission.to-port - For an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an inbound security group rule.
    • owner-id - The Amazon Web Services account ID of the owner of the security group.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • GroupIds (list) --

    The IDs of the security groups. Required for security groups in a nondefault VPC.

    Default: Describes all of your security groups.

    • (string) --
  • GroupNames (list) --

    [EC2-Classic and default VPC only] The names of the security groups. 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 of your security groups.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token to request the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 5

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 6

Returns

None

class EC2.Waiter.SnapshotCompleted
waiter = client.get_waiter('snapshot_completed')
wait(**kwargs)

Polls EC2.Client.describe_snapshots() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    OwnerIds=[
        'string',
    ],
    RestorableByUserIds=[
        'string',
    ],
    SnapshotIds=[
        'string',
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • description - A description of the snapshot.
    • encrypted - Indicates whether the snapshot is encrypted (true | false )
    • owner-alias - The owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.
    • progress - The progress of the snapshot, as a percentage (for example, 80%).
    • snapshot-id - The snapshot ID.
    • start-time - The time stamp when the snapshot was initiated.
    • status - The status of the snapshot (pending | completed | error ).
    • storage-tier - The storage tier of the snapshot (archive | standard ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The ID of the volume the snapshot is for.
    • volume-size - The size of the volume, in GiB.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • OwnerIds (list) --

    Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , and amazon .

    • (string) --
  • RestorableByUserIds (list) --

    The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • (string) --
  • SnapshotIds (list) --

    The snapshot IDs.

    Default: Describes the snapshots for which you have create volume permissions.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.SpotInstanceRequestFulfilled
waiter = client.get_waiter('spot_instance_request_fulfilled')
wait(**kwargs)

Polls EC2.Client.describe_spot_instance_requests() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    SpotInstanceRequestIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    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 EBS volume is deleted on instance termination.
    • launch.block-device-mapping.device-name - The device name for the volume in the block device mapping (for example, /dev/sdh or xvdh ).
    • launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS volume.
    • launch.block-device-mapping.volume-size - The size of the EBS volume, in GiB.
    • launch.block-device-mapping.volume-type - The type of EBS volume: gp2 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic.
    • launch.group-id - The ID of the security group for the instance.
    • launch.group-name - The name of 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 detailed monitoring is enabled for the Spot Instance.
    • launch.ramdisk-id - The RAM disk ID.
    • launched-availability-zone - The Availability Zone in which the request is launched.
    • network-interface.addresses.primary - Indicates whether the IP address is the primary private IP address.
    • network-interface.delete-on-termination - Indicates whether the network interface is deleted when the instance is terminated.
    • network-interface.description - A description of the network interface.
    • network-interface.device-index - The index of the device for the network interface attachment on the instance.
    • network-interface.group-id - The ID of the security group associated with the network interface.
    • network-interface.network-interface-id - The ID of the network interface.
    • network-interface.private-ip-address - The primary private IP address of the network interface.
    • network-interface.subnet-id - The ID of the subnet for the instance.
    • 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 request status information can help you track your Amazon EC2 Spot Instance requests. For more information, see Spot request status in the Amazon EC2 User Guide for Linux Instances .
    • 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • type - The type of Spot Instance request (one-time | persistent ).
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SpotInstanceRequestIds (list) --

    One or more Spot Instance request IDs.

    • (string) --
  • NextToken (string) -- The token to request the next set of results. This value is null when there are no more results to return.
  • MaxResults (integer) -- The maximum number of results to return in a single call. Specify a value between 5 and 1000. To retrieve the remaining results, make another call with the returned NextToken value.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.SubnetAvailable
waiter = client.get_waiter('subnet_available')
wait(**kwargs)

Polls EC2.Client.describe_subnets() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SubnetIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • availability-zone - The Availability Zone for the subnet. You can also use availabilityZone as the filter name.
    • availability-zone-id - The ID of the Availability Zone for the subnet. You can also use availabilityZoneId as the filter name.
    • available-ip-address-count - The number of IPv4 addresses in the subnet that are available.
    • cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.
    • default-for-az - Indicates whether this is the default subnet for the Availability Zone (true | false ). You can also use defaultForAz as the filter name.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the subnet.
    • ipv6-native - Indicates whether this is an IPv6 only subnet (true | false ).
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the subnet.
    • state - The state of the subnet (pending | available ).
    • subnet-arn - The Amazon Resource Name (ARN) of the subnet.
    • subnet-id - The ID of the subnet.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the subnet.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • SubnetIds (list) --

    One or more subnet IDs.

    Default: Describes all your subnets.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.SystemStatusOk
waiter = client.get_waiter('system_status_ok')
wait(**kwargs)

Polls EC2.Client.describe_instance_status() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False,
    IncludeAllInstances=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • availability-zone - The Availability Zone of the instance.
    • event.code - The code for the scheduled event (instance-reboot | system-reboot | system-maintenance | instance-retirement | instance-stop ).
    • event.description - A description of the event.
    • event.instance-event-id - The ID of the event whose date and time you are modifying.
    • event.not-after - The latest end time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before - The earliest start time for the scheduled event (for example, 2014-09-15T17:15:20.000Z ).
    • event.not-before-deadline - The deadline for starting the event (for example, 2014-09-15T17:15:20.000Z ).
    • instance-state-code - The code for the instance state, as a 16-bit unsigned integer. The high byte is used for internal purposes 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-status.reachability - Filters on instance status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • instance-status.status - The status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • system-status.reachability - Filters on system status where the name is reachability (passed | failed | initializing | insufficient-data ).
    • system-status.status - The system status of the instance (ok | impaired | initializing | insufficient-data | not-applicable ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    Constraints: Maximum 100 explicitly specified instance IDs.

    • (string) --
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to retrieve the next page of results.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IncludeAllInstances (boolean) --

    When true , includes the health status for all instances. When false , includes the health status for running instances only.

    Default: false

  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VolumeAvailable
waiter = client.get_waiter('volume_available')
wait(**kwargs)

Polls EC2.Client.describe_volumes() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • attachment.attach-time - The time stamp when the attachment initiated.
    • attachment.delete-on-termination - Whether the volume is deleted on instance termination.
    • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1 ).
    • attachment.instance-id - The ID of the instance the volume is attached to.
    • attachment.status - The attachment state (attaching | attached | detaching ).
    • availability-zone - The Availability Zone in which the volume was created.
    • create-time - The time stamp when the volume was created.
    • encrypted - Indicates whether the volume is encrypted (true | false )
    • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false )
    • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false ).
    • size - The size of the volume, in GiB.
    • snapshot-id - The snapshot from which the volume was created.
    • status - The state of the volume (creating | available | in-use | deleting | deleted | error ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The volume ID.
    • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1 | standard )
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VolumeIds (list) --

    The volume IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VolumeDeleted
waiter = client.get_waiter('volume_deleted')
wait(**kwargs)

Polls EC2.Client.describe_volumes() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • attachment.attach-time - The time stamp when the attachment initiated.
    • attachment.delete-on-termination - Whether the volume is deleted on instance termination.
    • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1 ).
    • attachment.instance-id - The ID of the instance the volume is attached to.
    • attachment.status - The attachment state (attaching | attached | detaching ).
    • availability-zone - The Availability Zone in which the volume was created.
    • create-time - The time stamp when the volume was created.
    • encrypted - Indicates whether the volume is encrypted (true | false )
    • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false )
    • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false ).
    • size - The size of the volume, in GiB.
    • snapshot-id - The snapshot from which the volume was created.
    • status - The state of the volume (creating | available | in-use | deleting | deleted | error ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The volume ID.
    • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1 | standard )
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VolumeIds (list) --

    The volume IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VolumeInUse
waiter = client.get_waiter('volume_in_use')
wait(**kwargs)

Polls EC2.Client.describe_volumes() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string',
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    The filters.

    • attachment.attach-time - The time stamp when the attachment initiated.
    • attachment.delete-on-termination - Whether the volume is deleted on instance termination.
    • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1 ).
    • attachment.instance-id - The ID of the instance the volume is attached to.
    • attachment.status - The attachment state (attaching | attached | detaching ).
    • availability-zone - The Availability Zone in which the volume was created.
    • create-time - The time stamp when the volume was created.
    • encrypted - Indicates whether the volume is encrypted (true | false )
    • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false )
    • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false ).
    • size - The size of the volume, in GiB.
    • snapshot-id - The snapshot from which the volume was created.
    • status - The state of the volume (creating | available | in-use | deleting | deleted | error ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The volume ID.
    • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1 | standard )
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VolumeIds (list) --

    The volume IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VpcAvailable
waiter = client.get_waiter('vpc_available')
wait(**kwargs)

Polls EC2.Client.describe_vpcs() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpcIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28 ).
    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
    • dhcp-options-id - The ID of a set of DHCP options.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.
    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
    • is-default - Indicates whether the VPC is the default VPC.
    • owner-id - The ID of the Amazon Web Services account that owns the VPC.
    • state - The state of the VPC (pending | available ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpcIds (list) --

    One or more VPC IDs.

    Default: Describes all your VPCs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VpcExists
waiter = client.get_waiter('vpc_exists')
wait(**kwargs)

Polls EC2.Client.describe_vpcs() every 1 seconds until a successful state is reached. An error is returned after 5 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpcIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28 ).
    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
    • dhcp-options-id - The ID of a set of DHCP options.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.
    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
    • is-default - Indicates whether the VPC is the default VPC.
    • owner-id - The ID of the Amazon Web Services account that owns the VPC.
    • state - The state of the VPC (pending | available ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpcIds (list) --

    One or more VPC IDs.

    Default: Describes all your VPCs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 1

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 5

Returns

None

class EC2.Waiter.VpcPeeringConnectionDeleted
waiter = client.get_waiter('vpc_peering_connection_deleted')
wait(**kwargs)

Polls EC2.Client.describe_vpc_peering_connections() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    VpcPeeringConnectionIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.
    • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.
    • accepter-vpc-info.vpc-id - The ID of the accepter VPC.
    • expiration-time - The expiration date and time for the VPC peering connection.
    • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.
    • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.
    • requester-vpc-info.vpc-id - The ID of the requester VPC.
    • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected ).
    • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-peering-connection-id - The ID of the VPC peering connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionIds (list) --

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VpcPeeringConnectionExists
waiter = client.get_waiter('vpc_peering_connection_exists')
wait(**kwargs)

Polls EC2.Client.describe_vpc_peering_connections() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    VpcPeeringConnectionIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.
    • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.
    • accepter-vpc-info.vpc-id - The ID of the accepter VPC.
    • expiration-time - The expiration date and time for the VPC peering connection.
    • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.
    • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.
    • requester-vpc-info.vpc-id - The ID of the requester VPC.
    • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected ).
    • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-peering-connection-id - The ID of the VPC peering connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionIds (list) --

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VpnConnectionAvailable
waiter = client.get_waiter('vpn_connection_available')
wait(**kwargs)

Polls EC2.Client.describe_vpn_connections() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpnConnectionIds=[
        'string',
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • customer-gateway-configuration - The configuration information for the customer gateway.
    • customer-gateway-id - The ID of a customer gateway associated with the VPN connection.
    • state - The state of the VPN connection (pending | available | deleting | deleted ).
    • option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).
    • route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.
    • bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • type - The type of VPN connection. Currently the only supported type is ipsec.1 .
    • vpn-connection-id - The ID of the VPN connection.
    • vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.
    • transit-gateway-id - The ID of a transit gateway associated with the VPN connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpnConnectionIds (list) --

    One or more VPN connection IDs.

    Default: Describes your VPN connections.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

class EC2.Waiter.VpnConnectionDeleted
waiter = client.get_waiter('vpn_connection_deleted')
wait(**kwargs)

Polls EC2.Client.describe_vpn_connections() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

waiter.wait(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpnConnectionIds=[
        'string',
    ],
    DryRun=True|False,
    WaiterConfig={
        'Delay': 123,
        'MaxAttempts': 123
    }
)
Parameters
  • Filters (list) --

    One or more filters.

    • customer-gateway-configuration - The configuration information for the customer gateway.
    • customer-gateway-id - The ID of a customer gateway associated with the VPN connection.
    • state - The state of the VPN connection (pending | available | deleting | deleted ).
    • option.static-routes-only - Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).
    • route.destination-cidr-block - The destination CIDR block. This corresponds to the subnet used in a customer data center.
    • bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP device.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • type - The type of VPN connection. Currently the only supported type is ipsec.1 .
    • vpn-connection-id - The ID of the VPN connection.
    • vpn-gateway-id - The ID of a virtual private gateway associated with the VPN connection.
    • transit-gateway-id - The ID of a transit gateway associated with the VPN connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpnConnectionIds (list) --

    One or more VPN connection IDs.

    Default: Describes your VPN connections.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • WaiterConfig (dict) --

    A dictionary that provides parameters to control waiting behavior.

    • Delay (integer) --

      The amount of time in seconds to wait between attempts. Default: 15

    • MaxAttempts (integer) --

      The maximum number of attempts to be made. Default: 40

Returns

None

Service Resource

class EC2.ServiceResource

A resource representing Amazon Elastic Compute Cloud (EC2):

import boto3

ec2 = boto3.resource('ec2')

These are the resource's available actions:

These are the resource's available sub-resources:

These are the resource's available collections:

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

create_dhcp_options(**kwargs)

Creates a set of DHCP options for your VPC. After creating the set, you must associate it with the VPC, causing all existing and new instances that you launch in the VPC to use this set of DHCP options. The following are the individual DHCP options you can specify. For more information about the options, see RFC 2132 .

  • domain-name-servers - The IP addresses of up to four domain name servers, or AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If specifying more than one domain name server, specify the IP addresses in a single parameter, separated by commas. To have your instance receive a custom DNS hostname as specified in domain-name , you must set domain-name-servers to a custom DNS server.
  • domain-name - If you're using AmazonProvidedDNS in us-east-1 , specify ec2.internal . If you're using AmazonProvidedDNS in another Region, specify region.compute.internal (for example, ap-northeast-1.compute.internal ). Otherwise, specify a domain name (for example, ExampleCompany.com ). This value is used to complete unqualified DNS hostnames. Important : Some Linux operating systems accept multiple domain names separated by spaces. However, Windows and other Linux operating systems treat the value as a single domain, which results in unexpected behavior. If your DHCP options set is associated with a VPC that has instances with multiple operating systems, specify only one domain name.
  • ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) servers.
  • netbios-name-servers - The IP addresses of up to four NetBIOS name servers.
  • netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend that you specify 2 (broadcast and multicast are not currently supported). For more information about these node types, see RFC 2132 .

Your VPC automatically starts out with a set of DHCP options that includes only a DNS server that we provide (AmazonProvidedDNS). If you create a set of options, and if your VPC has an internet gateway, make sure to set the domain-name-servers option either to AmazonProvidedDNS or to a domain name server of your choice. For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

dhcp_options = ec2.create_dhcp_options(
    DhcpConfigurations=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • DhcpConfigurations (list) --

    [REQUIRED]

    A DHCP configuration option.

    • (dict) --
      • Key (string) --
      • Values (list) --
        • (string) --
  • TagSpecifications (list) --

    The tags to assign to the DHCP option.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

ec2.DhcpOptions

Returns

DhcpOptions resource

create_instances(**kwargs)

Launches the specified number of instances using an AMI for which you have permissions.

You can specify a number of options, or leave the default options. The following rules apply:

  • [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.
  • [EC2-Classic] If don't specify an Availability Zone, we choose one for you.
  • Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see Instance types available only in a VPC .
  • [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet.
  • Not all instance types support IPv6 addresses. For more information, see Instance types .
  • If you don't specify a security group ID, we use the default security group. For more information, see Security groups .
  • If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.

You can create a launch template , which is a resource that contains the parameters to launch an instance. When you launch an instance using RunInstances , you can specify the launch template instead of specifying the launch parameters.

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.

An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging your Amazon EC2 resources .

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 .

For troubleshooting, see What to do if an instance immediately terminates , and Troubleshooting connecting to your instance .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

instance = ec2.create_instances(
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    ImageId='string',
    InstanceType='a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    Ipv6AddressCount=123,
    Ipv6Addresses=[
        {
            'Ipv6Address': 'string'
        },
    ],
    KernelId='string',
    KeyName='string',
    MaxCount=123,
    MinCount=123,
    Monitoring={
        'Enabled': True|False
    },
    Placement={
        'AvailabilityZone': 'string',
        'Affinity': 'string',
        'GroupName': 'string',
        'PartitionNumber': 123,
        'HostId': 'string',
        'Tenancy': 'default'|'dedicated'|'host',
        'SpreadDomain': 'string',
        'HostResourceGroupArn': 'string'
    },
    RamdiskId='string',
    SecurityGroupIds=[
        'string',
    ],
    SecurityGroups=[
        'string',
    ],
    SubnetId='string',
    UserData='string',
    AdditionalInfo='string',
    ClientToken='string',
    DisableApiTermination=True|False,
    DryRun=True|False,
    EbsOptimized=True|False,
    IamInstanceProfile={
        'Arn': 'string',
        'Name': 'string'
    },
    InstanceInitiatedShutdownBehavior='stop'|'terminate',
    NetworkInterfaces=[
        {
            'AssociatePublicIpAddress': True|False,
            'DeleteOnTermination': True|False,
            'Description': 'string',
            'DeviceIndex': 123,
            'Groups': [
                'string',
            ],
            'Ipv6AddressCount': 123,
            'Ipv6Addresses': [
                {
                    'Ipv6Address': 'string'
                },
            ],
            'NetworkInterfaceId': 'string',
            'PrivateIpAddress': 'string',
            'PrivateIpAddresses': [
                {
                    'Primary': True|False,
                    'PrivateIpAddress': 'string'
                },
            ],
            'SecondaryPrivateIpAddressCount': 123,
            'SubnetId': 'string',
            'AssociateCarrierIpAddress': True|False,
            'InterfaceType': 'string',
            'NetworkCardIndex': 123,
            'Ipv4Prefixes': [
                {
                    'Ipv4Prefix': 'string'
                },
            ],
            'Ipv4PrefixCount': 123,
            'Ipv6Prefixes': [
                {
                    'Ipv6Prefix': 'string'
                },
            ],
            'Ipv6PrefixCount': 123
        },
    ],
    PrivateIpAddress='string',
    ElasticGpuSpecification=[
        {
            'Type': 'string'
        },
    ],
    ElasticInferenceAccelerators=[
        {
            'Type': 'string',
            'Count': 123
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    LaunchTemplate={
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'Version': 'string'
    },
    InstanceMarketOptions={
        'MarketType': 'spot',
        'SpotOptions': {
            'MaxPrice': 'string',
            'SpotInstanceType': 'one-time'|'persistent',
            'BlockDurationMinutes': 123,
            'ValidUntil': datetime(2015, 1, 1),
            'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
        }
    },
    CreditSpecification={
        'CpuCredits': 'string'
    },
    CpuOptions={
        'CoreCount': 123,
        'ThreadsPerCore': 123
    },
    CapacityReservationSpecification={
        'CapacityReservationPreference': 'open'|'none',
        'CapacityReservationTarget': {
            'CapacityReservationId': 'string',
            'CapacityReservationResourceGroupArn': 'string'
        }
    },
    HibernationOptions={
        'Configured': True|False
    },
    LicenseSpecifications=[
        {
            'LicenseConfigurationArn': 'string'
        },
    ],
    MetadataOptions={
        'HttpTokens': 'optional'|'required',
        'HttpPutResponseHopLimit': 123,
        'HttpEndpoint': 'disabled'|'enabled',
        'HttpProtocolIpv6': 'disabled'|'enabled',
        'InstanceMetadataTags': 'disabled'|'enabled'
    },
    EnclaveOptions={
        'Enabled': True|False
    },
    PrivateDnsNameOptions={
        'HostnameType': 'ip-name'|'resource-name',
        'EnableResourceNameDnsARecord': True|False,
        'EnableResourceNameDnsAAAARecord': True|False
    },
    MaintenanceOptions={
        'AutoRecovery': 'disabled'|'default'
    },
    DisableApiStop=True|False
)
Parameters
  • BlockDeviceMappings (list) --

    The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide .

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

  • ImageId (string) -- The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
  • InstanceType (string) --

    The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

    Default: m1.small

  • Ipv6AddressCount (integer) --

    [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

  • Ipv6Addresses (list) --

    [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

    • (dict) --

      Describes an IPv6 address.

      • Ipv6Address (string) --

        The IPv6 address.

  • KernelId (string) --

    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 EC2 User Guide .

  • KeyName (string) --

    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.

  • MaxCount (integer) --

    [REQUIRED]

    The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount .

    Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.

  • MinCount (integer) --

    [REQUIRED]

    The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

    Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.

  • Monitoring (dict) --

    Specifies whether detailed monitoring is enabled for the instance.

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

  • Placement (dict) --

    The placement for the instance.

    • AvailabilityZone (string) --

      The Availability Zone of the instance.

      If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

      This parameter is not supported by CreateFleet .

    • Affinity (string) --

      The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • GroupName (string) --

      The name of the placement group the instance is in.

    • PartitionNumber (integer) --

      The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

      This parameter is not supported by CreateFleet .

    • HostId (string) --

      The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • 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.

      This parameter is not supported by CreateFleet .

      T3 instances that use the unlimited CPU credit option do not support host tenancy.

    • SpreadDomain (string) --

      Reserved for future use.

      This parameter is not supported by CreateFleet .

    • HostResourceGroupArn (string) --

      The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

      This parameter is not supported by CreateFleet .

  • RamdiskId (string) --

    The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the kernel ID.

    Warning

    We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide .

  • SecurityGroupIds (list) --

    The IDs of the security groups. You can create a security group using CreateSecurityGroup .

    If you specify a network interface, you must specify any security groups as part of the network interface.

    • (string) --
  • SecurityGroups (list) --

    [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.

    If you specify a network interface, you must specify any security groups as part of the network interface.

    Default: Amazon EC2 uses the default security group.

    • (string) --
  • SubnetId (string) --

    [EC2-VPC] The ID of the subnet to launch the instance into.

    If you specify a network interface, you must specify any subnets as part of the network interface.

  • UserData (string) --

    The user data script to make available to the instance. For more information, see Run commands on your Linux instance at launch and Run commands on your Windows instance at launch . If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.

    This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.
  • AdditionalInfo (string) -- Reserved.
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

    For more information, see Ensuring Idempotency .

    Constraints: Maximum 64 ASCII characters

    This field is autopopulated if not provided.

  • DisableApiTermination (boolean) --

    If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from the instance.

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EbsOptimized (boolean) --

    Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

    Default: false

  • IamInstanceProfile (dict) --

    The name or Amazon Resource Name (ARN) of an IAM instance profile.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the instance profile.

    • Name (string) --

      The name of the instance profile.

  • InstanceInitiatedShutdownBehavior (string) --

    Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

    Default: stop

  • NetworkInterfaces (list) --

    The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

    • (dict) --

      Describes a network interface.

      • AssociatePublicIpAddress (boolean) --

        Indicates whether to assign a public IPv4 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 .

      • 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.

      • Description (string) --

        The description of the network interface. Applies only if creating a network interface when launching an instance.

      • DeviceIndex (integer) --

        The position of the network interface in the attachment order. A primary network interface has a device index of 0.

        If you specify a network interface when launching an instance, you must specify the device index.

      • Groups (list) --

        The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

        • (string) --
      • Ipv6AddressCount (integer) --

        A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      • Ipv6Addresses (list) --

        One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

        • (dict) --

          Describes an IPv6 address.

          • Ipv6Address (string) --

            The IPv6 address.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

        If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

      • PrivateIpAddress (string) --

        The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • PrivateIpAddresses (list) --

        One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • (dict) --

          Describes a secondary private IPv4 address for a network interface.

          • Primary (boolean) --

            Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

          • PrivateIpAddress (string) --

            The private IPv4 addresses.

      • SecondaryPrivateIpAddressCount (integer) --

        The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • SubnetId (string) --

        The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

      • AssociateCarrierIpAddress (boolean) --

        Indicates whether to assign a carrier IP address to the network interface.

        You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

      • InterfaceType (string) --

        The type of network interface.

        Valid values: interface | efa

      • NetworkCardIndex (integer) --

        The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

      • Ipv4Prefixes (list) --

        One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

      • Ipv4PrefixCount (integer) --

        The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

      • Ipv6Prefixes (list) --

        One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

        • (dict) --

          Describes the IPv4 prefix option for a network interface.

          • Ipv6Prefix (string) --

            The IPv6 prefix.

      • Ipv6PrefixCount (integer) --

        The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

  • PrivateIpAddress (string) --

    [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

    Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

    You cannot specify this option and the network interfaces option in the same request.

  • ElasticGpuSpecification (list) --

    An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide .

    • (dict) --

      A specification for an Elastic Graphics accelerator.

      • Type (string) -- [REQUIRED]

        The type of Elastic Graphics accelerator. For more information about the values to specify for Type , see Elastic Graphics Basics , specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances .

  • ElasticInferenceAccelerators (list) --

    An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.

    You cannot specify accelerators from different generations in the same request.

    • (dict) --

      Describes an elastic inference accelerator.

      • Type (string) -- [REQUIRED]

        The type of elastic inference accelerator. The possible values are eia1.medium , eia1.large , eia1.xlarge , eia2.medium , eia2.large , and eia2.xlarge .

      • Count (integer) --

        The number of elastic inference accelerators to attach to the instance.

        Default: 1

  • TagSpecifications (list) --

    The tags to apply to the resources that are created during instance launch.

    You can specify tags for the following resources only:

    • Instances
    • Volumes
    • Elastic graphics
    • Spot Instance requests
    • Network interfaces

    To tag a resource after it has been created, see CreateTags .

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • LaunchTemplate (dict) --

    The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.

    • LaunchTemplateId (string) --

      The ID of the launch template.

      You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

    • LaunchTemplateName (string) --

      The name of the launch template.

      You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

    • Version (string) --

      The launch template version number, $Latest , or $Default .

      If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

      If the value is $Default , Amazon EC2 uses the default version of the launch template.

      Default: The default version of the launch template.

  • InstanceMarketOptions (dict) --

    The market (purchasing) option for the instances.

    For RunInstances , persistent Spot Instance requests are only supported when InstanceInterruptionBehavior is set to either hibernate or stop .

    • MarketType (string) --

      The market type.

    • SpotOptions (dict) --

      The options for Spot Instances.

      • MaxPrice (string) --

        The maximum hourly price that you're willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

        Warning

        If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

      • SpotInstanceType (string) --

        The Spot Instance request type. For RunInstances , persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop .

      • BlockDurationMinutes (integer) --

        Deprecated.

      • ValidUntil (datetime) --

        The end date of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). Supported only for persistent requests.

        • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.
        • For a one-time request, ValidUntil is not supported. The request remains active until all instances launch or you cancel the request.
      • InstanceInterruptionBehavior (string) --

        The behavior when a Spot Instance is interrupted. The default is terminate .

  • CreditSpecification (dict) --

    The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited . To change this attribute after launch, use ModifyInstanceCreditSpecification . For more information, see Burstable performance instances in the Amazon EC2 User Guide .

    Default: standard (T2 instances) or unlimited (T3/T3a/T4g instances)

    For T3 instances with host tenancy, only standard is supported.

    • CpuCredits (string) -- [REQUIRED]

      The credit option for CPU usage of a T instance.

      Valid values: standard | unlimited

  • CpuOptions (dict) --

    The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide .

    • CoreCount (integer) --

      The number of CPU cores for the instance.

    • ThreadsPerCore (integer) --

      The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1 . Otherwise, specify the default value of 2 .

  • CapacityReservationSpecification (dict) --

    Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open , which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

    • CapacityReservationPreference (string) --

      Indicates the instance's Capacity Reservation preferences. Possible preferences include:

      • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
      • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.
    • CapacityReservationTarget (dict) --

      Information about the target Capacity Reservation or Capacity Reservation group.

      • CapacityReservationId (string) --

        The ID of the Capacity Reservation in which to run the instance.

      • CapacityReservationResourceGroupArn (string) --

        The ARN of the Capacity Reservation resource group in which to run the instance.

  • HibernationOptions (dict) --

    Indicates whether an instance is enabled for hibernation. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.

    • Configured (boolean) --

      If you set this parameter to true , your instance is enabled for hibernation.

      Default: false

  • LicenseSpecifications (list) --

    The license configurations.

    • (dict) --

      Describes a license configuration.

      • LicenseConfigurationArn (string) --

        The Amazon Resource Name (ARN) of the license configuration.

  • MetadataOptions (dict) --

    The metadata options for the instance. For more information, see Instance metadata and user data .

    • HttpTokens (string) --

      The state of token usage for your instance metadata requests.

      If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

      If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

      Default: optional

    • HttpPutResponseHopLimit (integer) --

      The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

      Default: 1

      Possible values: Integers from 1 to 64

    • HttpEndpoint (string) --

      Enables or disables the HTTP metadata endpoint on your instances.

      If you specify a value of disabled , you cannot access your instance metadata.

      Default: enabled

    • HttpProtocolIpv6 (string) --

      Enables or disables the IPv6 endpoint for the instance metadata service.

    • InstanceMetadataTags (string) --

      Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

      Default: disabled

  • EnclaveOptions (dict) --

    Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide .

    You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

    • Enabled (boolean) --

      To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true .

  • PrivateDnsNameOptions (dict) --

    The options for the instance hostname. The default values are inherited from the subnet.

    • HostnameType (string) --

      The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

    • EnableResourceNameDnsARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

    • EnableResourceNameDnsAAAARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

  • MaintenanceOptions (dict) --

    The maintenance and recovery options for the instance.

    • AutoRecovery (string) --

      Disables the automatic recovery behavior of your instance or sets it to default. For more information, see Simplified automatic recovery .

  • DisableApiStop (boolean) -- Indicates whether an instance is enabled for stop protection. For more information, see Stop protection .
Return type

list(ec2.Instance)

Returns

A list of Instance resources

create_internet_gateway(**kwargs)

Creates an internet gateway for use with a VPC. After creating the internet gateway, you attach it to a VPC using AttachInternetGateway .

For more information about your VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

internet_gateway = ec2.create_internet_gateway(
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • TagSpecifications (list) --

    The tags to assign to the internet gateway.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

ec2.InternetGateway

Returns

InternetGateway resource

create_key_pair(**kwargs)

Creates an ED25519 or 2048-bit RSA key pair with the specified name and in the specified PEM or PPK format. Amazon EC2 stores the public key and displays the private key for you to save to a file. The private key is returned as an unencrypted PEM encoded PKCS#1 private key or an unencrypted PPK formatted private key for use with PuTTY. If a key with the specified name already exists, Amazon EC2 returns an error.

The key pair returned to you is available only in the Amazon Web Services Region in which you create it. If you prefer, you can create your own key pair using a third-party tool and upload it to any Region using ImportKeyPair .

You can have up to 5,000 key pairs per Amazon Web Services Region.

For more information, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

key_pair = ec2.create_key_pair(
    KeyName='string',
    DryRun=True|False,
    KeyType='rsa'|'ed25519',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    KeyFormat='pem'|'ppk'
)
Parameters
  • KeyName (string) --

    [REQUIRED]

    A unique name for the key pair.

    Constraints: Up to 255 ASCII characters

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • KeyType (string) --

    The type of key pair. Note that ED25519 keys are not supported for Windows instances.

    Default: rsa

  • TagSpecifications (list) --

    The tags to apply to the new key pair.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • KeyFormat (string) --

    The format of the key pair.

    Default: pem

Return type

ec2.KeyPair

Returns

KeyPair resource

create_network_acl(**kwargs)

Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

network_acl = ec2.create_network_acl(
    DryRun=True|False,
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • TagSpecifications (list) --

    The tags to assign to the network ACL.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.NetworkAcl

Returns

NetworkAcl resource

create_network_interface(**kwargs)

Creates a network interface in the specified subnet.

For more information about network interfaces, see Elastic Network Interfaces in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

network_interface = ec2.create_network_interface(
    Description='string',
    DryRun=True|False,
    Groups=[
        'string',
    ],
    Ipv6AddressCount=123,
    Ipv6Addresses=[
        {
            'Ipv6Address': 'string'
        },
    ],
    PrivateIpAddress='string',
    PrivateIpAddresses=[
        {
            'Primary': True|False,
            'PrivateIpAddress': 'string'
        },
    ],
    SecondaryPrivateIpAddressCount=123,
    Ipv4Prefixes=[
        {
            'Ipv4Prefix': 'string'
        },
    ],
    Ipv4PrefixCount=123,
    Ipv6Prefixes=[
        {
            'Ipv6Prefix': 'string'
        },
    ],
    Ipv6PrefixCount=123,
    InterfaceType='efa'|'branch'|'trunk',
    SubnetId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters
  • Description (string) -- A description for the network interface.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    The IDs of one or more security groups.

    • (string) --
  • Ipv6AddressCount (integer) -- The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true , you can specify 0 to override this setting.
  • Ipv6Addresses (list) --

    One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

    • (dict) --

      Describes an IPv6 address.

      • Ipv6Address (string) --

        The IPv6 address.

  • PrivateIpAddress (string) -- The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).
  • PrivateIpAddresses (list) --

    One or more private IPv4 addresses.

    • (dict) --

      Describes a secondary private IPv4 address for a network interface.

      • Primary (boolean) --

        Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

      • PrivateIpAddress (string) --

        The private IPv4 addresses.

  • SecondaryPrivateIpAddressCount (integer) --

    The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses .

    The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide .

  • Ipv4Prefixes (list) --

    One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

  • Ipv4PrefixCount (integer) -- The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv4 Prefixes option.
  • Ipv6Prefixes (list) --

    One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

    • (dict) --

      Describes the IPv4 prefix option for a network interface.

      • Ipv6Prefix (string) --

        The IPv6 prefix.

  • Ipv6PrefixCount (integer) -- The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv6Prefixes option.
  • InterfaceType (string) --

    The type of network interface. The default is interface .

    The only supported values are efa and trunk .

  • SubnetId (string) --

    [REQUIRED]

    The ID of the subnet to associate with the network interface.

  • TagSpecifications (list) --

    The tags to apply to the new network interface.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .

    This field is autopopulated if not provided.

Return type

ec2.NetworkInterface

Returns

NetworkInterface resource

create_placement_group(**kwargs)

Creates a placement group in which to launch instances. The strategy of the placement group determines how the instances are organized within the group.

A cluster placement group is a logical grouping of instances within a single Availability Zone that benefit from low network latency, high network throughput. A spread placement group places instances on distinct hardware. A partition placement group places groups of instances in different partitions, where instances in one partition do not share the same hardware with instances in another partition.

For more information, see Placement groups in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

placement_group = ec2.create_placement_group(
    DryRun=True|False,
    GroupName='string',
    Strategy='cluster'|'spread'|'partition',
    PartitionCount=123,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    SpreadLevel='host'|'rack'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupName (string) --

    A name for the placement group. Must be unique within the scope of your account for the Region.

    Constraints: Up to 255 ASCII characters

  • Strategy (string) -- The placement strategy.
  • PartitionCount (integer) -- The number of partitions. Valid only when Strategy is set to partition .
  • TagSpecifications (list) --

    The tags to apply to the new placement group.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • SpreadLevel (string) --

    Determines how placement groups spread instances.

    • Host – You can use host only with Outpost placement groups.
    • Rack – No usage restrictions.
Return type

ec2.PlacementGroup

Returns

PlacementGroup resource

create_route_table(**kwargs)

Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

route_table = ec2.create_route_table(
    DryRun=True|False,
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • TagSpecifications (list) --

    The tags to assign to the route table.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.RouteTable

Returns

RouteTable resource

create_security_group(**kwargs)

Creates a security group.

A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. 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 .

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress , AuthorizeSecurityGroupEgress , RevokeSecurityGroupIngress , and RevokeSecurityGroupEgress .

For more information about VPC security group limits, see Amazon VPC Limits .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

security_group = ec2.create_security_group(
    Description='string',
    GroupName='string',
    VpcId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) --

    [REQUIRED]

    A description for the security group. This is informational only.

    Constraints: Up to 255 characters in length

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • GroupName (string) --

    [REQUIRED]

    The name of the security group.

    Constraints: Up to 255 characters in length. Cannot start with sg- .

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • VpcId (string) -- [EC2-VPC] The ID of the VPC. Required for EC2-VPC.
  • TagSpecifications (list) --

    The tags to assign to the security group.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

ec2.SecurityGroup

Returns

SecurityGroup resource

create_snapshot(**kwargs)

Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

You can create snapshots of volumes in a Region and volumes on an Outpost. If you create a snapshot of a volume in a Region, the snapshot must be stored in the same Region as the volume. If you create a snapshot of a volume on an Outpost, the snapshot can be stored on the same Outpost as the volume, or in the Region for that Outpost.

When a snapshot is created, any Amazon Web Services Marketplace product codes that are associated with the source volume are propagated to the snapshot.

You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your Amazon EBS volume at the time the snapshot command is issued; this might exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending .

To create a snapshot for Amazon EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

You can tag your snapshots during creation. For more information, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

For more information, see Amazon Elastic Block Store and Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

snapshot = ec2.create_snapshot(
    Description='string',
    OutpostArn='string',
    VolumeId='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) -- A description for the snapshot.
  • OutpostArn (string) --

    The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.

    • To create a snapshot of a volume in a Region, omit this parameter. The snapshot is created in the same Region as the volume.
    • To create a snapshot of a volume on an Outpost and store the snapshot in the Region, omit this parameter. The snapshot is created in the Region for the Outpost.
    • To create a snapshot of a volume on an Outpost and store the snapshot on an Outpost, specify the ARN of the destination Outpost. The snapshot must be created on the same Outpost as the volume.

    For more information, see Create local snapshots from volumes on an Outpost in the Amazon Elastic Compute Cloud User Guide .

  • VolumeId (string) --

    [REQUIRED]

    The ID of the Amazon EBS volume.

  • TagSpecifications (list) --

    The tags to apply to the snapshot during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

ec2.Snapshot

Returns

Snapshot resource

create_subnet(**kwargs)

Creates a subnet in a specified VPC.

You must specify an IPv4 CIDR block for the subnet. After you create a subnet, you can't change its CIDR block. The allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP addresses). The CIDR block must not overlap with the CIDR block of an existing subnet in the VPC.

If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length.

Warning

Amazon Web Services reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.

If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

When you stop an instance in a subnet, it retains its private IPv4 address. It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

For more information about subnets, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

subnet = ec2.create_subnet(
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    AvailabilityZone='string',
    AvailabilityZoneId='string',
    CidrBlock='string',
    Ipv6CidrBlock='string',
    OutpostArn='string',
    VpcId='string',
    DryRun=True|False,
    Ipv6Native=True|False
)
Parameters
  • TagSpecifications (list) --

    The tags to assign to the subnet.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • AvailabilityZone (string) --

    The Availability Zone or Local Zone for the subnet.

    Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not necessarily select a different zone for each subnet.

    To create a subnet in a Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a . For information about the Regions that support Local Zones, see Available Regions in the Amazon Elastic Compute Cloud User Guide .

    To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

  • AvailabilityZoneId (string) -- The AZ ID or the Local Zone ID of the subnet.
  • CidrBlock (string) --

    The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24 . We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .

    This parameter is not supported for an IPv6 only subnet.

  • Ipv6CidrBlock (string) --

    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

    This parameter is required for an IPv6 only subnet.

  • OutpostArn (string) -- The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the Availability Zone of the Outpost subnet.
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Ipv6Native (boolean) -- Indicates whether to create an IPv6 only subnet.
Return type

ec2.Subnet

Returns

Subnet resource

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.create_tags(
    DryRun=True|False,
    Resources=[
        'string',
    ],
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Resources (list) --

    [REQUIRED]

    The IDs of the resources, separated by spaces.

    Constraints: Up to 1000 resource IDs. We recommend breaking up this request into smaller batches.

    • (string) --
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Returns

None

create_volume(**kwargs)

Creates an EBS volume that can be attached to an instance in the same Availability Zone.

You can create a new empty volume or restore a volume from an EBS snapshot. Any Amazon Web Services Marketplace product codes from the snapshot are propagated to the volume.

You can create encrypted volumes. Encrypted volumes must be attached to instances that support Amazon EBS encryption. Volumes that are created from encrypted snapshots are also automatically encrypted. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

You can tag your volumes during creation. For more information, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

For more information, see Create an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

volume = ec2.create_volume(
    AvailabilityZone='string',
    Encrypted=True|False,
    Iops=123,
    KmsKeyId='string',
    OutpostArn='string',
    Size=123,
    SnapshotId='string',
    VolumeType='standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    MultiAttachEnabled=True|False,
    Throughput=123,
    ClientToken='string'
)
Parameters
  • AvailabilityZone (string) --

    [REQUIRED]

    The Availability Zone in which to create the volume.

  • Encrypted (boolean) --

    Indicates whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by default in the Amazon Elastic Compute Cloud User Guide .

    Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

  • Iops (integer) --

    The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

    The following are the supported values for each volume type:

    • gp3 : 3,000-16,000 IOPS
    • io1 : 100-64,000 IOPS
    • io2 : 100-64,000 IOPS
    io1 and io2 volumes support up to 64,000 IOPS only on Instances built on the Nitro System . Other instance families support performance up to 32,000 IOPS.

    This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

  • KmsKeyId (string) --

    The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true .

    You can specify the KMS key using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
    • Key alias. For example, alias/ExampleAlias.
    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

  • OutpostArn (string) -- The Amazon Resource Name (ARN) of the Outpost.
  • Size (integer) --

    The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

    The following are the supported volumes sizes for each volume type:

    • gp2 and gp3 : 1-16,384
    • io1 and io2 : 4-16,384
    • st1 and sc1 : 125-16,384
    • standard : 1-1,024
  • SnapshotId (string) -- The snapshot from which to create the volume. You must specify either a snapshot ID or a volume size.
  • VolumeType (string) --

    The volume type. This parameter can be one of the following values:

    • General Purpose SSD: gp2 | gp3
    • Provisioned IOPS SSD: io1 | io2
    • Throughput Optimized HDD: st1
    • Cold HDD: sc1
    • Magnetic: standard

    For more information, see Amazon EBS volume types in the Amazon Elastic Compute Cloud User Guide .

    Default: gp2

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to apply to the volume during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • MultiAttachEnabled (boolean) -- Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, you can attach the volume to up to 16 Instances built on the Nitro System in the same Availability Zone. This parameter is supported with io1 and io2 volumes only. For more information, see Amazon EBS Multi-Attach in the Amazon Elastic Compute Cloud User Guide .
  • Throughput (integer) --

    The throughput to provision for a volume, with a maximum of 1,000 MiB/s.

    This parameter is valid only for gp3 volumes.

    Valid Range: Minimum value of 125. Maximum value of 1000.

  • ClientToken (string) --

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensure Idempotency .

    This field is autopopulated if not provided.

Return type

ec2.Volume

Returns

Volume resource

create_vpc(**kwargs)

Creates a VPC with the specified IPv4 CIDR block. The smallest VPC you can create uses a /28 netmask (16 IPv4 addresses), and the largest uses a /16 netmask (65,536 IPv4 addresses). For more information about how large to make your VPC, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide .

You can optionally request an IPv6 CIDR block for the VPC. You can request an Amazon-provided IPv6 CIDR block from Amazon's pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP ).

By default, each instance you launch in the VPC has the default DHCP options, which include only a default DNS server that we provide (AmazonProvidedDNS). For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

You can specify the instance tenancy value for the VPC when you create it. You can't change this value for the VPC after you create it. For more information, see Dedicated Instances in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

vpc = ec2.create_vpc(
    CidrBlock='string',
    AmazonProvidedIpv6CidrBlock=True|False,
    Ipv6Pool='string',
    Ipv6CidrBlock='string',
    Ipv4IpamPoolId='string',
    Ipv4NetmaskLength=123,
    Ipv6IpamPoolId='string',
    Ipv6NetmaskLength=123,
    DryRun=True|False,
    InstanceTenancy='default'|'dedicated'|'host',
    Ipv6CidrBlockNetworkBorderGroup='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • CidrBlock (string) -- The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16 . We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .
  • AmazonProvidedIpv6CidrBlock (boolean) -- Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block.
  • Ipv6Pool (string) -- The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.
  • Ipv6CidrBlock (string) --

    The IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool in the request.

    To let Amazon choose the IPv6 CIDR block for you, omit this parameter.

  • Ipv4IpamPoolId (string) -- The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv4NetmaskLength (integer) -- The netmask length of the IPv4 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv6IpamPoolId (string) -- The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across Amazon Web Services Regions and accounts throughout your Amazon Web Services Organization. For more information, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • Ipv6NetmaskLength (integer) -- The netmask length of the IPv6 CIDR you want to allocate to this VPC from an Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What is IPAM? in the Amazon VPC IPAM User Guide .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceTenancy (string) --

    The tenancy options for instances launched into the VPC. For default , instances are launched with shared tenancy by default. You can launch instances with any tenancy into a shared tenancy VPC. For dedicated , instances are launched as dedicated tenancy instances by default. You can only launch instances with a tenancy of dedicated or host into a dedicated tenancy VPC.

    Important: The host value cannot be used with this parameter. Use the default or dedicated values only.

    Default: default

  • Ipv6CidrBlockNetworkBorderGroup (string) --

    The name of the location from which we advertise the IPV6 CIDR block. Use this parameter to limit the address to this location.

    You must set AmazonProvidedIpv6CidrBlock to true to use this parameter.

  • TagSpecifications (list) --

    The tags to assign to the VPC.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.Vpc

Returns

Vpc resource

create_vpc_peering_connection(**kwargs)

Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.

Note

Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide .

The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed .

See also: AWS API Documentation

Request Syntax

vpc_peering_connection = ec2.create_vpc_peering_connection(
    DryRun=True|False,
    PeerOwnerId='string',
    PeerVpcId='string',
    VpcId='string',
    PeerRegion='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PeerOwnerId (string) --

    The Amazon Web Services account ID of the owner of the accepter VPC.

    Default: Your Amazon Web Services account ID

  • PeerVpcId (string) -- The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
  • VpcId (string) -- The ID of the requester VPC. You must specify this parameter in the request.
  • PeerRegion (string) --

    The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

    Default: The Region in which you make the request.

  • TagSpecifications (list) --

    The tags to assign to the peering connection.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.VpcPeeringConnection

Returns

VpcPeeringConnection resource

disassociate_route_table(**kwargs)

Disassociates a subnet or gateway from a route table.

After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.disassociate_route_table(
    AssociationId='string',
    DryRun=True|False
)
Parameters
  • AssociationId (string) --

    [REQUIRED]

    The association ID representing the current association between the route table and subnet or gateway.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
import_key_pair(**kwargs)

Imports the public key from an RSA or ED25519 key pair that you created with a third-party tool. Compare this with CreateKeyPair , in which Amazon Web Services creates the key pair and gives the keys to you (Amazon Web Services keeps a copy of the public key). With ImportKeyPair, you create the key pair and give Amazon Web Services just the public key. The private key is never transferred between you and Amazon Web Services.

For more information about key pairs, see Amazon EC2 key pairs in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

key_pair_info = ec2.import_key_pair(
    DryRun=True|False,
    KeyName='string',
    PublicKeyMaterial=b'bytes',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • KeyName (string) --

    [REQUIRED]

    A unique name for the key pair.

  • PublicKeyMaterial (bytes) --

    [REQUIRED]

    The public key. For API calls, the text must be base64-encoded. For command line tools, base64 encoding is performed for you.

  • TagSpecifications (list) --

    The tags to apply to the imported key pair.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.KeyPairInfo

Returns

KeyPairInfo resource

register_image(**kwargs)

Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating your own AMIs in the Amazon Elastic Compute Cloud User Guide .

Note

For Amazon EBS-backed instances, CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself. We recommend that you always use CreateImage unless you have a specific reason to use RegisterImage.

If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.

Register a snapshot of a root device volume

You can use RegisterImage to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using a block device mapping. You can't set the encryption state of the volume using the block device mapping. If the snapshot is encrypted, or encryption by default is enabled, the root volume of an instance launched from the AMI is encrypted.

For more information, see Create a Linux AMI from a snapshot and Use encryption with Amazon EBS-backed AMIs in the Amazon Elastic Compute Cloud User Guide .

Amazon Web Services Marketplace product codes

If any snapshots have Amazon Web Services Marketplace product codes, they are copied to the new AMI.

Windows and some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the Amazon EC2 billing product code associated with an AMI to verify the subscription status for package updates. To create a new AMI for operating systems that require a billing product code, instead of registering the AMI, do the following to preserve the billing product code association:

  • Launch an instance from an existing AMI with that billing product code.
  • Customize the instance.
  • Create an AMI from the instance using CreateImage .

If you purchase a Reserved Instance to apply to an On-Demand Instance that was launched from an AMI with a billing product code, make sure that the Reserved Instance has the matching billing product code. If you purchase a Reserved Instance without the matching billing product code, the Reserved Instance will not be applied to the On-Demand Instance. For information about how to obtain the platform details and billing information of an AMI, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

image = ec2.register_image(
    ImageLocation='string',
    Architecture='i386'|'x86_64'|'arm64'|'x86_64_mac',
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    Description='string',
    DryRun=True|False,
    EnaSupport=True|False,
    KernelId='string',
    Name='string',
    BillingProducts=[
        'string',
    ],
    RamdiskId='string',
    RootDeviceName='string',
    SriovNetSupport='string',
    VirtualizationType='string',
    BootMode='legacy-bios'|'uefi',
    TpmSupport='v2.0',
    UefiData='string'
)
Parameters
  • ImageLocation (string) -- The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the aws-exec-read canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see Canned ACLs in the Amazon S3 Service Developer Guide .
  • Architecture (string) --

    The architecture of the AMI.

    Default: For Amazon EBS-backed AMIs, i386 . For instance store-backed AMIs, the architecture specified in the manifest file.

  • BlockDeviceMappings (list) --

    The block device mapping entries.

    If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.

    If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

  • Description (string) -- A description for your AMI.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EnaSupport (boolean) --

    Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.

    This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

  • KernelId (string) -- The ID of the kernel.
  • Name (string) --

    [REQUIRED]

    A name for your AMI.

    Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

  • BillingProducts (list) --

    The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the Amazon Web Services Marketplace to bill for the use of an AMI.

    • (string) --
  • RamdiskId (string) -- The ID of the RAM disk.
  • RootDeviceName (string) -- The device name of the root device volume (for example, /dev/sda1 ).
  • SriovNetSupport (string) --

    Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.

    There is no way to disable sriovNetSupport at this time.

    This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

  • VirtualizationType (string) --

    The type of virtualization (hvm | paravirtual ).

    Default: paravirtual

  • BootMode (string) -- The boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide .
  • TpmSupport (string) -- Set to v2.0 to enable Trusted Platform Module (TPM) support. For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide .
  • UefiData (string) -- Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot in the Amazon Elastic Compute Cloud User Guide .
Return type

ec2.Image

Returns

Image resource

Sub-resources

Sub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child. For more information about sub-resources refer to the Resources Introduction Guide.

ClassicAddress(public_ip)

Creates a ClassicAddress resource.:

classic_address = ec2.ClassicAddress('public_ip')
Parameters
public_ip (string) -- The ClassicAddress's public_ip identifier. This must be set.
Return type
EC2.ClassicAddress
Returns
A ClassicAddress resource
DhcpOptions(id)

Creates a DhcpOptions resource.:

dhcp_options = ec2.DhcpOptions('id')
Parameters
id (string) -- The DhcpOptions's id identifier. This must be set.
Return type
EC2.DhcpOptions
Returns
A DhcpOptions resource
Image(id)

Creates a Image resource.:

image = ec2.Image('id')
Parameters
id (string) -- The Image's id identifier. This must be set.
Return type
EC2.Image
Returns
A Image resource
Instance(id)

Creates a Instance resource.:

instance = ec2.Instance('id')
Parameters
id (string) -- The Instance's id identifier. This must be set.
Return type
EC2.Instance
Returns
A Instance resource
InternetGateway(id)

Creates a InternetGateway resource.:

internet_gateway = ec2.InternetGateway('id')
Parameters
id (string) -- The InternetGateway's id identifier. This must be set.
Return type
EC2.InternetGateway
Returns
A InternetGateway resource
KeyPair(name)

Creates a KeyPairInfo resource.:

key_pair_info = ec2.KeyPair('name')
Parameters
name (string) -- The KeyPair's name identifier. This must be set.
Return type
EC2.KeyPairInfo
Returns
A KeyPairInfo resource
NetworkAcl(id)

Creates a NetworkAcl resource.:

network_acl = ec2.NetworkAcl('id')
Parameters
id (string) -- The NetworkAcl's id identifier. This must be set.
Return type
EC2.NetworkAcl
Returns
A NetworkAcl resource
NetworkInterface(id)

Creates a NetworkInterface resource.:

network_interface = ec2.NetworkInterface('id')
Parameters
id (string) -- The NetworkInterface's id identifier. This must be set.
Return type
EC2.NetworkInterface
Returns
A NetworkInterface resource
NetworkInterfaceAssociation(id)

Creates a NetworkInterfaceAssociation resource.:

network_interface_association = ec2.NetworkInterfaceAssociation('id')
Parameters
id (string) -- The NetworkInterfaceAssociation's id identifier. This must be set.
Return type
EC2.NetworkInterfaceAssociation
Returns
A NetworkInterfaceAssociation resource
PlacementGroup(name)

Creates a PlacementGroup resource.:

placement_group = ec2.PlacementGroup('name')
Parameters
name (string) -- The PlacementGroup's name identifier. This must be set.
Return type
EC2.PlacementGroup
Returns
A PlacementGroup resource
Route(route_table_id, destination_cidr_block)

Creates a Route resource.:

route = ec2.Route('route_table_id','destination_cidr_block')
Parameters
  • route_table_id (string) -- The Route's route_table_id identifier. This must be set.
  • destination_cidr_block (string) -- The Route's destination_cidr_block identifier. This must be set.
Return type

EC2.Route

Returns

A Route resource

RouteTable(id)

Creates a RouteTable resource.:

route_table = ec2.RouteTable('id')
Parameters
id (string) -- The RouteTable's id identifier. This must be set.
Return type
EC2.RouteTable
Returns
A RouteTable resource
RouteTableAssociation(id)

Creates a RouteTableAssociation resource.:

route_table_association = ec2.RouteTableAssociation('id')
Parameters
id (string) -- The RouteTableAssociation's id identifier. This must be set.
Return type
EC2.RouteTableAssociation
Returns
A RouteTableAssociation resource
SecurityGroup(id)

Creates a SecurityGroup resource.:

security_group = ec2.SecurityGroup('id')
Parameters
id (string) -- The SecurityGroup's id identifier. This must be set.
Return type
EC2.SecurityGroup
Returns
A SecurityGroup resource
Snapshot(id)

Creates a Snapshot resource.:

snapshot = ec2.Snapshot('id')
Parameters
id (string) -- The Snapshot's id identifier. This must be set.
Return type
EC2.Snapshot
Returns
A Snapshot resource
Subnet(id)

Creates a Subnet resource.:

subnet = ec2.Subnet('id')
Parameters
id (string) -- The Subnet's id identifier. This must be set.
Return type
EC2.Subnet
Returns
A Subnet resource
Tag(resource_id, key, value)

Creates a Tag resource.:

tag = ec2.Tag('resource_id','key','value')
Parameters
  • resource_id (string) -- The Tag's resource_id identifier. This must be set.
  • key (string) -- The Tag's key identifier. This must be set.
  • value (string) -- The Tag's value identifier. This must be set.
Return type

EC2.Tag

Returns

A Tag resource

Volume(id)

Creates a Volume resource.:

volume = ec2.Volume('id')
Parameters
id (string) -- The Volume's id identifier. This must be set.
Return type
EC2.Volume
Returns
A Volume resource
Vpc(id)

Creates a Vpc resource.:

vpc = ec2.Vpc('id')
Parameters
id (string) -- The Vpc's id identifier. This must be set.
Return type
EC2.Vpc
Returns
A Vpc resource
VpcAddress(allocation_id)

Creates a VpcAddress resource.:

vpc_address = ec2.VpcAddress('allocation_id')
Parameters
allocation_id (string) -- The VpcAddress's allocation_id identifier. This must be set.
Return type
EC2.VpcAddress
Returns
A VpcAddress resource
VpcPeeringConnection(id)

Creates a VpcPeeringConnection resource.:

vpc_peering_connection = ec2.VpcPeeringConnection('id')
Parameters
id (string) -- The VpcPeeringConnection's id identifier. This must be set.
Return type
EC2.VpcPeeringConnection
Returns
A VpcPeeringConnection resource

Collections

Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.

classic_addresses

A collection of ClassicAddress resources.A ClassicAddress Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all ClassicAddress resources in the collection.

See also: AWS API Documentation

Request Syntax

classic_address_iterator = ec2.classic_addresses.all()
Return type
list(ec2.ClassicAddress)
Returns
A list of ClassicAddress resources
filter(**kwargs)

Creates an iterable of all ClassicAddress resources in the collection filtered by kwargs passed to method. A ClassicAddress collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

classic_address_iterator = ec2.classic_addresses.filter(
    PublicIps=[
        'string',
    ],
    AllocationIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • PublicIps (list) --

    One or more Elastic IP addresses.

    Default: Describes all your Elastic IP addresses.

    • (string) --
  • AllocationIds (list) --

    [EC2-VPC] Information about the allocation IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

list(ec2.ClassicAddress)

Returns

A list of ClassicAddress resources

limit(**kwargs)

Creates an iterable up to a specified amount of ClassicAddress resources in the collection.

See also: AWS API Documentation

Request Syntax

classic_address_iterator = ec2.classic_addresses.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.ClassicAddress)
Returns
A list of ClassicAddress resources
page_size(**kwargs)

Creates an iterable of all ClassicAddress resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

classic_address_iterator = ec2.classic_addresses.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.ClassicAddress)
Returns
A list of ClassicAddress resources
dhcp_options_sets

A collection of DhcpOptions resources.A DhcpOptions Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all DhcpOptions resources in the collection.

See also: AWS API Documentation

Request Syntax

dhcp_options_iterator = ec2.dhcp_options_sets.all()
Return type
list(ec2.DhcpOptions)
Returns
A list of DhcpOptions resources
filter(**kwargs)

Creates an iterable of all DhcpOptions resources in the collection filtered by kwargs passed to method. A DhcpOptions collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

dhcp_options_iterator = ec2.dhcp_options_sets.filter(
    DhcpOptionsIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • DhcpOptionsIds (list) --

    The IDs of one or more DHCP options sets.

    Default: Describes all your DHCP options sets.

    • (string) --
  • Filters (list) --

    One or more filters.

    • dhcp-options-id - The ID of a DHCP options set.
    • key - The key for one of the options (for example, domain-name ).
    • value - The value for one of the options.
    • owner-id - The ID of the Amazon Web Services account that owns the DHCP options set.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.DhcpOptions)

Returns

A list of DhcpOptions resources

limit(**kwargs)

Creates an iterable up to a specified amount of DhcpOptions resources in the collection.

See also: AWS API Documentation

Request Syntax

dhcp_options_iterator = ec2.dhcp_options_sets.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.DhcpOptions)
Returns
A list of DhcpOptions resources
page_size(**kwargs)

Creates an iterable of all DhcpOptions resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

dhcp_options_iterator = ec2.dhcp_options_sets.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.DhcpOptions)
Returns
A list of DhcpOptions resources
images

A collection of Image resources.A Image Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Image resources in the collection.

See also: AWS API Documentation

Request Syntax

image_iterator = ec2.images.all()
Return type
list(ec2.Image)
Returns
A list of Image resources
filter(**kwargs)

Creates an iterable of all Image resources in the collection filtered by kwargs passed to method. A Image collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

image_iterator = ec2.images.filter(
    ExecutableUsers=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    ImageIds=[
        'string',
    ],
    Owners=[
        'string',
    ],
    IncludeDeprecated=True|False,
    DryRun=True|False
)
Parameters
  • ExecutableUsers (list) --

    Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

    • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.
    • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.
    • If you specify all , all public AMIs are returned.
    • (string) --
  • Filters (list) --

    The filters.

    • architecture - The image architecture (i386 | x86_64 | arm64 ).
    • block-device-mapping.delete-on-termination - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.
    • block-device-mapping.device-name - The device name specified in the block device mapping (for example, /dev/sdh or xvdh ).
    • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.
    • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.
    • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard ).
    • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.
    • creation-date - The time when the image was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • description - The description of the image (provided during image creation).
    • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.
    • hypervisor - The hypervisor type (ovm | xen ).
    • image-id - The ID of the image.
    • image-type - The image type (machine | kernel | ramdisk ).
    • is-public - A Boolean that indicates whether the image is public.
    • kernel-id - The kernel ID.
    • manifest-location - The location of the image manifest.
    • name - The name of the AMI (provided during image creation).
    • owner-alias - The owner alias (amazon | aws-marketplace ). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.
    • platform - The platform. To only list Windows-based AMIs, use windows .
    • product-code - The product code.
    • product-code.type - The type of the product code (marketplace ).
    • ramdisk-id - The RAM disk ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (ebs | instance-store ).
    • state - The state of the image (available | pending | failed ).
    • state-reason-code - The reason code for the state change.
    • state-reason-message - The message for the state change.
    • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • virtualization-type - The virtualization type (paravirtual | hvm ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • ImageIds (list) --

    The image IDs.

    Default: Describes all images available to you.

    • (string) --
  • Owners (list) --

    Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , amazon , and aws-marketplace . If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • (string) --
  • IncludeDeprecated (boolean) --

    If true , all deprecated AMIs are included in the response. If false , no deprecated AMIs are included in the response. If no value is specified, the default value is false .

    Note

    If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false ) that you set for this parameter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

list(ec2.Image)

Returns

A list of Image resources

limit(**kwargs)

Creates an iterable up to a specified amount of Image resources in the collection.

See also: AWS API Documentation

Request Syntax

image_iterator = ec2.images.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Image)
Returns
A list of Image resources
page_size(**kwargs)

Creates an iterable of all Image resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

image_iterator = ec2.images.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Image)
Returns
A list of Image resources
instances

A collection of Instance resources.A Instance Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = ec2.instances.all()
Return type
list(ec2.Instance)
Returns
A list of Instance resources
create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.instances.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Returns

None

filter(**kwargs)

Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method. A Instance collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

instance_iterator = ec2.instances.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Return type

list(ec2.Instance)

Returns

A list of Instance resources

limit(**kwargs)

Creates an iterable up to a specified amount of Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = ec2.instances.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Instance)
Returns
A list of Instance resources
monitor(**kwargs)

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitor your instances using CloudWatch in the Amazon EC2 User Guide .

To disable detailed monitoring, see UnmonitorInstances .

See also: AWS API Documentation

Request Syntax

response = ec2.instances.monitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

page_size(**kwargs)

Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

instance_iterator = ec2.instances.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Instance)
Returns
A list of Instance resources
reboot(**kwargs)

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Troubleshoot an unreachable instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.instances.reboot(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
start(**kwargs)

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

If you attempt to start a T3 instance with host tenancy and the unlimted CPU credit option, the request fails. The unlimited CPU credit option is not supported on Dedicated Hosts. Before you start the instance, either change its CPU credit option to standard , or change its tenancy to default or dedicated .

For more information, see Stop and start your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.instances.start(
    AdditionalInfo='string',
    DryRun=True|False
)
Parameters
  • AdditionalInfo (string) -- Reserved.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'StartingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StartingInstances (list) --

      Information about the started instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

stop(**kwargs)

Stops an Amazon EBS-backed instance. For more information, see Stop and start your instance in the Amazon EC2 User Guide .

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon EC2 User Guide .

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide .

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshoot stopping your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.instances.stop(
    Hibernate=True|False,
    DryRun=True|False,
    Force=True|False
)
Parameters
  • Hibernate (boolean) --

    Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'StoppingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StoppingInstances (list) --

      Information about the stopped instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

terminate(**kwargs)

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

If you terminate multiple instances across multiple Availability Zones, and one or more of the specified instances are enabled for termination protection, the request fails with the following results:

  • The specified instances that are in the same Availability Zone as the protected instance are not terminated.
  • The specified instances that are in different Availability Zones, where no other specified instances are protected, are successfully terminated.

For example, say you have the following instances:

  • Instance A: us-east-1a ; Not protected
  • Instance B: us-east-1a ; Not protected
  • Instance C: us-east-1b ; Protected
  • Instance D: us-east-1b ; not protected

If you attempt to terminate all of these instances in the same request, the request reports failure with the following results:

  • Instance A and Instance B are successfully terminated because none of the specified instances in us-east-1a are enabled for termination protection.
  • Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.instances.terminate(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'TerminatingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • TerminatingInstances (list) --

      Information about the terminated instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

unmonitor(**kwargs)

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = ec2.instances.unmonitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

internet_gateways

A collection of InternetGateway resources.A InternetGateway Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all InternetGateway resources in the collection.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = ec2.internet_gateways.all()
Return type
list(ec2.InternetGateway)
Returns
A list of InternetGateway resources
filter(**kwargs)

Creates an iterable of all InternetGateway resources in the collection filtered by kwargs passed to method. A InternetGateway collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = ec2.internet_gateways.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    InternetGatewayIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • attachment.state - The current state of the attachment between the gateway and the VPC (available ). Present only if a VPC is attached.
    • attachment.vpc-id - The ID of an attached VPC.
    • internet-gateway-id - The ID of the Internet gateway.
    • owner-id - The ID of the Amazon Web Services account that owns the internet gateway.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayIds (list) --

    One or more internet gateway IDs.

    Default: Describes all your internet gateways.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.InternetGateway)

Returns

A list of InternetGateway resources

limit(**kwargs)

Creates an iterable up to a specified amount of InternetGateway resources in the collection.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = ec2.internet_gateways.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.InternetGateway)
Returns
A list of InternetGateway resources
page_size(**kwargs)

Creates an iterable of all InternetGateway resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = ec2.internet_gateways.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.InternetGateway)
Returns
A list of InternetGateway resources
key_pairs

A collection of KeyPairInfo resources.A KeyPairInfo Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all KeyPairInfo resources in the collection.

See also: AWS API Documentation

Request Syntax

key_pair_info_iterator = ec2.key_pairs.all()
Return type
list(ec2.KeyPairInfo)
Returns
A list of KeyPairInfo resources
filter(**kwargs)

Creates an iterable of all KeyPairInfo resources in the collection filtered by kwargs passed to method. A KeyPairInfo collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

key_pair_info_iterator = ec2.key_pairs.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    KeyNames=[
        'string',
    ],
    KeyPairIds=[
        'string',
    ],
    DryRun=True|False,
    IncludePublicKey=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • key-pair-id - The ID of the key pair.
    • fingerprint - The fingerprint of the key pair.
    • key-name - The name of the key pair.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • KeyNames (list) --

    The key pair names.

    Default: Describes all of your key pairs.

    • (string) --
  • KeyPairIds (list) --

    The IDs of the key pairs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IncludePublicKey (boolean) --

    If true , the public key material is included in the response.

    Default: false

Return type

list(ec2.KeyPairInfo)

Returns

A list of KeyPairInfo resources

limit(**kwargs)

Creates an iterable up to a specified amount of KeyPairInfo resources in the collection.

See also: AWS API Documentation

Request Syntax

key_pair_info_iterator = ec2.key_pairs.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.KeyPairInfo)
Returns
A list of KeyPairInfo resources
page_size(**kwargs)

Creates an iterable of all KeyPairInfo resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

key_pair_info_iterator = ec2.key_pairs.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.KeyPairInfo)
Returns
A list of KeyPairInfo resources
network_acls

A collection of NetworkAcl resources.A NetworkAcl Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all NetworkAcl resources in the collection.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = ec2.network_acls.all()
Return type
list(ec2.NetworkAcl)
Returns
A list of NetworkAcl resources
filter(**kwargs)

Creates an iterable of all NetworkAcl resources in the collection filtered by kwargs passed to method. A NetworkAcl collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = ec2.network_acls.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkAclIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • association.association-id - The ID of an association ID for the ACL.
    • association.network-acl-id - The ID of the network ACL involved in the association.
    • association.subnet-id - The ID of the subnet involved in the association.
    • default - Indicates whether the ACL is the default network ACL for the VPC.
    • entry.cidr - The IPv4 CIDR range specified in the entry.
    • entry.icmp.code - The ICMP code specified in the entry, if any.
    • entry.icmp.type - The ICMP type specified in the entry, if any.
    • entry.ipv6-cidr - The IPv6 CIDR range specified in the entry.
    • entry.port-range.from - The start of the port range specified in the entry.
    • entry.port-range.to - The end of the port range specified in the entry.
    • entry.protocol - The protocol specified in the entry (tcp | udp | icmp or a protocol number).
    • entry.rule-action - Allows or denies the matching traffic (allow | deny ).
    • entry.egress - A Boolean that indicates the type of rule. Specify true for egress rules, or false for ingress rules.
    • entry.rule-number - The number of an entry (in other words, rule) in the set of ACL entries.
    • network-acl-id - The ID of the network ACL.
    • owner-id - The ID of the Amazon Web Services account that owns the network ACL.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the network ACL.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkAclIds (list) --

    One or more network ACL IDs.

    Default: Describes all your network ACLs.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.NetworkAcl)

Returns

A list of NetworkAcl resources

limit(**kwargs)

Creates an iterable up to a specified amount of NetworkAcl resources in the collection.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = ec2.network_acls.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.NetworkAcl)
Returns
A list of NetworkAcl resources
page_size(**kwargs)

Creates an iterable of all NetworkAcl resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = ec2.network_acls.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.NetworkAcl)
Returns
A list of NetworkAcl resources
network_interfaces

A collection of NetworkInterface resources.A NetworkInterface Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all NetworkInterface resources in the collection.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = ec2.network_interfaces.all()
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
filter(**kwargs)

Creates an iterable of all NetworkInterface resources in the collection filtered by kwargs passed to method. A NetworkInterface collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = ec2.network_interfaces.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NetworkInterfaceIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • addresses.private-ip-address - The private IPv4 addresses associated with the network interface.
    • addresses.primary - Whether the private IPv4 address is the primary IP address associated with the network interface.
    • addresses.association.public-ip - The association ID returned when the network interface was associated with the Elastic IP address (IPv4).
    • addresses.association.owner-id - The owner ID of the addresses associated with the network interface.
    • association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • association.public-dns-name - The public DNS name for the network interface (IPv4).
    • attachment.attachment-id - The ID of the interface attachment.
    • attachment.attach-time - The time that the network interface was attached to an instance.
    • attachment.delete-on-termination - Indicates whether the attachment is deleted when an instance is terminated.
    • attachment.device-index - The device index to which the network interface is attached.
    • attachment.instance-id - The ID of the instance to which the network interface is attached.
    • attachment.instance-owner-id - The owner ID of the instance to which the network interface is attached.
    • attachment.status - The status of the attachment (attaching | attached | detaching | detached ).
    • availability-zone - The Availability Zone of the network interface.
    • description - The description of the network interface.
    • group-id - The ID of a security group associated with the network interface.
    • group-name - The name of a security group associated with the network interface.
    • ipv6-addresses.ipv6-address - An IPv6 address associated with the network interface.
    • interface-type - The type of network interface (api_gateway_managed | aws_codestar_connections_managed | branch | efa | gateway_load_balancer | gateway_load_balancer_endpoint | global_accelerator_managed | interface | iot_rules_managed | lambda | load_balancer | nat_gateway | network_load_balancer | quicksight | transit_gateway | trunk | vpc_endpoint ).
    • mac-address - The MAC address of the network interface.
    • network-interface-id - The ID of the network interface.
    • owner-id - The Amazon Web Services account ID of the network interface owner.
    • private-ip-address - The private IPv4 address or addresses of the network interface.
    • private-dns-name - The private DNS name of the network interface (IPv4).
    • requester-id - The alias or Amazon Web Services account ID of the principal or service that created the network interface.
    • requester-managed - Indicates whether the network interface is being managed by an Amazon Web Service (for example, Amazon Web Services Management Console, Auto Scaling, and so on).
    • source-dest-check - Indicates 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.
    • status - The status of the network interface. If the network interface is not attached to an instance, the status is available ; if a network interface is attached to an instance the status is in-use .
    • subnet-id - The ID of the subnet for the network interface.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the network interface.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceIds (list) --

    One or more network interface IDs.

    Default: Describes all your network interfaces.

    • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. You cannot specify this parameter and the network interface IDs parameter in the same request.
Return type

list(ec2.NetworkInterface)

Returns

A list of NetworkInterface resources

limit(**kwargs)

Creates an iterable up to a specified amount of NetworkInterface resources in the collection.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = ec2.network_interfaces.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
page_size(**kwargs)

Creates an iterable of all NetworkInterface resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = ec2.network_interfaces.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
placement_groups

A collection of PlacementGroup resources.A PlacementGroup Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all PlacementGroup resources in the collection.

See also: AWS API Documentation

Request Syntax

placement_group_iterator = ec2.placement_groups.all()
Return type
list(ec2.PlacementGroup)
Returns
A list of PlacementGroup resources
filter(**kwargs)

Creates an iterable of all PlacementGroup resources in the collection filtered by kwargs passed to method. A PlacementGroup collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

placement_group_iterator = ec2.placement_groups.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    GroupNames=[
        'string',
    ],
    GroupIds=[
        'string',
    ]
)
Parameters
  • Filters (list) --

    The filters.

    • group-name - The name of the placement group.
    • group-arn - The Amazon Resource Name (ARN) of the placement group.
    • spread-level - The spread level for the placement group (host | rack ).
    • state - The state of the placement group (pending | available | deleting | deleted ).
    • strategy - The strategy of the placement group (cluster | spread | partition ).
    • tag:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • GroupNames (list) --

    The names of the placement groups.

    Default: Describes all your placement groups, or only those otherwise specified.

    • (string) --
  • GroupIds (list) --

    The IDs of the placement groups.

    • (string) --
Return type

list(ec2.PlacementGroup)

Returns

A list of PlacementGroup resources

limit(**kwargs)

Creates an iterable up to a specified amount of PlacementGroup resources in the collection.

See also: AWS API Documentation

Request Syntax

placement_group_iterator = ec2.placement_groups.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.PlacementGroup)
Returns
A list of PlacementGroup resources
page_size(**kwargs)

Creates an iterable of all PlacementGroup resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

placement_group_iterator = ec2.placement_groups.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.PlacementGroup)
Returns
A list of PlacementGroup resources
route_tables

A collection of RouteTable resources.A RouteTable Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all RouteTable resources in the collection.

See also: AWS API Documentation

Request Syntax

route_table_iterator = ec2.route_tables.all()
Return type
list(ec2.RouteTable)
Returns
A list of RouteTable resources
filter(**kwargs)

Creates an iterable of all RouteTable resources in the collection filtered by kwargs passed to method. A RouteTable collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

route_table_iterator = ec2.route_tables.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    RouteTableIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • association.route-table-association-id - The ID of an association ID for the route table.
    • association.route-table-id - The ID of the route table involved in the association.
    • association.subnet-id - The ID of the subnet involved in the association.
    • association.main - Indicates whether the route table is the main route table for the VPC (true | false ). Route tables that do not have an association ID are not returned in the response.
    • owner-id - The ID of the Amazon Web Services account that owns the route table.
    • route-table-id - The ID of the route table.
    • route.destination-cidr-block - The IPv4 CIDR range specified in a route in the table.
    • route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in a route in the route table.
    • route.destination-prefix-list-id - The ID (prefix) of the Amazon Web Service specified in a route in the table.
    • route.egress-only-internet-gateway-id - The ID of an egress-only Internet gateway specified in a route in the route table.
    • route.gateway-id - The ID of a gateway specified in a route in the table.
    • route.instance-id - The ID of an instance specified in a route in the table.
    • route.nat-gateway-id - The ID of a NAT gateway.
    • route.transit-gateway-id - The ID of a transit gateway.
    • route.origin - Describes how the route was created. CreateRouteTable indicates that the route was automatically created when the route table was created; CreateRoute indicates that the route was manually added to the route table; EnableVgwRoutePropagation indicates that the route was propagated by route propagation.
    • route.state - The state of a route in the route table (active | blackhole ). The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on).
    • route.vpc-peering-connection-id - The ID of a VPC peering connection specified in a route in the table.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the route table.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableIds (list) --

    One or more route table IDs.

    Default: Describes all your route tables.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.RouteTable)

Returns

A list of RouteTable resources

limit(**kwargs)

Creates an iterable up to a specified amount of RouteTable resources in the collection.

See also: AWS API Documentation

Request Syntax

route_table_iterator = ec2.route_tables.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.RouteTable)
Returns
A list of RouteTable resources
page_size(**kwargs)

Creates an iterable of all RouteTable resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

route_table_iterator = ec2.route_tables.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.RouteTable)
Returns
A list of RouteTable resources
security_groups

A collection of SecurityGroup resources.A SecurityGroup Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all SecurityGroup resources in the collection.

See also: AWS API Documentation

Request Syntax

security_group_iterator = ec2.security_groups.all()
Return type
list(ec2.SecurityGroup)
Returns
A list of SecurityGroup resources
filter(**kwargs)

Creates an iterable of all SecurityGroup resources in the collection filtered by kwargs passed to method. A SecurityGroup collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

security_group_iterator = ec2.security_groups.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    GroupIds=[
        'string',
    ],
    GroupNames=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    The 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.cidr - An IPv4 CIDR block for an outbound security group rule.
    • egress.ip-permission.from-port - For an outbound rule, the start of port range for the TCP and UDP protocols, or an ICMP type number.
    • egress.ip-permission.group-id - The ID of a security group that has been referenced in an outbound security group rule.
    • egress.ip-permission.group-name - The name of a security group that is referenced in an outbound security group rule.
    • egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security group rule.
    • egress.ip-permission.prefix-list-id - The ID of a prefix list to which a security group rule allows outbound access.
    • egress.ip-permission.protocol - The IP protocol for an outbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • egress.ip-permission.to-port - For an outbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • egress.ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an outbound security group rule.
    • group-id - The ID of the security group.
    • group-name - The name of the security group.
    • ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule.
    • ip-permission.from-port - For an inbound rule, 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 referenced in an inbound security group rule.
    • ip-permission.group-name - The name of a security group that is referenced in an inbound security group rule.
    • ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group rule.
    • ip-permission.prefix-list-id - The ID of a prefix list from which a security group rule allows inbound access.
    • ip-permission.protocol - The IP protocol for an inbound security group rule (tcp | udp | icmp , a protocol number, or -1 for all protocols).
    • ip-permission.to-port - For an inbound rule, the end of port range for the TCP and UDP protocols, or an ICMP code.
    • ip-permission.user-id - The ID of an Amazon Web Services account that has been referenced in an inbound security group rule.
    • owner-id - The Amazon Web Services account ID of the owner of the security group.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • 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 from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • GroupIds (list) --

    The IDs of the security groups. Required for security groups in a nondefault VPC.

    Default: Describes all of your security groups.

    • (string) --
  • GroupNames (list) --

    [EC2-Classic and default VPC only] The names of the security groups. 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 of your security groups.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token to request the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.
Return type

list(ec2.SecurityGroup)

Returns

A list of SecurityGroup resources

limit(**kwargs)

Creates an iterable up to a specified amount of SecurityGroup resources in the collection.

See also: AWS API Documentation

Request Syntax

security_group_iterator = ec2.security_groups.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.SecurityGroup)
Returns
A list of SecurityGroup resources
page_size(**kwargs)

Creates an iterable of all SecurityGroup resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

security_group_iterator = ec2.security_groups.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.SecurityGroup)
Returns
A list of SecurityGroup resources
snapshots

A collection of Snapshot resources.A Snapshot Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Snapshot resources in the collection.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = ec2.snapshots.all()
Return type
list(ec2.Snapshot)
Returns
A list of Snapshot resources
filter(**kwargs)

Creates an iterable of all Snapshot resources in the collection filtered by kwargs passed to method. A Snapshot collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = ec2.snapshots.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    OwnerIds=[
        'string',
    ],
    RestorableByUserIds=[
        'string',
    ],
    SnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • description - A description of the snapshot.
    • encrypted - Indicates whether the snapshot is encrypted (true | false )
    • owner-alias - The owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.
    • progress - The progress of the snapshot, as a percentage (for example, 80%).
    • snapshot-id - The snapshot ID.
    • start-time - The time stamp when the snapshot was initiated.
    • status - The status of the snapshot (pending | completed | error ).
    • storage-tier - The storage tier of the snapshot (archive | standard ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The ID of the volume the snapshot is for.
    • volume-size - The size of the volume, in GiB.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • OwnerIds (list) --

    Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , and amazon .

    • (string) --
  • RestorableByUserIds (list) --

    The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • (string) --
  • SnapshotIds (list) --

    The snapshot IDs.

    Default: Describes the snapshots for which you have create volume permissions.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

list(ec2.Snapshot)

Returns

A list of Snapshot resources

limit(**kwargs)

Creates an iterable up to a specified amount of Snapshot resources in the collection.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = ec2.snapshots.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Snapshot)
Returns
A list of Snapshot resources
page_size(**kwargs)

Creates an iterable of all Snapshot resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = ec2.snapshots.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Snapshot)
Returns
A list of Snapshot resources
subnets

A collection of Subnet resources.A Subnet Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Subnet resources in the collection.

See also: AWS API Documentation

Request Syntax

subnet_iterator = ec2.subnets.all()
Return type
list(ec2.Subnet)
Returns
A list of Subnet resources
filter(**kwargs)

Creates an iterable of all Subnet resources in the collection filtered by kwargs passed to method. A Subnet collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

subnet_iterator = ec2.subnets.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SubnetIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • availability-zone - The Availability Zone for the subnet. You can also use availabilityZone as the filter name.
    • availability-zone-id - The ID of the Availability Zone for the subnet. You can also use availabilityZoneId as the filter name.
    • available-ip-address-count - The number of IPv4 addresses in the subnet that are available.
    • cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.
    • default-for-az - Indicates whether this is the default subnet for the Availability Zone (true | false ). You can also use defaultForAz as the filter name.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.association-id - An association ID for an IPv6 CIDR block associated with the subnet.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the subnet.
    • ipv6-native - Indicates whether this is an IPv6 only subnet (true | false ).
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The ID of the Amazon Web Services account that owns the subnet.
    • state - The state of the subnet (pending | available ).
    • subnet-arn - The Amazon Resource Name (ARN) of the subnet.
    • subnet-id - The ID of the subnet.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC for the subnet.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • SubnetIds (list) --

    One or more subnet IDs.

    Default: Describes all your subnets.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.Subnet)

Returns

A list of Subnet resources

limit(**kwargs)

Creates an iterable up to a specified amount of Subnet resources in the collection.

See also: AWS API Documentation

Request Syntax

subnet_iterator = ec2.subnets.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Subnet)
Returns
A list of Subnet resources
page_size(**kwargs)

Creates an iterable of all Subnet resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

subnet_iterator = ec2.subnets.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Subnet)
Returns
A list of Subnet resources
volumes

A collection of Volume resources.A Volume Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Volume resources in the collection.

See also: AWS API Documentation

Request Syntax

volume_iterator = ec2.volumes.all()
Return type
list(ec2.Volume)
Returns
A list of Volume resources
filter(**kwargs)

Creates an iterable of all Volume resources in the collection filtered by kwargs passed to method. A Volume collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

volume_iterator = ec2.volumes.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • attachment.attach-time - The time stamp when the attachment initiated.
    • attachment.delete-on-termination - Whether the volume is deleted on instance termination.
    • attachment.device - The device name specified in the block device mapping (for example, /dev/sda1 ).
    • attachment.instance-id - The ID of the instance the volume is attached to.
    • attachment.status - The attachment state (attaching | attached | detaching ).
    • availability-zone - The Availability Zone in which the volume was created.
    • create-time - The time stamp when the volume was created.
    • encrypted - Indicates whether the volume is encrypted (true | false )
    • multi-attach-enabled - Indicates whether the volume is enabled for Multi-Attach (true | false )
    • fast-restored - Indicates whether the volume was created from a snapshot that is enabled for fast snapshot restore (true | false ).
    • size - The size of the volume, in GiB.
    • snapshot-id - The snapshot from which the volume was created.
    • status - The state of the volume (creating | available | in-use | deleting | deleted | error ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The volume ID.
    • volume-type - The Amazon EBS volume type (gp2 | gp3 | io1 | io2 | st1 | sc1 | standard )
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VolumeIds (list) --

    The volume IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
Return type

list(ec2.Volume)

Returns

A list of Volume resources

limit(**kwargs)

Creates an iterable up to a specified amount of Volume resources in the collection.

See also: AWS API Documentation

Request Syntax

volume_iterator = ec2.volumes.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Volume)
Returns
A list of Volume resources
page_size(**kwargs)

Creates an iterable of all Volume resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

volume_iterator = ec2.volumes.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Volume)
Returns
A list of Volume resources
vpc_addresses

A collection of VpcAddress resources.A VpcAddress Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all VpcAddress resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = ec2.vpc_addresses.all()
Return type
list(ec2.VpcAddress)
Returns
A list of VpcAddress resources
filter(**kwargs)

Creates an iterable of all VpcAddress resources in the collection filtered by kwargs passed to method. A VpcAddress collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = ec2.vpc_addresses.filter(
    PublicIps=[
        'string',
    ],
    AllocationIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • PublicIps (list) --

    One or more Elastic IP addresses.

    Default: Describes all your Elastic IP addresses.

    • (string) --
  • AllocationIds (list) --

    [EC2-VPC] Information about the allocation IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

list(ec2.VpcAddress)

Returns

A list of VpcAddress resources

limit(**kwargs)

Creates an iterable up to a specified amount of VpcAddress resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = ec2.vpc_addresses.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.VpcAddress)
Returns
A list of VpcAddress resources
page_size(**kwargs)

Creates an iterable of all VpcAddress resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = ec2.vpc_addresses.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.VpcAddress)
Returns
A list of VpcAddress resources
vpc_peering_connections

A collection of VpcPeeringConnection resources.A VpcPeeringConnection Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all VpcPeeringConnection resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = ec2.vpc_peering_connections.all()
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
filter(**kwargs)

Creates an iterable of all VpcPeeringConnection resources in the collection filtered by kwargs passed to method. A VpcPeeringConnection collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = ec2.vpc_peering_connections.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    VpcPeeringConnectionIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.
    • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.
    • accepter-vpc-info.vpc-id - The ID of the accepter VPC.
    • expiration-time - The expiration date and time for the VPC peering connection.
    • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.
    • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.
    • requester-vpc-info.vpc-id - The ID of the requester VPC.
    • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected ).
    • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-peering-connection-id - The ID of the VPC peering connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionIds (list) --

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.VpcPeeringConnection)

Returns

A list of VpcPeeringConnection resources

limit(**kwargs)

Creates an iterable up to a specified amount of VpcPeeringConnection resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = ec2.vpc_peering_connections.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
page_size(**kwargs)

Creates an iterable of all VpcPeeringConnection resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = ec2.vpc_peering_connections.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
vpcs

A collection of Vpc resources.A Vpc Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Vpc resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_iterator = ec2.vpcs.all()
Return type
list(ec2.Vpc)
Returns
A list of Vpc resources
filter(**kwargs)

Creates an iterable of all Vpc resources in the collection filtered by kwargs passed to method. A Vpc collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

vpc_iterator = ec2.vpcs.filter(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpcIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28 ).
    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
    • dhcp-options-id - The ID of a set of DHCP options.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.
    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
    • is-default - Indicates whether the VPC is the default VPC.
    • owner-id - The ID of the Amazon Web Services account that owns the VPC.
    • state - The state of the VPC (pending | available ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • VpcIds (list) --

    One or more VPC IDs.

    Default: Describes all your VPCs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.Vpc)

Returns

A list of Vpc resources

limit(**kwargs)

Creates an iterable up to a specified amount of Vpc resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_iterator = ec2.vpcs.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Vpc)
Returns
A list of Vpc resources
page_size(**kwargs)

Creates an iterable of all Vpc resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

vpc_iterator = ec2.vpcs.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Vpc)
Returns
A list of Vpc resources

ClassicAddress

class EC2.ClassicAddress(public_ip)

A resource representing an Amazon Elastic Compute Cloud (EC2) ClassicAddress:

import boto3

ec2 = boto3.resource('ec2')
classic_address = ec2.ClassicAddress('public_ip')
Parameters
public_ip (string) -- The ClassicAddress's public_ip identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

public_ip

(string) The ClassicAddress's public_ip identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

allocation_id
  • (string) --

    The ID representing the allocation of the address for use with EC2-VPC.

association_id
  • (string) --

    The ID representing the association of the address with an instance in a VPC.

carrier_ip
  • (string) --

    The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance).

customer_owned_ip
  • (string) --

    The customer-owned IP address.

customer_owned_ipv4_pool
  • (string) --

    The ID of the customer-owned address pool.

domain
  • (string) --

    Indicates whether this Elastic IP address is for use with instances in EC2-Classic (standard ) or instances in a VPC (vpc ).

instance_id
  • (string) --

    The ID of the instance that the address is associated with (if any).

network_border_group
  • (string) --

    The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

network_interface_id
  • (string) --

    The ID of the network interface.

network_interface_owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the network interface.

private_ip_address
  • (string) --

    The private IP address associated with the Elastic IP address.

public_ipv4_pool
  • (string) --

    The ID of an address pool.

tags
  • (list) --

    Any tags assigned to the Elastic IP address.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

associate(**kwargs)

Associates an Elastic IP address, or carrier IP address (for instances that are in subnets in Wavelength Zones) with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

[Subnets in Wavelength Zones] You can associate an IP address from the telecommunication carrier to the instance or network interface.

You cannot associate an Elastic IP address with an interface in a different network border group.

Warning

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = classic_address.associate(
    AllocationId='string',
    InstanceId='string',
    AllowReassociation=True|False,
    DryRun=True|False,
    NetworkInterfaceId='string',
    PrivateIpAddress='string'
)
Parameters
  • AllocationId (string) -- [EC2-VPC] The allocation ID. This is required for EC2-VPC.
  • InstanceId (string) -- The ID of the instance. The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.
  • AllowReassociation (boolean) -- [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceId (string) --

    [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

    For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

  • PrivateIpAddress (string) -- [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
Return type

dict

Returns

Response Syntax

{
    'AssociationId': 'string'
}

Response Structure

  • (dict) --

    • AssociationId (string) --

      [EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.

disassociate(**kwargs)

Disassociates an Elastic IP address from the instance or network interface it's associated with.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

See also: AWS API Documentation

Request Syntax

response = classic_address.disassociate(
    AssociationId='string',
    DryRun=True|False
)
Parameters
  • AssociationId (string) -- [EC2-VPC] The association ID. Required for EC2-VPC.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_addresses() to update the attributes of the ClassicAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

classic_address.load()
Returns
None
release(**kwargs)

Releases the specified Elastic IP address.

[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use DisassociateAddress .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

[Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse ).

After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another Amazon Web Services account.

[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see AllocateAddress .

For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = classic_address.release(
    AllocationId='string',
    NetworkBorderGroup='string',
    DryRun=True|False
)
Parameters
  • AllocationId (string) -- [EC2-VPC] The allocation ID. Required for EC2-VPC.
  • NetworkBorderGroup (string) --

    The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

    If you provide an incorrect network border group, you receive an InvalidAddress.NotFound error.

    You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you receive an InvalidParameterCombination error.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

reload()

Calls EC2.Client.describe_addresses() to update the attributes of the ClassicAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

classic_address.reload()
Returns
None

DhcpOptions

class EC2.DhcpOptions(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) DhcpOptions:

import boto3

ec2 = boto3.resource('ec2')
dhcp_options = ec2.DhcpOptions('id')
Parameters
id (string) -- The DhcpOptions's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The DhcpOptions's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

dhcp_configurations
  • (list) --

    One or more DHCP options in the set.

    • (dict) --

      Describes a DHCP configuration option.

      • Key (string) --

        The name of a DHCP option.

      • Values (list) --

        One or more values for the DHCP option.

        • (dict) --

          Describes a value for a resource attribute that is a String.

          • Value (string) --

            The attribute value. The value is case-sensitive.

dhcp_options_id
  • (string) --

    The ID of the set of DHCP options.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the DHCP options set.

tags
  • (list) --

    Any tags assigned to the DHCP options set.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

associate_with_vpc(**kwargs)

Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = dhcp_options.associate_with_vpc(
    VpcId='string',
    DryRun=True|False
)
Parameters
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = dhcp_options.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified set of DHCP options. You must disassociate the set of DHCP options before you can delete it. You can disassociate the set of DHCP options by associating either a new set of options or the default set of options with the VPC.

See also: AWS API Documentation

Request Syntax

response = dhcp_options.delete(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_dhcp_options() to update the attributes of the DhcpOptions resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

dhcp_options.load()
Returns
None
reload()

Calls EC2.Client.describe_dhcp_options() to update the attributes of the DhcpOptions resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

dhcp_options.reload()
Returns
None

Image

class EC2.Image(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) Image:

import boto3

ec2 = boto3.resource('ec2')
image = ec2.Image('id')
Parameters
id (string) -- The Image's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

These are the resource's available waiters:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The Image's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

architecture
  • (string) --

    The architecture of the image.

block_device_mappings
  • (list) --

    Any block device mapping entries.

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

boot_mode
  • (string) --

    The boot mode of the image. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide .

creation_date
  • (string) --

    The date and time the image was created.

deprecation_time
  • (string) --

    The date and time to deprecate the AMI, in UTC, in the following format: YYYY -MM -DD T*HH* :MM :SS Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

description
  • (string) --

    The description of the AMI that was provided during image creation.

ena_support
  • (boolean) --

    Specifies whether enhanced networking with ENA is enabled.

hypervisor
  • (string) --

    The hypervisor type of the image.

image_id
  • (string) --

    The ID of the AMI.

image_location
  • (string) --

    The location of the AMI.

image_owner_alias
  • (string) --

    The Amazon Web Services account alias (for example, amazon , self ) or the Amazon Web Services account ID of the AMI owner.

image_type
  • (string) --

    The type of image.

kernel_id
  • (string) --

    The kernel associated with the image, if any. Only applicable for machine images.

name
  • (string) --

    The name of the AMI that was provided during image creation.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the image.

platform
  • (string) --

    This value is set to windows for Windows AMIs; otherwise, it is blank.

platform_details
  • (string) --

    The platform details associated with the billing code of the AMI. For more information, see Understanding AMI billing in the Amazon Elastic Compute Cloud User Guide .

product_codes
  • (list) --

    Any product codes associated with the AMI.

    • (dict) --

      Describes a product code.

      • ProductCodeId (string) --

        The product code.

      • ProductCodeType (string) --

        The type of product code.

public
  • (boolean) --

    Indicates whether the image has public launch permissions. The value is true if this image has public launch permissions or false if it has only implicit and explicit launch permissions.

ramdisk_id
  • (string) --

    The RAM disk associated with the image, if any. Only applicable for machine images.

root_device_name
  • (string) --

    The device name of the root device volume (for example, /dev/sda1 ).

root_device_type
  • (string) --

    The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.

sriov_net_support
  • (string) --

    Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

state
  • (string) --

    The current state of the AMI. If the state is available , the image is successfully registered and can be used to launch an instance.

state_reason
  • (dict) --

    The reason for the state change.

    • Code (string) --

      The reason code for the state change.

    • Message (string) --

      The message for the state change.

      • Server.InsufficientInstanceCapacity : There was insufficient capacity available to satisfy the launch request.
      • Server.InternalError : An internal error caused the instance to terminate during launch.
      • Server.ScheduledStop : The instance was stopped due to a scheduled retirement.
      • Server.SpotInstanceShutdown : The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
      • Server.SpotInstanceTermination : The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
      • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.
      • Client.InstanceTerminated : The instance was terminated or rebooted during AMI creation.
      • Client.InternalError : A client error caused the instance to terminate during launch.
      • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.
      • Client.UserInitiatedHibernate : Hibernation was initiated on 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 account limits.
tags
  • (list) --

    Any tags assigned to the image.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

tpm_support
  • (string) --

    If the image is configured for NitroTPM support, the value is v2.0 . For more information, see NitroTPM in the Amazon Elastic Compute Cloud User Guide .

usage_operation
  • (string) --

    The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. usageOperation corresponds to the lineitem/Operation column on your Amazon Web Services Cost and Usage Report and in the Amazon Web Services Price List API . You can view these fields on the Instances or AMIs pages in the Amazon EC2 console, or in the responses that are returned by the DescribeImages command in the Amazon EC2 API, or the describe-images command in the CLI.

virtualization_type
  • (string) --

    The type of virtualization of the AMI.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = image.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

deregister(**kwargs)

Deregisters the specified AMI. After you deregister an AMI, it can't be used to launch new instances.

If you deregister an AMI that matches a Recycle Bin retention rule, the AMI is retained in the Recycle Bin for the specified retention period. For more information, see Recycle Bin in the Amazon Elastic Compute Cloud User Guide.

When you deregister an AMI, it doesn't affect any instances that you've already launched from the AMI. You'll continue to incur usage costs for those instances until you terminate them.

When you deregister an Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the root volume of the instance during the AMI creation process. When you deregister an instance store-backed AMI, it doesn't affect the files that you uploaded to Amazon S3 when you created the AMI.

See also: AWS API Documentation

Request Syntax

response = image.deregister(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
describe_attribute(**kwargs)

Describes the specified attribute of the specified AMI. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = image.describe_attribute(
    Attribute='description'|'kernel'|'ramdisk'|'launchPermission'|'productCodes'|'blockDeviceMapping'|'sriovNetSupport'|'bootMode'|'tpmSupport'|'uefiData'|'lastLaunchedTime',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The AMI attribute.

    Note : The blockDeviceMapping attribute is deprecated. Using this attribute returns the Client.AuthFailure error. To get information about the block device mappings for an AMI, use the DescribeImages action.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'BlockDeviceMappings': [
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    'ImageId': 'string',
    'LaunchPermissions': [
        {
            'Group': 'all',
            'UserId': 'string',
            'OrganizationArn': 'string',
            'OrganizationalUnitArn': 'string'
        },
    ],
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'Description': {
        'Value': 'string'
    },
    'KernelId': {
        'Value': 'string'
    },
    'RamdiskId': {
        'Value': 'string'
    },
    'SriovNetSupport': {
        'Value': 'string'
    },
    'BootMode': {
        'Value': 'string'
    },
    'TpmSupport': {
        'Value': 'string'
    },
    'UefiData': {
        'Value': 'string'
    },
    'LastLaunchedTime': {
        'Value': 'string'
    }
}

Response Structure

  • (dict) --

    Describes an image attribute.

    • BlockDeviceMappings (list) --

      The block device mapping entries.

      • (dict) --

        Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh ).

        • 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.

          NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

          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.

        • Ebs (dict) --

          Parameters used to automatically set up EBS volumes when the instance is launched.

          • DeleteOnTermination (boolean) --

            Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

          • Iops (integer) --

            The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

            The following are the supported values for each volume type:

            • gp3 : 3,000-16,000 IOPS
            • io1 : 100-64,000 IOPS
            • io2 : 100-64,000 IOPS

            For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

            This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

          • SnapshotId (string) --

            The ID of the snapshot.

          • VolumeSize (integer) --

            The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

            The following are the supported volumes sizes for each volume type:

            • gp2 and gp3 :1-16,384
            • io1 and io2 : 4-16,384
            • st1 and sc1 : 125-16,384
            • standard : 1-1,024
          • VolumeType (string) --

            The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

          • KmsKeyId (string) --

            Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

            This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

          • Throughput (integer) --

            The throughput that the volume supports, in MiB/s.

            This parameter is valid only for gp3 volumes.

            Valid Range: Minimum value of 125. Maximum value of 1000.

          • OutpostArn (string) --

            The ARN of the Outpost on which the snapshot is stored.

            This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

          • Encrypted (boolean) --

            Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

            In no case can you remove encryption from an encrypted volume.

            Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

            This parameter is not returned by DescribeImageAttribute .

        • NoDevice (string) --

          To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

    • ImageId (string) --

      The ID of the AMI.

    • LaunchPermissions (list) --

      The launch permissions.

      • (dict) --

        Describes a launch permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn (string) --

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn (string) --

          The Amazon Resource Name (ARN) of an organizational unit (OU).

    • ProductCodes (list) --

      The product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • Description (dict) --

      A description for the AMI.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • KernelId (dict) --

      The kernel ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • RamdiskId (dict) --

      The RAM disk ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • SriovNetSupport (dict) --

      Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • BootMode (dict) --

      The boot mode.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • TpmSupport (dict) --

      If the image is configured for NitroTPM support, the value is v2.0 .

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • UefiData (dict) --

      Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot in the Amazon Elastic Compute Cloud User Guide .

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • LastLaunchedTime (dict) --

      The date and time, in ISO 8601 date-time format , when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.

      Note

      lastLaunchedTime data is available starting April 2017.

      • Value (string) --

        The attribute value. The value is case-sensitive.

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_images() to update the attributes of the Image resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

image.load()
Returns
None
modify_attribute(**kwargs)

Modifies the specified attribute of the specified AMI. You can specify only one attribute at a time. You can use the Attribute parameter to specify the attribute or one of the following parameters: Description or LaunchPermission .

Images with an Amazon Web Services Marketplace product code cannot be made public.

To enable the SriovNetSupport enhanced networking attribute of an image, enable SriovNetSupport on an instance and create an AMI from the instance.

See also: AWS API Documentation

Request Syntax

response = image.modify_attribute(
    Attribute='string',
    Description={
        'Value': 'string'
    },
    LaunchPermission={
        'Add': [
            {
                'Group': 'all',
                'UserId': 'string',
                'OrganizationArn': 'string',
                'OrganizationalUnitArn': 'string'
            },
        ],
        'Remove': [
            {
                'Group': 'all',
                'UserId': 'string',
                'OrganizationArn': 'string',
                'OrganizationalUnitArn': 'string'
            },
        ]
    },
    OperationType='add'|'remove',
    ProductCodes=[
        'string',
    ],
    UserGroups=[
        'string',
    ],
    UserIds=[
        'string',
    ],
    Value='string',
    DryRun=True|False,
    OrganizationArns=[
        'string',
    ],
    OrganizationalUnitArns=[
        'string',
    ]
)
Parameters
  • Attribute (string) --

    The name of the attribute to modify.

    Valid values: description | launchPermission

  • Description (dict) --

    A new description for the AMI.

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • LaunchPermission (dict) --

    A new launch permission for the AMI.

    • Add (list) --

      The Amazon Web Services account ID, organization ARN, or OU ARN to add to the list of launch permissions for the AMI.

      • (dict) --

        Describes a launch permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn (string) --

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn (string) --

          The Amazon Resource Name (ARN) of an organizational unit (OU).

    • Remove (list) --

      The Amazon Web Services account ID, organization ARN, or OU ARN to remove from the list of launch permissions for the AMI.

      • (dict) --

        Describes a launch permission.

        • Group (string) --

          The name of the group.

        • UserId (string) --

          The Amazon Web Services account ID.

          Constraints: Up to 10 000 account IDs can be specified in a single request.

        • OrganizationArn (string) --

          The Amazon Resource Name (ARN) of an organization.

        • OrganizationalUnitArn (string) --

          The Amazon Resource Name (ARN) of an organizational unit (OU).

  • OperationType (string) -- The operation type. This parameter can be used only when the Attribute parameter is launchPermission .
  • ProductCodes (list) --

    Not supported.

    • (string) --
  • UserGroups (list) --

    The user groups. This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
  • UserIds (list) --

    The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
  • Value (string) -- The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • OrganizationArns (list) --

    The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
  • OrganizationalUnitArns (list) --

    The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission .

    • (string) --
Returns

None

reload()

Calls EC2.Client.describe_images() to update the attributes of the Image resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

image.reload()
Returns
None
reset_attribute(**kwargs)

Resets an attribute of an AMI to its default value.

See also: AWS API Documentation

Request Syntax

response = image.reset_attribute(
    Attribute='launchPermission',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute to reset (currently you can only reset the launch permission attribute).

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Waiters

Waiters provide an interface to wait for a resource to reach a specific state. For more information about waiters refer to the Resources Introduction Guide.

wait_until_exists(**kwargs)

Waits until this Image is exists. This method calls EC2.Waiter.image_exists.wait() which polls. EC2.Client.describe_images() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

image.wait_until_exists(
    ExecutableUsers=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    Owners=[
        'string',
    ],
    IncludeDeprecated=True|False,
    DryRun=True|False
)
Parameters
  • ExecutableUsers (list) --

    Scopes the images by users with explicit launch permissions. Specify an Amazon Web Services account ID, self (the sender of the request), or all (public AMIs).

    • If you specify an Amazon Web Services account ID that is not your own, only AMIs shared with that specific Amazon Web Services account ID are returned. However, AMIs that are shared with the account’s organization or organizational unit (OU) are not returned.
    • If you specify self or your own Amazon Web Services account ID, AMIs shared with your account are returned. In addition, AMIs that are shared with the organization or OU of which you are member are also returned.
    • If you specify all , all public AMIs are returned.
    • (string) --
  • Filters (list) --

    The filters.

    • architecture - The image architecture (i386 | x86_64 | arm64 ).
    • block-device-mapping.delete-on-termination - A Boolean value that indicates whether the Amazon EBS volume is deleted on instance termination.
    • block-device-mapping.device-name - The device name specified in the block device mapping (for example, /dev/sdh or xvdh ).
    • block-device-mapping.snapshot-id - The ID of the snapshot used for the Amazon EBS volume.
    • block-device-mapping.volume-size - The volume size of the Amazon EBS volume, in GiB.
    • block-device-mapping.volume-type - The volume type of the Amazon EBS volume (io1 | io2 | gp2 | gp3 | sc1 | st1 | standard ).
    • block-device-mapping.encrypted - A Boolean that indicates whether the Amazon EBS volume is encrypted.
    • creation-date - The time when the image was created, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • description - The description of the image (provided during image creation).
    • ena-support - A Boolean that indicates whether enhanced networking with ENA is enabled.
    • hypervisor - The hypervisor type (ovm | xen ).
    • image-id - The ID of the image.
    • image-type - The image type (machine | kernel | ramdisk ).
    • is-public - A Boolean that indicates whether the image is public.
    • kernel-id - The kernel ID.
    • manifest-location - The location of the image manifest.
    • name - The name of the AMI (provided during image creation).
    • owner-alias - The owner alias (amazon | aws-marketplace ). The valid aliases are defined in an Amazon-maintained list. This is not the Amazon Web Services account alias that can be set using the IAM console. We recommend that you use the Owner request parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the Owner request parameter instead of this filter.
    • platform - The platform. To only list Windows-based AMIs, use windows .
    • product-code - The product code.
    • product-code.type - The type of the product code (marketplace ).
    • ramdisk-id - The RAM disk ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (ebs | instance-store ).
    • state - The state of the image (available | pending | failed ).
    • state-reason-code - The reason code for the state change.
    • state-reason-message - The message for the state change.
    • sriov-net-support - A value of simple indicates that enhanced networking with the Intel 82599 VF interface is enabled.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • virtualization-type - The virtualization type (paravirtual | hvm ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • Owners (list) --

    Scopes the results to images with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , amazon , and aws-marketplace . If you omit this parameter, the results include all images for which you have launch permissions, regardless of ownership.

    • (string) --
  • IncludeDeprecated (boolean) --

    If true , all deprecated AMIs are included in the response. If false , no deprecated AMIs are included in the response. If no value is specified, the default value is false .

    Note

    If you are the AMI owner, all deprecated AMIs appear in the response regardless of the value (true or false ) that you set for this parameter.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Instance

class EC2.Instance(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) Instance:

import boto3

ec2 = boto3.resource('ec2')
instance = ec2.Instance('id')
Parameters
id (string) -- The Instance's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

These are the resource's available collections:

These are the resource's available waiters:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The Instance's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

ami_launch_index
  • (integer) --

    The AMI launch index, which can be used to find this instance in the launch group.

architecture
  • (string) --

    The architecture of the image.

block_device_mappings
  • (list) --

    Any block device mapping entries for the instance.

    • (dict) --

      Describes a block device mapping.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • AttachTime (datetime) --

          The time stamp when the attachment initiated.

        • DeleteOnTermination (boolean) --

          Indicates whether the volume is deleted on instance termination.

        • Status (string) --

          The attachment state.

        • VolumeId (string) --

          The ID of the EBS volume.

boot_mode
  • (string) --

    The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide .

capacity_reservation_id
  • (string) --

    The ID of the Capacity Reservation.

capacity_reservation_specification
  • (dict) --

    Information about the Capacity Reservation targeting option.

    • CapacityReservationPreference (string) --

      Describes the instance's Capacity Reservation preferences. Possible preferences include:

      • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
      • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
    • CapacityReservationTarget (dict) --

      Information about the targeted Capacity Reservation or Capacity Reservation group.

      • CapacityReservationId (string) --

        The ID of the targeted Capacity Reservation.

      • CapacityReservationResourceGroupArn (string) --

        The ARN of the targeted Capacity Reservation group.

client_token
  • (string) --

    The idempotency token you provided when you launched the instance, if applicable.

cpu_options
  • (dict) --

    The CPU options for the instance.

    • CoreCount (integer) --

      The number of CPU cores for the instance.

    • ThreadsPerCore (integer) --

      The number of threads per CPU core.

ebs_optimized
  • (boolean) --

    Indicates whether the instance is optimized for Amazon 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.

elastic_gpu_associations
  • (list) --

    The Elastic GPU associated with the instance.

    • (dict) --

      Describes the association between an instance and an Elastic Graphics accelerator.

      • ElasticGpuId (string) --

        The ID of the Elastic Graphics accelerator.

      • ElasticGpuAssociationId (string) --

        The ID of the association.

      • ElasticGpuAssociationState (string) --

        The state of the association between the instance and the Elastic Graphics accelerator.

      • ElasticGpuAssociationTime (string) --

        The time the Elastic Graphics accelerator was associated with the instance.

elastic_inference_accelerator_associations
  • (list) --

    The elastic inference accelerator associated with the instance.

    • (dict) --

      Describes the association between an instance and an elastic inference accelerator.

      • ElasticInferenceAcceleratorArn (string) --

        The Amazon Resource Name (ARN) of the elastic inference accelerator.

      • ElasticInferenceAcceleratorAssociationId (string) --

        The ID of the association.

      • ElasticInferenceAcceleratorAssociationState (string) --

        The state of the elastic inference accelerator.

      • ElasticInferenceAcceleratorAssociationTime (datetime) --

        The time at which the elastic inference accelerator is associated with an instance.

ena_support
  • (boolean) --

    Specifies whether enhanced networking with ENA is enabled.

enclave_options
  • (dict) --

    Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.

    • Enabled (boolean) --

      If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

hibernation_options
  • (dict) --

    Indicates whether the instance is enabled for hibernation.

    • Configured (boolean) --

      If this parameter is set to true , your instance is enabled for hibernation; otherwise, it is not enabled for hibernation.

hypervisor
  • (string) --

    The hypervisor type of the instance. The value xen is used for both Xen and Nitro hypervisors.

iam_instance_profile
  • (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.

image_id
  • (string) --

    The ID of the AMI used to launch the instance.

instance_id
  • (string) --

    The ID of the instance.

instance_lifecycle
  • (string) --

    Indicates whether this is a Spot Instance or a Scheduled Instance.

instance_type
  • (string) --

    The instance type.

ipv6_address
  • (string) --

    The IPv6 address assigned to the instance.

kernel_id
  • (string) --

    The kernel associated with this instance, if applicable.

key_name
  • (string) --

    The name of the key pair, if this instance was launched with an associated key pair.

launch_time
  • (datetime) --

    The time the instance was launched.

licenses
  • (list) --

    The license configurations for the instance.

    • (dict) --

      Describes a license configuration.

      • LicenseConfigurationArn (string) --

        The Amazon Resource Name (ARN) of the license configuration.

maintenance_options
  • (dict) --

    Provides information on the recovery and maintenance options of your instance.

    • AutoRecovery (string) --

      Provides information on the current automatic recovery behavior of your instance.

metadata_options
  • (dict) --

    The metadata options for the instance.

    • State (string) --

      The state of the metadata option changes.

      pending - The metadata options are being updated and the instance is not ready to process metadata traffic with the new selection.

      applied - The metadata options have been successfully applied on the instance.

    • HttpTokens (string) --

      The state of token usage for your instance metadata requests.

      If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

      If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credential always returns the version 2.0 credentials; the version 1.0 credentials are not available.

      Default: optional

    • HttpPutResponseHopLimit (integer) --

      The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

      Default: 1

      Possible values: Integers from 1 to 64

    • HttpEndpoint (string) --

      Indicates whether the HTTP metadata endpoint on your instances is enabled or disabled.

      If the value is disabled , you cannot access your instance metadata.

    • HttpProtocolIpv6 (string) --

      Indicates whether the IPv6 endpoint for the instance metadata service is enabled or disabled.

    • InstanceMetadataTags (string) --

      Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see Work with instance tags using the instance metadata .

monitoring
  • (dict) --

    The monitoring for the instance.

    • State (string) --

      Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

network_interfaces_attribute
  • (list) --

    [EC2-VPC] The network interfaces for the instance.

    • (dict) --

      Describes a network interface.

      • Association (dict) --

        The association information for an Elastic IPv4 associated with the network interface.

        • CarrierIp (string) --

          The carrier IP address associated with the network interface.

        • CustomerOwnedIp (string) --

          The customer-owned IP address associated with the network interface.

        • IpOwnerId (string) --

          The ID of the owner of the Elastic IP address.

        • PublicDnsName (string) --

          The public DNS name.

        • PublicIp (string) --

          The public IP address or Elastic IP address bound to the network interface.

      • Attachment (dict) --

        The network interface attachment.

        • AttachTime (datetime) --

          The time stamp when the attachment initiated.

        • AttachmentId (string) --

          The ID of the network interface attachment.

        • DeleteOnTermination (boolean) --

          Indicates whether the network interface is deleted when the instance is terminated.

        • DeviceIndex (integer) --

          The index of the device on the instance for the network interface attachment.

        • Status (string) --

          The attachment state.

        • NetworkCardIndex (integer) --

          The index of the network card.

      • Description (string) --

        The description.

      • 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.

      • Ipv6Addresses (list) --

        One or more IPv6 addresses associated with the network interface.

        • (dict) --

          Describes an IPv6 address.

          • Ipv6Address (string) --

            The IPv6 address.

      • MacAddress (string) --

        The MAC address.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

      • OwnerId (string) --

        The ID of the Amazon Web Services account that created the network interface.

      • PrivateDnsName (string) --

        The private DNS name.

      • PrivateIpAddress (string) --

        The IPv4 address of the network interface within the subnet.

      • PrivateIpAddresses (list) --

        One or more private IPv4 addresses associated with the network interface.

        • (dict) --

          Describes a private IPv4 address.

          • Association (dict) --

            The association information for an Elastic IP address for the network interface.

            • CarrierIp (string) --

              The carrier IP address associated with the network interface.

            • CustomerOwnedIp (string) --

              The customer-owned IP address associated with the network interface.

            • IpOwnerId (string) --

              The ID of the owner of the Elastic IP address.

            • PublicDnsName (string) --

              The public DNS name.

            • PublicIp (string) --

              The public IP address or Elastic IP address bound to the network interface.

          • Primary (boolean) --

            Indicates whether this IPv4 address is the primary private IP address of the network interface.

          • PrivateDnsName (string) --

            The private IPv4 DNS name.

          • PrivateIpAddress (string) --

            The private IPv4 address of the network interface.

      • SourceDestCheck (boolean) --

        Indicates whether source/destination checking is enabled.

      • Status (string) --

        The status of the network interface.

      • SubnetId (string) --

        The ID of the subnet.

      • VpcId (string) --

        The ID of the VPC.

      • InterfaceType (string) --

        The type of network interface.

        Valid values: interface | efa | trunk

      • Ipv4Prefixes (list) --

        The IPv4 delegated prefixes that are assigned to the network interface.

        • (dict) --

          Information about an IPv4 prefix.

          • Ipv4Prefix (string) --

            One or more IPv4 prefixes assigned to the network interface.

      • Ipv6Prefixes (list) --

        The IPv6 delegated prefixes that are assigned to the network interface.

        • (dict) --

          Information about an IPv6 prefix.

          • Ipv6Prefix (string) --

            One or more IPv6 prefixes assigned to the network interface.

outpost_arn
  • (string) --

    The Amazon Resource Name (ARN) of the Outpost.

placement
  • (dict) --

    The location where the instance launched, if applicable.

    • AvailabilityZone (string) --

      The Availability Zone of the instance.

      If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

      This parameter is not supported by CreateFleet .

    • Affinity (string) --

      The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • GroupName (string) --

      The name of the placement group the instance is in.

    • PartitionNumber (integer) --

      The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

      This parameter is not supported by CreateFleet .

    • HostId (string) --

      The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • 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.

      This parameter is not supported by CreateFleet .

      T3 instances that use the unlimited CPU credit option do not support host tenancy.

    • SpreadDomain (string) --

      Reserved for future use.

      This parameter is not supported by CreateFleet .

    • HostResourceGroupArn (string) --

      The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

      This parameter is not supported by CreateFleet .

platform
  • (string) --

    The value is Windows for Windows instances; otherwise blank.

platform_details
private_dns_name
  • (string) --

    (IPv4 only) The private DNS hostname name assigned to the instance. This DNS hostname can only be used inside the Amazon EC2 network. This name is not available until the instance enters the running state.

    [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private DNS hostnames if you've enabled DNS resolution and DNS hostnames in your VPC. If you are not using the Amazon-provided DNS server in your VPC, your custom domain name servers must resolve the hostname as appropriate.

private_dns_name_options
  • (dict) --

    The options for the instance hostname.

    • HostnameType (string) --

      The type of hostname to assign to an instance.

    • EnableResourceNameDnsARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

    • EnableResourceNameDnsAAAARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

private_ip_address
  • (string) --

    The private IPv4 address assigned to the instance.

product_codes
  • (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.

public_dns_name
  • (string) --

    (IPv4 only) 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.

public_ip_address
  • (string) --

    The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.

    A Carrier IP address only applies to an instance launched in a subnet associated with a Wavelength Zone.

ramdisk_id
  • (string) --

    The RAM disk associated with this instance, if applicable.

root_device_name
  • (string) --

    The device name of the root device volume (for example, /dev/sda1 ).

root_device_type
  • (string) --

    The root device type used by the AMI. The AMI can use an EBS volume or an instance store volume.

security_groups
  • (list) --

    The 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.

source_dest_check
  • (boolean) --

    Indicates whether source/destination checking is enabled.

spot_instance_request_id
  • (string) --

    If the request is a Spot Instance request, the ID of the request.

sriov_net_support
  • (string) --

    Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

state
  • (dict) --

    The current state of the instance.

    • Code (integer) --

      The state of the instance as a 16-bit unsigned integer.

      The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

      The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

      The valid values for instance-state-code will all be in the range of the low byte and they are:

      • 0 : pending
      • 16 : running
      • 32 : shutting-down
      • 48 : terminated
      • 64 : stopping
      • 80 : stopped

      You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

    • Name (string) --

      The current state of the instance.

state_reason
  • (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.InsufficientInstanceCapacity : There was insufficient capacity available to satisfy the launch request.
      • Server.InternalError : An internal error caused the instance to terminate during launch.
      • Server.ScheduledStop : The instance was stopped due to a scheduled retirement.
      • Server.SpotInstanceShutdown : The instance was stopped because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
      • Server.SpotInstanceTermination : The instance was terminated because the number of Spot requests with a maximum price equal to or higher than the Spot price exceeded available capacity or because of an increase in the Spot price.
      • Client.InstanceInitiatedShutdown : The instance was shut down using the shutdown -h command from the instance.
      • Client.InstanceTerminated : The instance was terminated or rebooted during AMI creation.
      • Client.InternalError : A client error caused the instance to terminate during launch.
      • Client.InvalidSnapshot.NotFound : The specified snapshot was not found.
      • Client.UserInitiatedHibernate : Hibernation was initiated on 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 account limits.
state_transition_reason
  • (string) --

    The reason for the most recent state transition. This might be an empty string.

subnet_id
  • (string) --

    [EC2-VPC] The ID of the subnet in which the instance is running.

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 256 Unicode characters.

tpm_support
  • (string) --

    If the instance is configured for NitroTPM support, the value is v2.0 . For more information, see NitroTPM in the Amazon EC2 User Guide .

usage_operation
usage_operation_update_time
  • (datetime) --

    The time that the usage operation was last updated.

virtualization_type
  • (string) --

    The virtualization type of the instance.

vpc_id
  • (string) --

    [EC2-VPC] The ID of the VPC in which the instance is running.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

classic_address

(ClassicAddress) The related classic_address if set, otherwise None.

image

(Image) The related image if set, otherwise None.

key_pair

(KeyPairInfo) The related key_pair if set, otherwise None.

network_interfaces

(NetworkInterface) The related network_interfaces if set, otherwise None.

placement_group

(PlacementGroup) The related placement_group if set, otherwise None.

subnet

(Subnet) The related subnet if set, otherwise None.

vpc

(Vpc) The related vpc if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

Linking your instance to a VPC is sometimes referred to as attaching your instance.

See also: AWS API Documentation

Request Syntax

response = instance.attach_classic_link_vpc(
    DryRun=True|False,
    Groups=[
        'string',
    ],
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    [REQUIRED]

    The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

    • (string) --
  • VpcId (string) --

    [REQUIRED]

    The ID of a ClassicLink-enabled VPC.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

attach_volume(**kwargs)

Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

After you attach an EBS volume, you must make it available. For more information, see Make an EBS volume available for use .

If a volume has an Amazon Web Services Marketplace product code:

  • The volume can be attached only to a stopped instance.
  • Amazon Web Services Marketplace product codes are copied from the volume to the instance.
  • You must be subscribed to the product.
  • The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.

For more information, see Attach an Amazon EBS volume to an instance in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.attach_volume(
    Device='string',
    VolumeId='string',
    DryRun=True|False
)
Parameters
  • Device (string) --

    [REQUIRED]

    The device name (for example, /dev/sdh or xvdh ).

  • VolumeId (string) --

    [REQUIRED]

    The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AttachTime': datetime(2015, 1, 1),
    'Device': 'string',
    'InstanceId': 'string',
    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
    'VolumeId': 'string',
    'DeleteOnTermination': True|False
}

Response Structure

  • (dict) --

    Describes volume attachment details.

    • AttachTime (datetime) --

      The time stamp when the attachment initiated.

    • Device (string) --

      The device name.

    • InstanceId (string) --

      The ID of the instance.

    • State (string) --

      The attachment state of the volume.

    • VolumeId (string) --

      The ID of the volume.

    • DeleteOnTermination (boolean) --

      Indicates whether the EBS volume is deleted on instance termination.

console_output(**kwargs)

Gets the console output for the specified instance. For Linux instances, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. For Windows instances, the instance console output includes the last three system event log errors.

By default, the console output returns buffered information that was posted shortly after an instance transition state (start, stop, reboot, or terminate). This information is available for at least one hour after the most recent post. Only the most recent 64 KB of console output is available.

You can optionally retrieve the latest serial console output at any time during the instance lifecycle. This option is supported on instance types that use the Nitro hypervisor.

For more information, see Instance console output in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.console_output(
    DryRun=True|False,
    Latest=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Latest (boolean) --

    When enabled, retrieves the latest console output for the instance.

    Default: disabled (false )

Return type

dict

Returns

Response Syntax

{
    'InstanceId': 'string',
    'Output': 'string',
    'Timestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The ID of the instance.

    • Output (string) --

      The console output, base64-encoded. If you are using a command line tool, the tool decodes the output for you.

    • Timestamp (datetime) --

      The time at which the output was last updated.

create_image(**kwargs)

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

By default, when Amazon EC2 creates the new AMI, it reboots the instance so that it can take snapshots of the attached volumes while data is at rest, in order to ensure a consistent state. You can set the NoReboot parameter to true in the API request, or use the --no-reboot option in the CLI to prevent Amazon EC2 from shutting down and rebooting the instance.

Warning

If you choose to bypass the shutdown and reboot process by setting the NoReboot parameter to true in the API request, or by using the --no-reboot option in the CLI, we can't guarantee the file system integrity of the created image.

If you customized your instance with instance store volumes or Amazon EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.

For more information, see Creating Amazon EBS-Backed Linux AMIs in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

image = instance.create_image(
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    Description='string',
    DryRun=True|False,
    Name='string',
    NoReboot=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • BlockDeviceMappings (list) --

    The block device mappings. This parameter cannot be used to modify the encryption status of existing volumes or snapshots. To create an AMI with encrypted snapshots, use the CopyImage action.

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

  • Description (string) -- A description for the new image.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Name (string) --

    [REQUIRED]

    A name for the new image.

    Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

  • NoReboot (boolean) --

    By default, when Amazon EC2 creates the new AMI, it reboots the instance so that it can take snapshots of the attached volumes while data is at rest, in order to ensure a consistent state. You can set the NoReboot parameter to true in the API request, or use the --no-reboot option in the CLI to prevent Amazon EC2 from shutting down and rebooting the instance.

    Warning

    If you choose to bypass the shutdown and reboot process by setting the NoReboot parameter to true in the API request, or by using the --no-reboot option in the CLI, we can't guarantee the file system integrity of the created image.

    Default: false (follow standard reboot process)

  • TagSpecifications (list) --

    The tags to apply to the AMI and snapshots on creation. You can tag the AMI, the snapshots, or both.

    • To tag the AMI, the value for ResourceType must be image .
    • To tag the snapshots that are created of the root volume and of other Amazon EBS volumes that are attached to the instance, the value for ResourceType must be snapshot . The same tag is applied to all of the snapshots that are created.

    If you specify other values for ResourceType , the request fails.

    To tag an AMI or snapshot after it has been created, see CreateTags .

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.Image

Returns

Image resource

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = instance.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete_tags(**kwargs)

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags . For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.delete_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    The tags to delete. Specify a tag key and an optional tag value to delete specific tags. If you specify a tag key without a tag value, we delete any tag with this key regardless of its value. If you specify a tag key with an empty string as the tag value, we delete the tag only if its value is an empty string.

    If you omit this parameter, we delete all user-defined tags for the specified resources. We do not delete Amazon Web Services-generated tags (tags that have the aws: prefix).

    Constraints: Up to 1000 tags.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Returns

None

describe_attribute(**kwargs)

Describes the specified attribute of the specified instance. You can specify only one attribute at a time. Valid attribute values are: instanceType | kernel | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport

See also: AWS API Documentation

Request Syntax

response = instance.describe_attribute(
    Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop',
    DryRun=True|False,

)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The instance attribute.

    Note: The enaSupport attribute is not supported at this time.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Groups': [
        {
            'GroupName': 'string',
            'GroupId': 'string'
        },
    ],
    'BlockDeviceMappings': [
        {
            'DeviceName': 'string',
            'Ebs': {
                'AttachTime': datetime(2015, 1, 1),
                'DeleteOnTermination': True|False,
                'Status': 'attaching'|'attached'|'detaching'|'detached',
                'VolumeId': 'string'
            }
        },
    ],
    'DisableApiTermination': {
        'Value': True|False
    },
    'EnaSupport': {
        'Value': True|False
    },
    'EnclaveOptions': {
        'Enabled': True|False
    },
    'EbsOptimized': {
        'Value': True|False
    },
    'InstanceId': 'string',
    'InstanceInitiatedShutdownBehavior': {
        'Value': 'string'
    },
    'InstanceType': {
        'Value': 'string'
    },
    'KernelId': {
        'Value': 'string'
    },
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'RamdiskId': {
        'Value': 'string'
    },
    'RootDeviceName': {
        'Value': 'string'
    },
    'SourceDestCheck': {
        'Value': True|False
    },
    'SriovNetSupport': {
        'Value': 'string'
    },
    'UserData': {
        'Value': 'string'
    },
    'DisableApiStop': {
        'Value': True|False
    }
}

Response Structure

  • (dict) --

    Describes an instance attribute.

    • Groups (list) --

      The security groups associated with the instance.

      • (dict) --

        Describes a security group.

        • GroupName (string) --

          The name of the security group.

        • GroupId (string) --

          The ID of the security group.

    • BlockDeviceMappings (list) --

      The block device mapping of the instance.

      • (dict) --

        Describes a block device mapping.

        • DeviceName (string) --

          The device name (for example, /dev/sdh or xvdh ).

        • Ebs (dict) --

          Parameters used to automatically set up EBS volumes when the instance is launched.

          • AttachTime (datetime) --

            The time stamp when the attachment initiated.

          • DeleteOnTermination (boolean) --

            Indicates whether the volume is deleted on instance termination.

          • Status (string) --

            The attachment state.

          • VolumeId (string) --

            The ID of the EBS volume.

    • DisableApiTermination (dict) --

      If the value is true , you can't terminate the instance through the Amazon EC2 console, CLI, or API; otherwise, you can.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • EnaSupport (dict) --

      Indicates whether enhanced networking with ENA is enabled.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • EnclaveOptions (dict) --

      To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true ; otherwise, set it to false .

      • Enabled (boolean) --

        If this parameter is set to true , the instance is enabled for Amazon Web Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services Nitro Enclaves.

    • EbsOptimized (dict) --

      Indicates whether the instance is optimized for Amazon EBS I/O.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • InstanceId (string) --

      The ID of the instance.

    • InstanceInitiatedShutdownBehavior (dict) --

      Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • InstanceType (dict) --

      The instance type.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • KernelId (dict) --

      The kernel ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • ProductCodes (list) --

      A list of product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • RamdiskId (dict) --

      The RAM disk ID.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • RootDeviceName (dict) --

      The device name of the root device volume (for example, /dev/sda1 ).

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • SourceDestCheck (dict) --

      Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • SriovNetSupport (dict) --

      Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • UserData (dict) --

      The user data.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • DisableApiStop (dict) --

      To enable the instance for Amazon Web Services Stop Protection, set this parameter to true ; otherwise, set it to false .

      • Value (boolean) --

        The attribute value. The valid values are true or false .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

See also: AWS API Documentation

Request Syntax

response = instance.detach_classic_link_vpc(
    DryRun=True|False,
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC to which the instance is linked.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

detach_volume(**kwargs)

Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

For more information, see Detach an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.detach_volume(
    Device='string',
    Force=True|False,
    VolumeId='string',
    DryRun=True|False
)
Parameters
  • Device (string) -- The device name.
  • Force (boolean) -- Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
  • VolumeId (string) --

    [REQUIRED]

    The ID of the volume.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AttachTime': datetime(2015, 1, 1),
    'Device': 'string',
    'InstanceId': 'string',
    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
    'VolumeId': 'string',
    'DeleteOnTermination': True|False
}

Response Structure

  • (dict) --

    Describes volume attachment details.

    • AttachTime (datetime) --

      The time stamp when the attachment initiated.

    • Device (string) --

      The device name.

    • InstanceId (string) --

      The ID of the instance.

    • State (string) --

      The attachment state of the volume.

    • VolumeId (string) --

      The ID of the volume.

    • DeleteOnTermination (boolean) --

      Indicates whether the EBS volume is deleted on instance termination.

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_instances() to update the attributes of the Instance resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

instance.load()
Returns
None
modify_attribute(**kwargs)

Modifies the specified attribute of the specified instance. You can specify only one attribute at a time.

Note: Using this action to change the security groups associated with an elastic network interface (ENI) attached to an instance in a VPC can result in an error if the instance has more than one ENI. To change the security groups associated with an ENI attached to an instance that has multiple ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute action.

To modify some attributes, the instance must be stopped. For more information, see Modify a stopped instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.modify_attribute(
    SourceDestCheck={
        'Value': True|False
    },
    Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop',
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'VolumeId': 'string'
            },
            'NoDevice': 'string',
            'VirtualName': 'string'
        },
    ],
    DisableApiTermination={
        'Value': True|False
    },
    DryRun=True|False,
    EbsOptimized={
        'Value': True|False
    },
    EnaSupport={
        'Value': True|False
    },
    Groups=[
        'string',
    ],
    InstanceInitiatedShutdownBehavior={
        'Value': 'string'
    },
    InstanceType={
        'Value': 'string'
    },
    Kernel={
        'Value': 'string'
    },
    Ramdisk={
        'Value': 'string'
    },
    SriovNetSupport={
        'Value': 'string'
    },
    UserData={
        'Value': b'bytes'
    },
    Value='string',
    DisableApiStop={
        'Value': True|False
    }
)
Parameters
  • SourceDestCheck (dict) --

    Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • Attribute (string) -- The name of the attribute.
  • BlockDeviceMappings (list) --

    Modifies the DeleteOnTermination attribute for volumes that are currently attached. The volume must be owned by the caller. If no value is specified for DeleteOnTermination , the default is true and the volume is deleted when the instance is terminated.

    To add instance store volumes to an Amazon EBS-backed instance, you must add them when you launch the instance. For more information, see Update the block device mapping when launching an instance in the Amazon EC2 User Guide .

    • (dict) --

      Describes a block device mapping entry.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the volume is deleted on instance termination.

        • VolumeId (string) --

          The ID of the EBS volume.

      • NoDevice (string) --

        suppress the specified device included in the block device mapping.

      • VirtualName (string) --

        The virtual device name.

  • DisableApiTermination (dict) --

    If the value is true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot Instances.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EbsOptimized (dict) --

    Specifies whether the instance is optimized for Amazon 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.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • EnaSupport (dict) --

    Set to true to enable enhanced networking with ENA for the instance.

    This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • Groups (list) --

    [EC2-VPC] Replaces the security groups of the instance with the specified security groups. You must specify at least one security group, even if it's just the default security group for the VPC. You must specify the security group ID, not the security group name.

    • (string) --
  • InstanceInitiatedShutdownBehavior (dict) --

    Specifies whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • InstanceType (dict) --

    Changes the instance type to the specified value. For more information, see Instance types in the Amazon EC2 User Guide . If the instance type is not valid, the error returned is InvalidInstanceAttributeValue .

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • Kernel (dict) --

    Changes the instance's kernel to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • Ramdisk (dict) --

    Changes the instance's RAM disk to the specified value. We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB .

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • SriovNetSupport (dict) --

    Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the instance.

    There is no way to disable enhanced networking with the Intel 82599 Virtual Function interface at this time.

    This option is supported only for HVM instances. Specifying this option with a PV instance can make it unreachable.

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • UserData (dict) --

    Changes the instance's user data to the specified value. If you are using an Amazon Web Services SDK or command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text.

    • Value (bytes) --
  • Value (string) -- A new value for the attribute. Use only with the kernel , ramdisk , userData , disableApiTermination , or instanceInitiatedShutdownBehavior attribute.
  • DisableApiStop (dict) --

    Indicates whether an instance is enabled for stop protection. For more information, see Stop Protection .

    • Value (boolean) --

      The attribute value. The valid values are true or false .

Returns

None

monitor(**kwargs)

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitor your instances using CloudWatch in the Amazon EC2 User Guide .

To disable detailed monitoring, see UnmonitorInstances .

See also: AWS API Documentation

Request Syntax

response = instance.monitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

password_data(**kwargs)

Retrieves the encrypted administrator password for a running Windows instance.

The Windows password is generated at boot by the EC2Config service or EC2Launch scripts (Windows Server 2016 and later). This usually only happens the first time an instance is launched. For more information, see EC2Config and EC2Launch in the Amazon EC2 User Guide .

For the EC2Config service, the password is not generated for rebundled AMIs unless Ec2SetPassword is enabled before bundling.

The password is encrypted using the key pair that you specified when you launched the instance. You must provide the corresponding key pair file.

When you launch an instance, password generation and encryption may take a few minutes. If you try to retrieve the password before it's available, the output returns an empty string. We recommend that you wait up to 15 minutes after launching an instance before trying to retrieve the generated password.

See also: AWS API Documentation

Request Syntax

response = instance.password_data(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceId': 'string',
    'PasswordData': 'string',
    'Timestamp': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --
    • InstanceId (string) --

      The ID of the Windows instance.

    • PasswordData (string) --

      The password of the instance. Returns an empty string if the password is not available.

    • Timestamp (datetime) --

      The time the data was last updated.

reboot(**kwargs)

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Troubleshoot an unreachable instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.reboot(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
reload()

Calls EC2.Client.describe_instances() to update the attributes of the Instance resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

instance.reload()
Returns
None
report_status(**kwargs)

Submits feedback about the status of an instance. The instance must be in the running state. If your experience with the instance differs from the instance status returned by DescribeInstanceStatus , use ReportInstanceStatus to report your experience with the instance. Amazon EC2 collects this information to improve the accuracy of status checks.

Use of this action does not change the value returned by DescribeInstanceStatus .

See also: AWS API Documentation

Request Syntax

response = instance.report_status(
    Description='string',
    DryRun=True|False,
    EndTime=datetime(2015, 1, 1),
    ReasonCodes=[
        'instance-stuck-in-state'|'unresponsive'|'not-accepting-credentials'|'password-not-available'|'performance-network'|'performance-instance-store'|'performance-ebs-volume'|'performance-other'|'other',
    ],
    StartTime=datetime(2015, 1, 1),
    Status='ok'|'impaired'
)
Parameters
  • Description (string) -- Descriptive text about the health state of your instance.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EndTime (datetime) -- The time at which the reported instance health state ended.
  • ReasonCodes (list) --

    [REQUIRED]

    The reason codes that describe the health state of your instance.

    • instance-stuck-in-state : My instance is stuck in a state.
    • unresponsive : My instance is unresponsive.
    • not-accepting-credentials : My instance is not accepting my credentials.
    • password-not-available : A password is not available for my instance.
    • performance-network : My instance is experiencing performance problems that I believe are network related.
    • performance-instance-store : My instance is experiencing performance problems that I believe are related to the instance stores.
    • performance-ebs-volume : My instance is experiencing performance problems that I believe are related to an EBS volume.
    • performance-other : My instance is experiencing performance problems.
    • other : [explain using the description parameter]
    • (string) --
  • StartTime (datetime) -- The time at which the reported instance health state began.
  • Status (string) --

    [REQUIRED]

    The status of all instances listed.

Returns

None

reset_attribute(**kwargs)

Resets an attribute of an instance to its default value. To reset the kernel or ramdisk , the instance must be in a stopped state. To reset the sourceDestCheck , the instance can be either running or stopped.

The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true , which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon VPC User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.reset_attribute(
    Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop',
    DryRun=True|False,

)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute to reset.

    Warning

    You can only reset the following attributes: kernel | ramdisk | sourceDestCheck .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

reset_kernel(**kwargs)

Resets an attribute of an instance to its default value. To reset the kernel or ramdisk , the instance must be in a stopped state. To reset the sourceDestCheck , the instance can be either running or stopped.

The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true , which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon VPC User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.reset_kernel(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
reset_ramdisk(**kwargs)

Resets an attribute of an instance to its default value. To reset the kernel or ramdisk , the instance must be in a stopped state. To reset the sourceDestCheck , the instance can be either running or stopped.

The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true , which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon VPC User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.reset_ramdisk(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
reset_source_dest_check(**kwargs)

Resets an attribute of an instance to its default value. To reset the kernel or ramdisk , the instance must be in a stopped state. To reset the sourceDestCheck , the instance can be either running or stopped.

The sourceDestCheck attribute controls whether source/destination checking is enabled. The default value is true , which means checking is enabled. This value must be false for a NAT instance to perform NAT. For more information, see NAT Instances in the Amazon VPC User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.reset_source_dest_check(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
start(**kwargs)

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

If you attempt to start a T3 instance with host tenancy and the unlimted CPU credit option, the request fails. The unlimited CPU credit option is not supported on Dedicated Hosts. Before you start the instance, either change its CPU credit option to standard , or change its tenancy to default or dedicated .

For more information, see Stop and start your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.start(
    AdditionalInfo='string',
    DryRun=True|False
)
Parameters
  • AdditionalInfo (string) -- Reserved.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'StartingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StartingInstances (list) --

      Information about the started instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

stop(**kwargs)

Stops an Amazon EBS-backed instance. For more information, see Stop and start your instance in the Amazon EC2 User Guide .

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon EC2 User Guide .

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide .

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshoot stopping your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.stop(
    Hibernate=True|False,
    DryRun=True|False,
    Force=True|False
)
Parameters
  • Hibernate (boolean) --

    Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'StoppingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StoppingInstances (list) --

      Information about the stopped instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

terminate(**kwargs)

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

If you terminate multiple instances across multiple Availability Zones, and one or more of the specified instances are enabled for termination protection, the request fails with the following results:

  • The specified instances that are in the same Availability Zone as the protected instance are not terminated.
  • The specified instances that are in different Availability Zones, where no other specified instances are protected, are successfully terminated.

For example, say you have the following instances:

  • Instance A: us-east-1a ; Not protected
  • Instance B: us-east-1a ; Not protected
  • Instance C: us-east-1b ; Protected
  • Instance D: us-east-1b ; not protected

If you attempt to terminate all of these instances in the same request, the request reports failure with the following results:

  • Instance A and Instance B are successfully terminated because none of the specified instances in us-east-1a are enabled for termination protection.
  • Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.terminate(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'TerminatingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • TerminatingInstances (list) --

      Information about the terminated instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

unmonitor(**kwargs)

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = instance.unmonitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

Collections

Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.

volumes

A collection of Volume resources.A Volume Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Volume resources in the collection.

See also: AWS API Documentation

Request Syntax

volume_iterator = instance.volumes.all()
Return type
list(ec2.Volume)
Returns
A list of Volume resources
filter(**kwargs)

Creates an iterable of all Volume resources in the collection filtered by kwargs passed to method. A Volume collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

volume_iterator = instance.volumes.filter(
    VolumeIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • VolumeIds (list) --

    The volume IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumes in paginated output. When this parameter is used, DescribeVolumes only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeVolumes request with the returned NextToken value. This value can be between 5 and 500; if MaxResults is given a value larger than 500, only 500 results are returned. If this parameter is not used, then DescribeVolumes returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeVolumes request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
Return type

list(ec2.Volume)

Returns

A list of Volume resources

limit(**kwargs)

Creates an iterable up to a specified amount of Volume resources in the collection.

See also: AWS API Documentation

Request Syntax

volume_iterator = instance.volumes.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Volume)
Returns
A list of Volume resources
page_size(**kwargs)

Creates an iterable of all Volume resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

volume_iterator = instance.volumes.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Volume)
Returns
A list of Volume resources
vpc_addresses

A collection of VpcAddress resources.A VpcAddress Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all VpcAddress resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = instance.vpc_addresses.all()
Return type
list(ec2.VpcAddress)
Returns
A list of VpcAddress resources
filter(**kwargs)

Creates an iterable of all VpcAddress resources in the collection filtered by kwargs passed to method. A VpcAddress collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = instance.vpc_addresses.filter(
    PublicIps=[
        'string',
    ],
    AllocationIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • PublicIps (list) --

    One or more Elastic IP addresses.

    Default: Describes all your Elastic IP addresses.

    • (string) --
  • AllocationIds (list) --

    [EC2-VPC] Information about the allocation IDs.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

list(ec2.VpcAddress)

Returns

A list of VpcAddress resources

limit(**kwargs)

Creates an iterable up to a specified amount of VpcAddress resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = instance.vpc_addresses.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.VpcAddress)
Returns
A list of VpcAddress resources
page_size(**kwargs)

Creates an iterable of all VpcAddress resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

vpc_address_iterator = instance.vpc_addresses.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.VpcAddress)
Returns
A list of VpcAddress resources

Waiters

Waiters provide an interface to wait for a resource to reach a specific state. For more information about waiters refer to the Resources Introduction Guide.

wait_until_exists(**kwargs)

Waits until this Instance is exists. This method calls EC2.Waiter.instance_exists.wait() which polls. EC2.Client.describe_instances() every 5 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

instance.wait_until_exists(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Returns

None

wait_until_running(**kwargs)

Waits until this Instance is running. This method calls EC2.Waiter.instance_running.wait() which polls. EC2.Client.describe_instances() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

instance.wait_until_running(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Returns

None

wait_until_stopped(**kwargs)

Waits until this Instance is stopped. This method calls EC2.Waiter.instance_stopped.wait() which polls. EC2.Client.describe_instances() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

instance.wait_until_stopped(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Returns

None

wait_until_terminated(**kwargs)

Waits until this Instance is terminated. This method calls EC2.Waiter.instance_terminated.wait() which polls. EC2.Client.describe_instances() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

instance.wait_until_terminated(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    The filters.

    • affinity - The affinity setting for an instance running on a Dedicated Host (default | host ).
    • architecture - The instance architecture (i386 | x86_64 | arm64 ).
    • 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 specified in the block device mapping (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.
    • capacity-reservation-id - The ID of the Capacity Reservation into which the instance was launched.
    • 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.
    • hibernation-options.configured - A Boolean that indicates whether the instance is enabled for hibernation. A value of true means that the instance is enabled for hibernation.
    • 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 ). The value xen is used for both Xen and Nitro hypervisors.
    • 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 used for internal purposes 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 IPv4 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, in the ISO 8601 format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, 2021-09-29T11:04:43.305Z . You can use a wildcard (* ), for example, 2021-09-29T* , which matches an entire day.
    • metadata-options.http-tokens - The metadata request authorization state (optional | required )
    • metadata-options.http-put-response-hop-limit - The http metadata request put response hop limit (integer, possible values 1 to 64 )
    • metadata-options.http-endpoint - Enable or disable metadata access on http endpoint (enabled | disabled )
    • monitoring-state - Indicates whether detailed monitoring is enabled (disabled | enabled ).
    • network-interface.addresses.private-ip-address - The private IPv4 address associated with the network interface.
    • network-interface.addresses.primary - Specifies whether the IPv4 address of the network interface is the primary private IPv4 address.
    • network-interface.addresses.association.public-ip - The ID of the association of an Elastic IP address (IPv4) with a network interface.
    • network-interface.addresses.association.ip-owner-id - The owner ID of the private IPv4 address associated with the network interface.
    • network-interface.association.public-ip - The address of the Elastic IP address (IPv4) bound to the network interface.
    • network-interface.association.ip-owner-id - The owner of the Elastic IP address (IPv4) associated with the network interface.
    • network-interface.association.allocation-id - The allocation ID returned when you allocated the Elastic IP address (IPv4) for your network interface.
    • network-interface.association.association-id - The association ID returned when the network interface was associated with an IPv4 address.
    • 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.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.availability-zone - The Availability Zone for the network interface.
    • network-interface.description - The description of the network interface.
    • 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.ipv6-addresses.ipv6-address - The IPv6 address associated with the network interface.
    • network-interface.mac-address - The MAC address of 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.private-dns-name - The private DNS name of 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 Amazon Web Services.
    • network-interface.status - The status of the network interface (available ) | in-use ).
    • network-interface.source-dest-check - Whether the network interface performs source/destination checking. A value of true means that checking is enabled, and false means that checking is disabled. The value must be false for the network interface to perform network address translation (NAT) in your VPC.
    • 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.
    • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.
    • owner-id - The Amazon Web Services account ID of the instance owner.
    • placement-group-name - The name of the placement group for the instance.
    • placement-partition-number - The partition in which the instance is located.
    • platform - The platform. To list only Windows instances, use windows .
    • private-dns-name - The private IPv4 DNS name of the instance.
    • private-ip-address - The private IPv4 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, Amazon Web Services 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 get one reservation ID. If you launch ten instances using the same launch request, you also get one reservation ID.
    • root-device-name - The device name of the root device volume (for example, /dev/sda1 ).
    • root-device-type - The type of the root device volume (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 that 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> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources that have a tag with a specific key, regardless of the tag value.
    • 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.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Returns

None

InternetGateway

class EC2.InternetGateway(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) InternetGateway:

import boto3

ec2 = boto3.resource('ec2')
internet_gateway = ec2.InternetGateway('id')
Parameters
id (string) -- The InternetGateway's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The InternetGateway's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

attachments
  • (list) --

    Any VPCs attached to the internet gateway.

    • (dict) --

      Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

      • State (string) --

        The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

      • VpcId (string) --

        The ID of the VPC.

internet_gateway_id
  • (string) --

    The ID of the internet gateway.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the internet gateway.

tags
  • (list) --

    Any tags assigned to the internet gateway.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

attach_to_vpc(**kwargs)

Attaches an internet gateway or a virtual private gateway to a VPC, enabling connectivity between the internet and the VPC. For more information about your VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = internet_gateway.attach_to_vpc(
    DryRun=True|False,
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Returns

None

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = internet_gateway.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified internet gateway. You must detach the internet gateway from the VPC before you can delete it.

See also: AWS API Documentation

Request Syntax

response = internet_gateway.delete(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
detach_from_vpc(**kwargs)

Detaches an internet gateway from a VPC, disabling connectivity between the internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

See also: AWS API Documentation

Request Syntax

response = internet_gateway.detach_from_vpc(
    DryRun=True|False,
    VpcId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcId (string) --

    [REQUIRED]

    The ID of the VPC.

Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_internet_gateways() to update the attributes of the InternetGateway resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

internet_gateway.load()
Returns
None
reload()

Calls EC2.Client.describe_internet_gateways() to update the attributes of the InternetGateway resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

internet_gateway.reload()
Returns
None

KeyPair

class EC2.KeyPair(name)

A resource representing an Amazon Elastic Compute Cloud (EC2) KeyPair:

import boto3

ec2 = boto3.resource('ec2')
key_pair = ec2.KeyPair('name')
Parameters
name (string) -- The KeyPair's name identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

name

(string) The KeyPair's name identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

key_fingerprint
  • (string) --
    • For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
    • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8.
key_material
  • (string) --

    An unencrypted PEM encoded RSA or ED25519 private key.

key_name
  • (string) --

    The name of the key pair.

key_pair_id
  • (string) --

    The ID of the key pair.

tags
  • (list) --

    Any tags applied to the key pair.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

delete(**kwargs)

Deletes the specified key pair, by removing the public key from Amazon EC2.

See also: AWS API Documentation

Request Syntax

response = key_pair.delete(
    KeyPairId='string',
    DryRun=True|False
)
Parameters
  • KeyPairId (string) -- The ID of the key pair.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str

KeyPairInfo

class EC2.KeyPairInfo(name)

A resource representing an Amazon Elastic Compute Cloud (EC2) KeyPairInfo:

import boto3

ec2 = boto3.resource('ec2')
key_pair_info = ec2.KeyPairInfo('name')
Parameters
name (string) -- The KeyPairInfo's name identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

name

(string) The KeyPairInfo's name identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

create_time
  • (datetime) --

    If you used Amazon EC2 to create the key pair, this is the date and time when the key was created, in ISO 8601 date-time format , in the UTC time zone.

    If you imported an existing key pair to Amazon EC2, this is the date and time the key was imported, in ISO 8601 date-time format , in the UTC time zone.

key_fingerprint
  • (string) --

    If you used CreateKeyPair to create the key pair:

    • For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER encoded private key.
    • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8 .

    If you used ImportKeyPair to provide Amazon Web Services the public key:

    • For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as specified in section 4 of RFC4716.
    • For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 digest, which is the default for OpenSSH, starting with OpenSSH 6.8 .
key_name
  • (string) --

    The name of the key pair.

key_pair_id
  • (string) --

    The ID of the key pair.

key_type
  • (string) --

    The type of key pair.

public_key
  • (string) --

    The public key material.

tags
  • (list) --

    Any tags applied to the key pair.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

delete(**kwargs)

Deletes the specified key pair, by removing the public key from Amazon EC2.

See also: AWS API Documentation

Request Syntax

response = key_pair_info.delete(
    KeyPairId='string',
    DryRun=True|False
)
Parameters
  • KeyPairId (string) -- The ID of the key pair.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_key_pairs() to update the attributes of the KeyPairInfo resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

key_pair_info.load()
Returns
None
reload()

Calls EC2.Client.describe_key_pairs() to update the attributes of the KeyPairInfo resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

key_pair_info.reload()
Returns
None

NetworkAcl

class EC2.NetworkAcl(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) NetworkAcl:

import boto3

ec2 = boto3.resource('ec2')
network_acl = ec2.NetworkAcl('id')
Parameters
id (string) -- The NetworkAcl's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The NetworkAcl's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

associations
  • (list) --

    Any associations between the network ACL and one or more subnets

    • (dict) --

      Describes an association between a network ACL and a subnet.

      • NetworkAclAssociationId (string) --

        The ID of the association between a network ACL and a subnet.

      • NetworkAclId (string) --

        The ID of the network ACL.

      • SubnetId (string) --

        The ID of the subnet.

entries
  • (list) --

    One or more entries (rules) in the network ACL.

    • (dict) --

      Describes an entry in a network ACL.

      • CidrBlock (string) --

        The IPv4 network range to allow or deny, in CIDR notation.

      • Egress (boolean) --

        Indicates whether the rule is an egress rule (applied to traffic leaving the subnet).

      • IcmpTypeCode (dict) --

        ICMP protocol: The ICMP type and code.

        • Code (integer) --

          The ICMP code. A value of -1 means all codes for the specified ICMP type.

        • Type (integer) --

          The ICMP type. A value of -1 means all types.

      • Ipv6CidrBlock (string) --

        The IPv6 network range to allow or deny, in CIDR notation.

      • PortRange (dict) --

        TCP or UDP protocols: The range of ports the rule applies to.

        • From (integer) --

          The first port in the range.

        • To (integer) --

          The last port in the range.

      • Protocol (string) --

        The protocol number. A value of "-1" means all protocols.

      • RuleAction (string) --

        Indicates whether to allow or deny the traffic that matches the rule.

      • RuleNumber (integer) --

        The rule number for the entry. ACL entries are processed in ascending order by rule number.

is_default
  • (boolean) --

    Indicates whether this is the default network ACL for the VPC.

network_acl_id
  • (string) --

    The ID of the network ACL.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the network ACL.

tags
  • (list) --

    Any tags assigned to the network ACL.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

vpc_id
  • (string) --

    The ID of the VPC for the network ACL.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

vpc

(Vpc) The related vpc if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

create_entry(**kwargs)

Creates an entry (a rule) in a network ACL with the specified rule number. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, we process the entries in the ACL according to the rule numbers, in ascending order. Each network ACL has a set of ingress rules and a separate set of egress rules.

We recommend that you leave room between the rule numbers (for example, 100, 110, 120, ...), and not number them one right after the other (for example, 101, 102, 103, ...). This makes it easier to add a rule between existing ones without having to renumber the rules.

After you add an entry, you can't modify it; you must either replace it, or create an entry and delete the old one.

For more information about network ACLs, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = network_acl.create_entry(
    CidrBlock='string',
    DryRun=True|False,
    Egress=True|False,
    IcmpTypeCode={
        'Code': 123,
        'Type': 123
    },
    Ipv6CidrBlock='string',
    PortRange={
        'From': 123,
        'To': 123
    },
    Protocol='string',
    RuleAction='allow'|'deny',
    RuleNumber=123
)
Parameters
  • CidrBlock (string) -- The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ). We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Egress (boolean) --

    [REQUIRED]

    Indicates whether this is an egress rule (rule is applied to traffic leaving the subnet).

  • IcmpTypeCode (dict) --

    ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

    • Code (integer) --

      The ICMP code. A value of -1 means all codes for the specified ICMP type.

    • Type (integer) --

      The ICMP type. A value of -1 means all types.

  • Ipv6CidrBlock (string) -- The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64 ).
  • PortRange (dict) --

    TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

    • From (integer) --

      The first port in the range.

    • To (integer) --

      The last port in the range.

  • Protocol (string) --

    [REQUIRED]

    The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

  • RuleAction (string) --

    [REQUIRED]

    Indicates whether to allow or deny the traffic that matches the rule.

  • RuleNumber (integer) --

    [REQUIRED]

    The rule number for the entry (for example, 100). ACL entries are processed in ascending order by rule number.

    Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is reserved for internal use.

Returns

None

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = network_acl.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified network ACL. You can't delete the ACL if it's associated with any subnets. You can't delete the default network ACL.

See also: AWS API Documentation

Request Syntax

response = network_acl.delete(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
delete_entry(**kwargs)

Deletes the specified ingress or egress entry (rule) from the specified network ACL.

See also: AWS API Documentation

Request Syntax

response = network_acl.delete_entry(
    DryRun=True|False,
    Egress=True|False,
    RuleNumber=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Egress (boolean) --

    [REQUIRED]

    Indicates whether the rule is an egress rule.

  • RuleNumber (integer) --

    [REQUIRED]

    The rule number of the entry to delete.

Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_network_acls() to update the attributes of the NetworkAcl resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

network_acl.load()
Returns
None
reload()

Calls EC2.Client.describe_network_acls() to update the attributes of the NetworkAcl resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

network_acl.reload()
Returns
None
replace_association(**kwargs)

Changes which network ACL a subnet is associated with. By default when you create a subnet, it's automatically associated with the default network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

This is an idempotent operation.

See also: AWS API Documentation

Request Syntax

response = network_acl.replace_association(
    AssociationId='string',
    DryRun=True|False,

)
Parameters
  • AssociationId (string) --

    [REQUIRED]

    The ID of the current association between the original network ACL and the subnet.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NewAssociationId': 'string'
}

Response Structure

  • (dict) --

    • NewAssociationId (string) --

      The ID of the new association.

replace_entry(**kwargs)

Replaces an entry (rule) in a network ACL. For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = network_acl.replace_entry(
    CidrBlock='string',
    DryRun=True|False,
    Egress=True|False,
    IcmpTypeCode={
        'Code': 123,
        'Type': 123
    },
    Ipv6CidrBlock='string',
    PortRange={
        'From': 123,
        'To': 123
    },
    Protocol='string',
    RuleAction='allow'|'deny',
    RuleNumber=123
)
Parameters
  • CidrBlock (string) -- The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ).
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Egress (boolean) --

    [REQUIRED]

    Indicates whether to replace the egress rule.

    Default: If no value is specified, we replace the ingress rule.

  • IcmpTypeCode (dict) --

    ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block.

    • Code (integer) --

      The ICMP code. A value of -1 means all codes for the specified ICMP type.

    • Type (integer) --

      The ICMP type. A value of -1 means all types.

  • Ipv6CidrBlock (string) -- The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64 ).
  • PortRange (dict) --

    TCP or UDP protocols: The range of ports the rule applies to. Required if specifying protocol 6 (TCP) or 17 (UDP).

    • From (integer) --

      The first port in the range.

    • To (integer) --

      The last port in the range.

  • Protocol (string) --

    [REQUIRED]

    The protocol number. A value of "-1" means all protocols. If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

  • RuleAction (string) --

    [REQUIRED]

    Indicates whether to allow or deny the traffic that matches the rule.

  • RuleNumber (integer) --

    [REQUIRED]

    The rule number of the entry to replace.

Returns

None

NetworkInterface

class EC2.NetworkInterface(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) NetworkInterface:

import boto3

ec2 = boto3.resource('ec2')
network_interface = ec2.NetworkInterface('id')
Parameters
id (string) -- The NetworkInterface's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The NetworkInterface's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

association_attribute
  • (dict) --

    The association information for an Elastic IP address (IPv4) associated with the network interface.

    • AllocationId (string) --

      The allocation ID.

    • AssociationId (string) --

      The association ID.

    • IpOwnerId (string) --

      The ID of the Elastic IP address owner.

    • PublicDnsName (string) --

      The public DNS name.

    • PublicIp (string) --

      The address of the Elastic IP address bound to the network interface.

    • CustomerOwnedIp (string) --

      The customer-owned IP address associated with the network interface.

    • CarrierIp (string) --

      The carrier IP address associated with the network interface.

      This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

attachment
  • (dict) --

    The network interface attachment.

    • AttachTime (datetime) --

      The timestamp indicating when the attachment initiated.

    • AttachmentId (string) --

      The ID of the network interface attachment.

    • DeleteOnTermination (boolean) --

      Indicates whether the network interface is deleted when the instance is terminated.

    • DeviceIndex (integer) --

      The device index of the network interface attachment on the instance.

    • NetworkCardIndex (integer) --

      The index of the network card.

    • InstanceId (string) --

      The ID of the instance.

    • InstanceOwnerId (string) --

      The Amazon Web Services account ID of the owner of the instance.

    • Status (string) --

      The attachment state.

availability_zone
  • (string) --

    The Availability Zone.

deny_all_igw_traffic
  • (boolean) --

    Indicates whether a network interface with an IPv6 address is unreachable from the public internet. If the value is true , inbound traffic from the internet is dropped and you cannot assign an elastic IP address to the network interface. The network interface is reachable from peered VPCs and resources connected through a transit gateway, including on-premises networks.

description
  • (string) --

    A description.

groups
  • (list) --

    Any security groups for the network interface.

    • (dict) --

      Describes a security group.

      • GroupName (string) --

        The name of the security group.

      • GroupId (string) --

        The ID of the security group.

interface_type
  • (string) --

    The type of network interface.

ipv4_prefixes
  • (list) --

    The IPv4 prefixes that are assigned to the network interface.

ipv6_address
  • (string) --

    The IPv6 globally unique address associated with the network interface.

ipv6_addresses
  • (list) --

    The IPv6 addresses associated with the network interface.

    • (dict) --

      Describes an IPv6 address associated with a network interface.

      • Ipv6Address (string) --

        The IPv6 address.

ipv6_native
  • (boolean) --

    Indicates whether this is an IPv6 only network interface.

ipv6_prefixes
  • (list) --

    The IPv6 prefixes that are assigned to the network interface.

    • (dict) --

      Describes the IPv6 prefix.

      • Ipv6Prefix (string) --

        The IPv6 prefix.

mac_address
  • (string) --

    The MAC address.

network_interface_id
  • (string) --

    The ID of the network interface.

outpost_arn
  • (string) --

    The Amazon Resource Name (ARN) of the Outpost.

owner_id
  • (string) --

    The Amazon Web Services account ID of the owner of the network interface.

private_dns_name
  • (string) --

    The private DNS name.

private_ip_address
  • (string) --

    The IPv4 address of the network interface within the subnet.

private_ip_addresses
  • (list) --

    The private IPv4 addresses associated with the network interface.

    • (dict) --

      Describes the private IPv4 address of a network interface.

      • Association (dict) --

        The association information for an Elastic IP address (IPv4) associated with the network interface.

        • AllocationId (string) --

          The allocation ID.

        • AssociationId (string) --

          The association ID.

        • IpOwnerId (string) --

          The ID of the Elastic IP address owner.

        • PublicDnsName (string) --

          The public DNS name.

        • PublicIp (string) --

          The address of the Elastic IP address bound to the network interface.

        • CustomerOwnedIp (string) --

          The customer-owned IP address associated with the network interface.

        • CarrierIp (string) --

          The carrier IP address associated with the network interface.

          This option is only available when the network interface is in a subnet which is associated with a Wavelength Zone.

      • Primary (boolean) --

        Indicates whether this IPv4 address is the primary private IPv4 address of the network interface.

      • PrivateDnsName (string) --

        The private DNS name.

      • PrivateIpAddress (string) --

        The private IPv4 address.

requester_id
  • (string) --

    The alias or Amazon Web Services account ID of the principal or service that created the network interface.

requester_managed
  • (boolean) --

    Indicates whether the network interface is being managed by Amazon Web Services.

source_dest_check
  • (boolean) --

    Indicates whether source/destination checking is enabled.

status
  • (string) --

    The status of the network interface.

subnet_id
  • (string) --

    The ID of the subnet.

tag_set
  • (list) --

    Any tags assigned to the network interface.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

vpc_id
  • (string) --

    The ID of the VPC.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

association

(NetworkInterfaceAssociation) The related association if set, otherwise None.

subnet

(Subnet) The related subnet if set, otherwise None.

vpc

(Vpc) The related vpc if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

assign_private_ip_addresses(**kwargs)

Assigns one or more secondary private IP addresses to the specified network interface.

You can specify one or more specific secondary IP addresses, or you can specify the number of secondary IP addresses to be automatically assigned within the subnet's CIDR block range. The number of secondary IP addresses that you can assign to an instance varies by instance type. For information about instance types, see Instance Types in the Amazon Elastic Compute Cloud User Guide . For more information about Elastic IP addresses, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

When you move a secondary private IP address to another network interface, any Elastic IP address that is associated with the IP address is also moved.

Remapping an IP address is an asynchronous operation. When you move an IP address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s in the instance metadata to confirm that the remapping is complete.

You must specify either the IP addresses or the IP address count in the request.

You can optionally use Prefix Delegation on the network interface. You must specify either the IPv4 Prefix Delegation prefixes, or the IPv4 Prefix Delegation count. For information, see Assigning prefixes to Amazon EC2 network interfaces in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = network_interface.assign_private_ip_addresses(
    AllowReassignment=True|False,
    PrivateIpAddresses=[
        'string',
    ],
    SecondaryPrivateIpAddressCount=123,
    Ipv4Prefixes=[
        'string',
    ],
    Ipv4PrefixCount=123
)
Parameters
  • AllowReassignment (boolean) -- Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
  • PrivateIpAddresses (list) --

    One or more IP addresses to be assigned as a secondary private IP address to the network interface. You can't specify this parameter when also specifying a number of secondary IP addresses.

    If you don't specify an IP address, Amazon EC2 automatically selects an IP address within the subnet range.

    • (string) --
  • SecondaryPrivateIpAddressCount (integer) -- The number of secondary IP addresses to assign to the network interface. You can't specify this parameter when also specifying private IP addresses.
  • Ipv4Prefixes (list) --

    One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

    • (string) --
  • Ipv4PrefixCount (integer) -- The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv4 Prefixes option.
Return type

dict

Returns

Response Syntax

{
    'NetworkInterfaceId': 'string',
    'AssignedPrivateIpAddresses': [
        {
            'PrivateIpAddress': 'string'
        },
    ],
    'AssignedIpv4Prefixes': [
        {
            'Ipv4Prefix': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NetworkInterfaceId (string) --

      The ID of the network interface.

    • AssignedPrivateIpAddresses (list) --

      The private IP addresses assigned to the network interface.

      • (dict) --

        Describes the private IP addresses assigned to a network interface.

        • PrivateIpAddress (string) --

          The private IP address assigned to the network interface.

    • AssignedIpv4Prefixes (list) --

      The IPv4 prefixes that are assigned to the network interface.

attach(**kwargs)

Attaches a network interface to an instance.

See also: AWS API Documentation

Request Syntax

response = network_interface.attach(
    DeviceIndex=123,
    DryRun=True|False,
    InstanceId='string',
    NetworkCardIndex=123
)
Parameters
  • DeviceIndex (integer) --

    [REQUIRED]

    The index of the device for the network interface attachment.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • NetworkCardIndex (integer) -- The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.
Return type

dict

Returns

Response Syntax

{
    'AttachmentId': 'string',
    'NetworkCardIndex': 123
}

Response Structure

  • (dict) --

    Contains the output of AttachNetworkInterface.

    • AttachmentId (string) --

      The ID of the network interface attachment.

    • NetworkCardIndex (integer) --

      The index of the network card.

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = network_interface.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified network interface. You must detach the network interface before you can delete it.

See also: AWS API Documentation

Request Syntax

response = network_interface.delete(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
describe_attribute(**kwargs)

Describes a network interface attribute. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = network_interface.describe_attribute(
    Attribute='description'|'groupSet'|'sourceDestCheck'|'attachment',
    DryRun=True|False,

)
Parameters
  • Attribute (string) -- The attribute of the network interface. This parameter is required.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'Attachment': {
        'AttachTime': datetime(2015, 1, 1),
        'AttachmentId': 'string',
        'DeleteOnTermination': True|False,
        'DeviceIndex': 123,
        'NetworkCardIndex': 123,
        'InstanceId': 'string',
        'InstanceOwnerId': 'string',
        'Status': 'attaching'|'attached'|'detaching'|'detached'
    },
    'Description': {
        'Value': 'string'
    },
    'Groups': [
        {
            'GroupName': 'string',
            'GroupId': 'string'
        },
    ],
    'NetworkInterfaceId': 'string',
    'SourceDestCheck': {
        'Value': True|False
    }
}

Response Structure

  • (dict) --

    Contains the output of DescribeNetworkInterfaceAttribute.

    • Attachment (dict) --

      The attachment (if any) of the network interface.

      • AttachTime (datetime) --

        The timestamp indicating when the attachment initiated.

      • AttachmentId (string) --

        The ID of the network interface attachment.

      • DeleteOnTermination (boolean) --

        Indicates whether the network interface is deleted when the instance is terminated.

      • DeviceIndex (integer) --

        The device index of the network interface attachment on the instance.

      • NetworkCardIndex (integer) --

        The index of the network card.

      • InstanceId (string) --

        The ID of the instance.

      • InstanceOwnerId (string) --

        The Amazon Web Services account ID of the owner of the instance.

      • Status (string) --

        The attachment state.

    • Description (dict) --

      The description of the network interface.

      • Value (string) --

        The attribute value. The value is case-sensitive.

    • Groups (list) --

      The security groups associated with the network interface.

      • (dict) --

        Describes a security group.

        • GroupName (string) --

          The name of the security group.

        • GroupId (string) --

          The ID of the security group.

    • NetworkInterfaceId (string) --

      The ID of the network interface.

    • SourceDestCheck (dict) --

      Indicates whether source/destination checking is enabled.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

detach(**kwargs)

Detaches a network interface from an instance.

See also: AWS API Documentation

Request Syntax

response = network_interface.detach(
    DryRun=True|False,
    Force=True|False
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Specifies whether to force a detachment.

    Note

    • Use the Force parameter only as a last resort to detach a network interface from a failed instance.
    • If you use the Force parameter to detach a network interface, you might not be able to attach a different network interface to the same index on the instance without first stopping and starting the instance.
    • If you force the detachment of a network interface, the instance metadata might not get updated. This means that the attributes associated with the detached network interface might still be visible. The instance metadata will get updated when you stop and start the instance.
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_network_interfaces() to update the attributes of the NetworkInterface resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

network_interface.load()
Returns
None
modify_attribute(**kwargs)

Modifies the specified network interface attribute. You can specify only one attribute at a time. You can use this action to attach and detach security groups from an existing EC2 instance.

See also: AWS API Documentation

Request Syntax

response = network_interface.modify_attribute(
    Attachment={
        'AttachmentId': 'string',
        'DeleteOnTermination': True|False
    },
    Description={
        'Value': 'string'
    },
    DryRun=True|False,
    Groups=[
        'string',
    ],
    SourceDestCheck={
        'Value': True|False
    }
)
Parameters
  • Attachment (dict) --

    Information about the interface attachment. If modifying the 'delete on termination' attribute, you must specify the ID of the interface attachment.

    • AttachmentId (string) --

      The ID of the network interface attachment.

    • DeleteOnTermination (boolean) --

      Indicates whether the network interface is deleted when the instance is terminated.

  • Description (dict) --

    A description for the network interface.

    • Value (string) --

      The attribute value. The value is case-sensitive.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    Changes the security groups for the network interface. The new set of groups you specify replaces the current set. You must specify at least one group, even if it's just the default security group in the VPC. You must specify the ID of the security group, not the name.

    • (string) --
  • SourceDestCheck (dict) --

    Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

Returns

None

reload()

Calls EC2.Client.describe_network_interfaces() to update the attributes of the NetworkInterface resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

network_interface.reload()
Returns
None
reset_attribute(**kwargs)

Resets a network interface attribute. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = network_interface.reset_attribute(
    DryRun=True|False,
    SourceDestCheck='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SourceDestCheck (string) -- The source/destination checking attribute. Resets the value to true .
Returns

None

unassign_private_ip_addresses(**kwargs)

Unassigns one or more secondary private IP addresses, or IPv4 Prefix Delegation prefixes from a network interface.

See also: AWS API Documentation

Request Syntax

response = network_interface.unassign_private_ip_addresses(
    PrivateIpAddresses=[
        'string',
    ],
    Ipv4Prefixes=[
        'string',
    ]
)
Parameters
  • PrivateIpAddresses (list) --

    The secondary private IP addresses to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.

    • (string) --
  • Ipv4Prefixes (list) --

    The IPv4 prefixes to unassign from the network interface.

    • (string) --
Returns

None

NetworkInterfaceAssociation

class EC2.NetworkInterfaceAssociation(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) NetworkInterfaceAssociation:

import boto3

ec2 = boto3.resource('ec2')
network_interface_association = ec2.NetworkInterfaceAssociation('id')
Parameters
id (string) -- The NetworkInterfaceAssociation's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The NetworkInterfaceAssociation's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

carrier_ip
  • (string) --

    The carrier IP address associated with the network interface.

customer_owned_ip
  • (string) --

    The customer-owned IP address associated with the network interface.

ip_owner_id
  • (string) --

    The ID of the owner of the Elastic IP address.

public_dns_name
  • (string) --

    The public DNS name.

public_ip
  • (string) --

    The public IP address or Elastic IP address bound to the network interface.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

address

(VpcAddress) The related address if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

delete(**kwargs)

Disassociates an Elastic IP address from the instance or network interface it's associated with.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.

See also: AWS API Documentation

Request Syntax

response = network_interface_association.delete(
    PublicIp='string',
    DryRun=True|False
)
Parameters
  • PublicIp (string) -- [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_network_interfaces() to update the attributes of the NetworkInterfaceAssociation resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

network_interface_association.load()
Returns
None
reload()

Calls EC2.Client.describe_network_interfaces() to update the attributes of the NetworkInterfaceAssociation resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

network_interface_association.reload()
Returns
None

PlacementGroup

class EC2.PlacementGroup(name)

A resource representing an Amazon Elastic Compute Cloud (EC2) PlacementGroup:

import boto3

ec2 = boto3.resource('ec2')
placement_group = ec2.PlacementGroup('name')
Parameters
name (string) -- The PlacementGroup's name identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

These are the resource's available collections:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

name

(string) The PlacementGroup's name identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

group_arn
  • (string) --

    The Amazon Resource Name (ARN) of the placement group.

group_id
  • (string) --

    The ID of the placement group.

group_name
  • (string) --

    The name of the placement group.

partition_count
  • (integer) --

    The number of partitions. Valid only if strategy is set to partition .

spread_level
  • (string) --

    The spread level for the placement group. Only Outpost placement groups can be spread across hosts.

state
  • (string) --

    The state of the placement group.

strategy
  • (string) --

    The placement strategy.

tags
  • (list) --

    Any tags applied to the placement 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 256 Unicode characters.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

delete(**kwargs)

Deletes the specified placement group. You must terminate all instances in the placement group before you can delete the placement group. For more information, see Placement groups in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = placement_group.delete(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_placement_groups() to update the attributes of the PlacementGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

placement_group.load()
Returns
None
reload()

Calls EC2.Client.describe_placement_groups() to update the attributes of the PlacementGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

placement_group.reload()
Returns
None

Collections

Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.

instances

A collection of Instance resources.A Instance Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = placement_group.instances.all()
Return type
list(ec2.Instance)
Returns
A list of Instance resources
create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = placement_group.instances.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Returns

None

filter(**kwargs)

Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method. A Instance collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

instance_iterator = placement_group.instances.filter(
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Return type

list(ec2.Instance)

Returns

A list of Instance resources

limit(**kwargs)

Creates an iterable up to a specified amount of Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = placement_group.instances.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Instance)
Returns
A list of Instance resources
monitor(**kwargs)

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitor your instances using CloudWatch in the Amazon EC2 User Guide .

To disable detailed monitoring, see UnmonitorInstances .

See also: AWS API Documentation

Request Syntax

response = placement_group.instances.monitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

page_size(**kwargs)

Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

instance_iterator = placement_group.instances.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Instance)
Returns
A list of Instance resources
reboot(**kwargs)

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Troubleshoot an unreachable instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = placement_group.instances.reboot(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
start(**kwargs)

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

If you attempt to start a T3 instance with host tenancy and the unlimted CPU credit option, the request fails. The unlimited CPU credit option is not supported on Dedicated Hosts. Before you start the instance, either change its CPU credit option to standard , or change its tenancy to default or dedicated .

For more information, see Stop and start your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = placement_group.instances.start(
    AdditionalInfo='string',
    DryRun=True|False
)
Parameters
  • AdditionalInfo (string) -- Reserved.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'StartingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StartingInstances (list) --

      Information about the started instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

stop(**kwargs)

Stops an Amazon EBS-backed instance. For more information, see Stop and start your instance in the Amazon EC2 User Guide .

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon EC2 User Guide .

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide .

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshoot stopping your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = placement_group.instances.stop(
    Hibernate=True|False,
    DryRun=True|False,
    Force=True|False
)
Parameters
  • Hibernate (boolean) --

    Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'StoppingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StoppingInstances (list) --

      Information about the stopped instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

terminate(**kwargs)

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

If you terminate multiple instances across multiple Availability Zones, and one or more of the specified instances are enabled for termination protection, the request fails with the following results:

  • The specified instances that are in the same Availability Zone as the protected instance are not terminated.
  • The specified instances that are in different Availability Zones, where no other specified instances are protected, are successfully terminated.

For example, say you have the following instances:

  • Instance A: us-east-1a ; Not protected
  • Instance B: us-east-1a ; Not protected
  • Instance C: us-east-1b ; Protected
  • Instance D: us-east-1b ; not protected

If you attempt to terminate all of these instances in the same request, the request reports failure with the following results:

  • Instance A and Instance B are successfully terminated because none of the specified instances in us-east-1a are enabled for termination protection.
  • Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = placement_group.instances.terminate(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'TerminatingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • TerminatingInstances (list) --

      Information about the terminated instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

unmonitor(**kwargs)

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = placement_group.instances.unmonitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

Route

class EC2.Route(route_table_id, destination_cidr_block)

A resource representing an Amazon Elastic Compute Cloud (EC2) Route:

import boto3

ec2 = boto3.resource('ec2')
route = ec2.Route('route_table_id','destination_cidr_block')
Parameters
  • route_table_id (string) -- The Route's route_table_id identifier. This must be set.
  • destination_cidr_block (string) -- The Route's destination_cidr_block identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

These are the resource's available sub-resources:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

route_table_id

(string) The Route's route_table_id identifier. This must be set.

destination_cidr_block

(string) The Route's destination_cidr_block identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

carrier_gateway_id
  • (string) --

    The ID of the carrier gateway.

core_network_arn
  • (string) --

    The Amazon Resource Name (ARN) of the core network.

destination_ipv6_cidr_block
  • (string) --

    The IPv6 CIDR block used for the destination match.

destination_prefix_list_id
  • (string) --

    The prefix of the Amazon Web Service.

egress_only_internet_gateway_id
  • (string) --

    The ID of the egress-only internet gateway.

gateway_id
  • (string) --

    The ID of a gateway attached to your VPC.

instance_id
  • (string) --

    The ID of a NAT instance in your VPC.

instance_owner_id
  • (string) --

    The ID of Amazon Web Services account that owns the instance.

local_gateway_id
  • (string) --

    The ID of the local gateway.

nat_gateway_id
  • (string) --

    The ID of a NAT gateway.

network_interface_id
  • (string) --

    The ID of the network interface.

origin
  • (string) --

    Describes how the route was created.

    • CreateRouteTable - The route was automatically created when the route table was created.
    • CreateRoute - The route was manually added to the route table.
    • EnableVgwRoutePropagation - The route was propagated by route propagation.
state
  • (string) --

    The state of the route. The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

transit_gateway_id
  • (string) --

    The ID of a transit gateway.

vpc_peering_connection_id
  • (string) --

    The ID of a VPC peering connection.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

delete(**kwargs)

Deletes the specified route from the specified route table.

See also: AWS API Documentation

Request Syntax

response = route.delete(
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,

)
Parameters
  • DestinationIpv6CidrBlock (string) -- The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.
  • DestinationPrefixListId (string) -- The ID of the prefix list for the route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
replace(**kwargs)

Replaces an existing route within a route table in a VPC.

You must specify either a destination CIDR block or a prefix list ID. You must also specify exactly one of the resources from the parameter list, or reset the local route to its default target.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = route.replace(
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    VpcEndpointId='string',
    EgressOnlyInternetGatewayId='string',
    GatewayId='string',
    InstanceId='string',
    LocalTarget=True|False,
    NatGatewayId='string',
    TransitGatewayId='string',
    LocalGatewayId='string',
    CarrierGatewayId='string',
    NetworkInterfaceId='string',
    VpcPeeringConnectionId='string',
    CoreNetworkArn='string'
)
Parameters
  • DestinationIpv6CidrBlock (string) -- The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.
  • DestinationPrefixListId (string) -- The ID of the prefix list for the route.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointId (string) -- The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
  • EgressOnlyInternetGatewayId (string) -- [IPv6 traffic only] The ID of an egress-only internet gateway.
  • GatewayId (string) -- The ID of an internet gateway or virtual private gateway.
  • InstanceId (string) -- The ID of a NAT instance in your VPC.
  • LocalTarget (boolean) -- Specifies whether to reset the local route to its default target (local ).
  • NatGatewayId (string) -- [IPv4 traffic only] The ID of a NAT gateway.
  • TransitGatewayId (string) -- The ID of a transit gateway.
  • LocalGatewayId (string) -- The ID of the local gateway.
  • CarrierGatewayId (string) -- [IPv4 traffic only] The ID of a carrier gateway.
  • NetworkInterfaceId (string) -- The ID of a network interface.
  • VpcPeeringConnectionId (string) -- The ID of a VPC peering connection.
  • CoreNetworkArn (string) -- The Amazon Resource Name (ARN) of the core network.
Returns

None

Sub-resources

Sub-resources are methods that create a new instance of a child resource. This resource's identifiers get passed along to the child. For more information about sub-resources refer to the Resources Introduction Guide.

RouteTable()

Creates a RouteTable resource.:

route_table = route.RouteTable()
Return type
EC2.RouteTable
Returns
A RouteTable resource

RouteTable

class EC2.RouteTable(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) RouteTable:

import boto3

ec2 = boto3.resource('ec2')
route_table = ec2.RouteTable('id')
Parameters
id (string) -- The RouteTable's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The RouteTable's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

associations_attribute
  • (list) --

    The associations between the route table and one or more subnets or a gateway.

    • (dict) --

      Describes an association between a route table and a subnet or gateway.

      • Main (boolean) --

        Indicates whether this is the main route table.

      • RouteTableAssociationId (string) --

        The ID of the association.

      • RouteTableId (string) --

        The ID of the route table.

      • SubnetId (string) --

        The ID of the subnet. A subnet ID is not returned for an implicit association.

      • GatewayId (string) --

        The ID of the internet gateway or virtual private gateway.

      • AssociationState (dict) --

        The state of the association.

        • State (string) --

          The state of the association.

        • StatusMessage (string) --

          The status message, if applicable.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the route table.

propagating_vgws
  • (list) --

    Any virtual private gateway (VGW) propagating routes.

    • (dict) --

      Describes a virtual private gateway propagating route.

      • GatewayId (string) --

        The ID of the virtual private gateway.

route_table_id
  • (string) --

    The ID of the route table.

routes_attribute
  • (list) --

    The routes in the route table.

    • (dict) --

      Describes a route in a route table.

      • DestinationCidrBlock (string) --

        The IPv4 CIDR block used for the destination match.

      • DestinationIpv6CidrBlock (string) --

        The IPv6 CIDR block used for the destination match.

      • DestinationPrefixListId (string) --

        The prefix of the Amazon Web Service.

      • EgressOnlyInternetGatewayId (string) --

        The ID of the egress-only internet gateway.

      • GatewayId (string) --

        The ID of a gateway attached to your VPC.

      • InstanceId (string) --

        The ID of a NAT instance in your VPC.

      • InstanceOwnerId (string) --

        The ID of Amazon Web Services account that owns the instance.

      • NatGatewayId (string) --

        The ID of a NAT gateway.

      • TransitGatewayId (string) --

        The ID of a transit gateway.

      • LocalGatewayId (string) --

        The ID of the local gateway.

      • CarrierGatewayId (string) --

        The ID of the carrier gateway.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

      • Origin (string) --

        Describes how the route was created.

        • CreateRouteTable - The route was automatically created when the route table was created.
        • CreateRoute - The route was manually added to the route table.
        • EnableVgwRoutePropagation - The route was propagated by route propagation.
      • State (string) --

        The state of the route. The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, or the specified NAT instance has been terminated).

      • VpcPeeringConnectionId (string) --

        The ID of a VPC peering connection.

      • CoreNetworkArn (string) --

        The Amazon Resource Name (ARN) of the core network.

tags
  • (list) --

    Any tags assigned to the route table.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

vpc_id
  • (string) --

    The ID of the VPC.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

associations

(RouteTableAssociation) The related associations if set, otherwise None.

routes

(Route) The related routes if set, otherwise None.

vpc

(Vpc) The related vpc if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

associate_with_subnet(**kwargs)

Associates a subnet in your VPC or an internet gateway or virtual private gateway attached to your VPC with a route table in your VPC. This association causes traffic from the subnet or gateway to be routed according to the routes in the route table. The action returns an association ID, which you need in order to disassociate the route table later. A route table can be associated with multiple subnets.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

route_table_association = route_table.associate_with_subnet(
    DryRun=True|False,
    SubnetId='string',
    GatewayId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SubnetId (string) -- The ID of the subnet.
  • GatewayId (string) -- The ID of the internet gateway or virtual private gateway.
Return type

ec2.RouteTableAssociation

Returns

RouteTableAssociation resource

create_route(**kwargs)

Creates a route in a route table within a VPC.

You must specify either a destination CIDR block or a prefix list ID. You must also specify exactly one of the resources from the parameter list.

When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address 192.0.2.3 , and the route table includes the following two IPv4 routes:

  • 192.0.2.0/24 (goes to some target A)
  • 192.0.2.0/28 (goes to some target B)

Both routes apply to the traffic destined for 192.0.2.3 . However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.

For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

route = route_table.create_route(
    DestinationCidrBlock='string',
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    VpcEndpointId='string',
    EgressOnlyInternetGatewayId='string',
    GatewayId='string',
    InstanceId='string',
    NatGatewayId='string',
    TransitGatewayId='string',
    LocalGatewayId='string',
    CarrierGatewayId='string',
    NetworkInterfaceId='string',
    VpcPeeringConnectionId='string',
    CoreNetworkArn='string'
)
Parameters
  • DestinationCidrBlock (string) -- The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .
  • DestinationIpv6CidrBlock (string) -- The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.
  • DestinationPrefixListId (string) -- The ID of a prefix list used for the destination match.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcEndpointId (string) -- The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only.
  • EgressOnlyInternetGatewayId (string) -- [IPv6 traffic only] The ID of an egress-only internet gateway.
  • GatewayId (string) -- The ID of an internet gateway or virtual private gateway attached to your VPC.
  • InstanceId (string) -- The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.
  • NatGatewayId (string) -- [IPv4 traffic only] The ID of a NAT gateway.
  • TransitGatewayId (string) -- The ID of a transit gateway.
  • LocalGatewayId (string) -- The ID of the local gateway.
  • CarrierGatewayId (string) --

    The ID of the carrier gateway.

    You can only use this option when the VPC contains a subnet which is associated with a Wavelength Zone.

  • NetworkInterfaceId (string) -- The ID of a network interface.
  • VpcPeeringConnectionId (string) -- The ID of a VPC peering connection.
  • CoreNetworkArn (string) -- The Amazon Resource Name (ARN) of the core network.
Return type

ec2.Route

Returns

Route resource

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = route_table.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified route table. You must disassociate the route table from any subnets before you can delete it. You can't delete the main route table.

See also: AWS API Documentation

Request Syntax

response = route_table.delete(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_route_tables() to update the attributes of the RouteTable resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

route_table.load()
Returns
None
reload()

Calls EC2.Client.describe_route_tables() to update the attributes of the RouteTable resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

route_table.reload()
Returns
None

RouteTableAssociation

class EC2.RouteTableAssociation(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) RouteTableAssociation:

import boto3

ec2 = boto3.resource('ec2')
route_table_association = ec2.RouteTableAssociation('id')
Parameters
id (string) -- The RouteTableAssociation's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The RouteTableAssociation's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

association_state
  • (dict) --

    The state of the association.

    • State (string) --

      The state of the association.

    • StatusMessage (string) --

      The status message, if applicable.

gateway_id
  • (string) --

    The ID of the internet gateway or virtual private gateway.

main
  • (boolean) --

    Indicates whether this is the main route table.

route_table_association_id
  • (string) --

    The ID of the association.

route_table_id
  • (string) --

    The ID of the route table.

subnet_id
  • (string) --

    The ID of the subnet. A subnet ID is not returned for an implicit association.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

route_table

(RouteTable) The related route_table if set, otherwise None.

subnet

(Subnet) The related subnet if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

delete(**kwargs)

Disassociates a subnet or gateway from a route table.

After you perform this action, the subnet no longer uses the routes in the route table. Instead, it uses the routes in the VPC's main route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = route_table_association.delete(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
replace_subnet(**kwargs)

Changes the route table associated with a given subnet, internet gateway, or virtual private gateway in a VPC. After the operation completes, the subnet or gateway uses the routes in the new route table. For more information about route tables, see Route tables in the Amazon Virtual Private Cloud User Guide .

You can also use this operation to change which table is the main route table in the VPC. Specify the main route table's association ID and the route table ID of the new main route table.

See also: AWS API Documentation

Request Syntax

route_table_association = route_table_association.replace_subnet(
    DryRun=True|False,
    RouteTableId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableId (string) --

    [REQUIRED]

    The ID of the new route table to associate with the subnet.

Return type

ec2.RouteTableAssociation

Returns

RouteTableAssociation resource

SecurityGroup

class EC2.SecurityGroup(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) SecurityGroup:

import boto3

ec2 = boto3.resource('ec2')
security_group = ec2.SecurityGroup('id')
Parameters
id (string) -- The SecurityGroup's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The SecurityGroup's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

description
  • (string) --

    A description of the security group.

group_id
  • (string) --

    The ID of the security group.

group_name
  • (string) --

    The name of the security group.

ip_permissions
  • (list) --

    The inbound rules associated with the security group.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

ip_permissions_egress
  • (list) --

    [VPC only] The outbound rules associated with the security group.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

owner_id
  • (string) --

    The Amazon Web Services account ID of the owner of 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 256 Unicode characters.

vpc_id
  • (string) --

    [VPC only] The ID of the VPC for the security group.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

authorize_egress(**kwargs)

[VPC only] Adds the specified outbound (egress) rules to a security group for use with a VPC.

An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 CIDR address ranges, or to the instances that are associated with the specified source security groups. When specifying an outbound rule for your security group in a VPC, the IpPermissions must include a destination for the traffic.

You specify a protocol for each rule (for example, TCP). 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.

For information about VPC security group quotas, see Amazon VPC quotas .

See also: AWS API Documentation

Request Syntax

response = security_group.authorize_egress(
    DryRun=True|False,
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    CidrIp='string',
    FromPort=123,
    IpProtocol='string',
    ToPort=123,
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IpPermissions (list) --

    The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • TagSpecifications (list) --

    The tags applied to the security group rule.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • CidrIp (string) -- Not supported. Use a set of IP permissions to specify the CIDR.
  • FromPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • IpProtocol (string) -- Not supported. Use a set of IP permissions to specify the protocol name or number.
  • ToPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • SourceSecurityGroupName (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
  • SourceSecurityGroupOwnerId (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'SecurityGroupRules': [
        {
            'SecurityGroupRuleId': 'string',
            'GroupId': 'string',
            'GroupOwnerId': 'string',
            'IsEgress': True|False,
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'CidrIpv4': 'string',
            'CidrIpv6': 'string',
            'PrefixListId': 'string',
            'ReferencedGroupInfo': {
                'GroupId': 'string',
                'PeeringStatus': 'string',
                'UserId': 'string',
                'VpcId': 'string',
                'VpcPeeringConnectionId': 'string'
            },
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • SecurityGroupRules (list) --

      Information about the outbound (egress) security group rules that were added.

      • (dict) --

        Describes a security group rule.

        • SecurityGroupRuleId (string) --

          The ID of the security group rule.

        • GroupId (string) --

          The ID of the security group.

        • GroupOwnerId (string) --

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress (boolean) --

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          Use -1 to specify all protocols.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 (string) --

          The IPv4 CIDR range.

        • CidrIpv6 (string) --

          The IPv6 CIDR range.

        • PrefixListId (string) --

          The ID of the prefix list.

        • ReferencedGroupInfo (dict) --

          Describes the security group that is referenced in the rule.

          • GroupId (string) --

            The ID of the security group.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The Amazon Web Services account ID.

          • VpcId (string) --

            The ID of the VPC.

          • VpcPeeringConnectionId (string) --

            The ID of the VPC peering connection.

        • Description (string) --

          The security group rule description.

        • Tags (list) --

          The tags applied to the security group rule.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

authorize_ingress(**kwargs)

Adds the specified inbound (ingress) rules to a security group.

An inbound rule permits instances to receive traffic from the specified IPv4 or IPv6 CIDR address range, or from the instances that are associated with the specified destination security groups. When specifying an inbound rule for your security group in a VPC, the IpPermissions must include a source for the traffic.

You specify a protocol for each rule (for example, TCP). For TCP and UDP, you must also specify the destination port or port range. For ICMP/ICMPv6, you must also specify the ICMP/ICMPv6 type and code. You can use -1 to mean all types or all codes.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

For more information about VPC security group quotas, see Amazon VPC quotas .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = security_group.authorize_ingress(
    CidrIp='string',
    FromPort=123,
    GroupName='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    IpProtocol='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    ToPort=123,
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • CidrIp (string) --

    The IPv4 address range, in CIDR format. You can't specify this parameter when specifying a source security group. To specify an IPv6 address range, use a set of IP permissions.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • FromPort (integer) --

    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 types. If you specify all ICMP types, you must specify all codes.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • GroupName (string) -- [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.
  • IpPermissions (list) --

    The sets of IP permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • IpProtocol (string) --

    The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ). To specify icmpv6 , use a set of IP permissions.

    [VPC only] Use -1 to specify all protocols. If you specify -1 or a protocol other than tcp , udp , or icmp , traffic on all ports is allowed, regardless of any ports you specify.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • SourceSecurityGroupName (string) -- [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. 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. For EC2-VPC, the source security group must be in the same VPC.
  • SourceSecurityGroupOwnerId (string) -- [nondefault VPC] The Amazon Web Services account ID for the source security group, if the source security group is in a different account. 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.
  • ToPort (integer) --

    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 codes. If you specify all ICMP types, you must specify all codes.

    Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    [VPC Only] The tags applied to the security group rule.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'SecurityGroupRules': [
        {
            'SecurityGroupRuleId': 'string',
            'GroupId': 'string',
            'GroupOwnerId': 'string',
            'IsEgress': True|False,
            'IpProtocol': 'string',
            'FromPort': 123,
            'ToPort': 123,
            'CidrIpv4': 'string',
            'CidrIpv6': 'string',
            'PrefixListId': 'string',
            'ReferencedGroupInfo': {
                'GroupId': 'string',
                'PeeringStatus': 'string',
                'UserId': 'string',
                'VpcId': 'string',
                'VpcPeeringConnectionId': 'string'
            },
            'Description': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • SecurityGroupRules (list) --

      Information about the inbound (ingress) security group rules that were added.

      • (dict) --

        Describes a security group rule.

        • SecurityGroupRuleId (string) --

          The ID of the security group rule.

        • GroupId (string) --

          The ID of the security group.

        • GroupOwnerId (string) --

          The ID of the Amazon Web Services account that owns the security group.

        • IsEgress (boolean) --

          Indicates whether the security group rule is an outbound rule.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          Use -1 to specify all protocols.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • CidrIpv4 (string) --

          The IPv4 CIDR range.

        • CidrIpv6 (string) --

          The IPv6 CIDR range.

        • PrefixListId (string) --

          The ID of the prefix list.

        • ReferencedGroupInfo (dict) --

          Describes the security group that is referenced in the rule.

          • GroupId (string) --

            The ID of the security group.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The Amazon Web Services account ID.

          • VpcId (string) --

            The ID of the VPC.

          • VpcPeeringConnectionId (string) --

            The ID of the VPC peering connection.

        • Description (string) --

          The security group rule description.

        • Tags (list) --

          The tags applied to the security group rule.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

              Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

            • Value (string) --

              The value of the tag.

              Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = security_group.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes a security group.

If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = security_group.delete(
    GroupName='string',
    DryRun=True|False
)
Parameters
  • GroupName (string) -- [EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_security_groups() to update the attributes of the SecurityGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

security_group.load()
Returns
None
reload()

Calls EC2.Client.describe_security_groups() to update the attributes of the SecurityGroup resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

security_group.reload()
Returns
None
revoke_egress(**kwargs)

[VPC only] Removes the specified outbound (egress) rules from a security group for EC2-VPC. This action does not apply to security groups for use in EC2-Classic.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and destination (CIDR range, security group, or prefix list). 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. If the security group rule has a description, you do not need to specify the description to revoke the rule.

[Default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

See also: AWS API Documentation

Request Syntax

response = security_group.revoke_egress(
    DryRun=True|False,
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    SecurityGroupRuleIds=[
        'string',
    ],
    CidrIp='string',
    FromPort=123,
    IpProtocol='string',
    ToPort=123,
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string'
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • IpPermissions (list) --

    The sets of IP permissions. You can't specify a destination security group and a CIDR IP address range in the same set of permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • SecurityGroupRuleIds (list) --

    The IDs of the security group rules.

    • (string) --
  • CidrIp (string) -- Not supported. Use a set of IP permissions to specify the CIDR.
  • FromPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • IpProtocol (string) -- Not supported. Use a set of IP permissions to specify the protocol name or number.
  • ToPort (integer) -- Not supported. Use a set of IP permissions to specify the port.
  • SourceSecurityGroupName (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
  • SourceSecurityGroupOwnerId (string) -- Not supported. Use a set of IP permissions to specify a destination security group.
Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'UnknownIpPermissions': [
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • UnknownIpPermissions (list) --

      The outbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.

      • (dict) --

        Describes a set of permissions for a security group rule.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

        • IpRanges (list) --

          The IPv4 ranges.

          • (dict) --

            Describes an IPv4 range.

            • CidrIp (string) --

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • Ipv6Ranges (list) --

          [VPC only] The IPv6 ranges.

          • (dict) --

            [EC2-VPC only] Describes an IPv6 range.

            • CidrIpv6 (string) --

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • PrefixListIds (list) --

          [VPC only] The prefix list IDs.

          • (dict) --

            Describes a prefix list ID.

            • Description (string) --

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId (string) --

              The ID of the prefix.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • UserIdGroupPairs (list) --

          The security group and Amazon Web Services account ID pairs.

          • (dict) --

            Describes a security group and Amazon Web Services account ID pair.

            Note

            We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

            • Description (string) --

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId (string) --

              The ID of the security group.

            • 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 the security group ID.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus (string) --

              The status of a VPC peering connection, if applicable.

            • UserId (string) --

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

revoke_ingress(**kwargs)

Removes the specified inbound (ingress) rules from a security group.

You can specify rules using either rule IDs or security group rule properties. If you use rule properties, the values that you specify (for example, ports) must match the existing rule's values exactly. Each rule has a protocol, from and to ports, and source (CIDR range, security group, or prefix list). 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. If the security group rule has a description, you do not need to specify the description to revoke the rule.

[EC2-Classic, default VPC] If the values you specify do not match the existing rule's values, no error is returned, and the output describes the security group rules that were not revoked.

Amazon Web Services recommends that you describe the security group to verify that the rules were removed.

Rule changes are propagated to instances within the security group as quickly as possible. However, a small delay might occur.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = security_group.revoke_ingress(
    CidrIp='string',
    FromPort=123,
    GroupName='string',
    IpPermissions=[
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ],
    IpProtocol='string',
    SourceSecurityGroupName='string',
    SourceSecurityGroupOwnerId='string',
    ToPort=123,
    DryRun=True|False,
    SecurityGroupRuleIds=[
        'string',
    ]
)
Parameters
  • CidrIp (string) -- The CIDR IP address range. You can't specify this parameter when specifying a source security group.
  • FromPort (integer) -- 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.
  • GroupName (string) -- [EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.
  • IpPermissions (list) --

    The sets of IP permissions. You can't specify a source security group and a CIDR IP address range in the same set of permissions.

    • (dict) --

      Describes a set of permissions for a security group rule.

      • FromPort (integer) --

        The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • IpProtocol (string) --

        The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

        [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

      • IpRanges (list) --

        The IPv4 ranges.

        • (dict) --

          Describes an IPv4 range.

          • CidrIp (string) --

            The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv4 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • Ipv6Ranges (list) --

        [VPC only] The IPv6 ranges.

        • (dict) --

          [EC2-VPC only] Describes an IPv6 range.

          • CidrIpv6 (string) --

            The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

          • Description (string) --

            A description for the security group rule that references this IPv6 address range.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

      • PrefixListIds (list) --

        [VPC only] The prefix list IDs.

        • (dict) --

          Describes a prefix list ID.

          • Description (string) --

            A description for the security group rule that references this prefix list ID.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • PrefixListId (string) --

            The ID of the prefix.

      • ToPort (integer) --

        The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

      • UserIdGroupPairs (list) --

        The security group and Amazon Web Services account ID pairs.

        • (dict) --

          Describes a security group and Amazon Web Services account ID pair.

          Note

          We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

          • Description (string) --

            A description for the security group rule that references this user ID group pair.

            Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

          • GroupId (string) --

            The ID of the security group.

          • 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 the security group ID.

            For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

          • PeeringStatus (string) --

            The status of a VPC peering connection, if applicable.

          • UserId (string) --

            The ID of an Amazon Web Services account.

            For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

            [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

          • 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.

  • IpProtocol (string) -- The IP protocol name (tcp , udp , icmp ) or number (see Protocol Numbers ). Use -1 to specify all.
  • SourceSecurityGroupName (string) -- [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. To revoke a specific rule for an IP protocol and port range, use a set of IP permissions instead.
  • SourceSecurityGroupOwnerId (string) -- [EC2-Classic] The Amazon Web Services account ID of the source security group, if the source security group is in a different account. 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.
  • ToPort (integer) -- 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.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • SecurityGroupRuleIds (list) --

    The IDs of the security group rules.

    • (string) --
Return type

dict

Returns

Response Syntax

{
    'Return': True|False,
    'UnknownIpPermissions': [
        {
            'FromPort': 123,
            'IpProtocol': 'string',
            'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                },
            ],
            'Ipv6Ranges': [
                {
                    'CidrIpv6': 'string',
                    'Description': 'string'
                },
            ],
            'PrefixListIds': [
                {
                    'Description': 'string',
                    'PrefixListId': 'string'
                },
            ],
            'ToPort': 123,
            'UserIdGroupPairs': [
                {
                    'Description': 'string',
                    'GroupId': 'string',
                    'GroupName': 'string',
                    'PeeringStatus': 'string',
                    'UserId': 'string',
                    'VpcId': 'string',
                    'VpcPeeringConnectionId': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, returns an error.

    • UnknownIpPermissions (list) --

      The inbound rules that were unknown to the service. In some cases, unknownIpPermissionSet might be in a different format from the request parameter.

      • (dict) --

        Describes a set of permissions for a security group rule.

        • FromPort (integer) --

          The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • IpProtocol (string) --

          The IP protocol name (tcp , udp , icmp , icmpv6 ) or number (see Protocol Numbers ).

          [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp , udp , and icmp , you must specify a port range. For icmpv6 , the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

        • IpRanges (list) --

          The IPv4 ranges.

          • (dict) --

            Describes an IPv4 range.

            • CidrIp (string) --

              The IPv4 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv4 address, use the /32 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv4 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • Ipv6Ranges (list) --

          [VPC only] The IPv6 ranges.

          • (dict) --

            [EC2-VPC only] Describes an IPv6 range.

            • CidrIpv6 (string) --

              The IPv6 CIDR range. You can either specify a CIDR range or a source security group, not both. To specify a single IPv6 address, use the /128 prefix length.

            • Description (string) --

              A description for the security group rule that references this IPv6 address range.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

        • PrefixListIds (list) --

          [VPC only] The prefix list IDs.

          • (dict) --

            Describes a prefix list ID.

            • Description (string) --

              A description for the security group rule that references this prefix list ID.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • PrefixListId (string) --

              The ID of the prefix.

        • ToPort (integer) --

          The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all codes.

        • UserIdGroupPairs (list) --

          The security group and Amazon Web Services account ID pairs.

          • (dict) --

            Describes a security group and Amazon Web Services account ID pair.

            Note

            We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

            • Description (string) --

              A description for the security group rule that references this user ID group pair.

              Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$*

            • GroupId (string) --

              The ID of the security group.

            • 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 the security group ID.

              For a referenced security group in another VPC, this value is not returned if the referenced security group is deleted.

            • PeeringStatus (string) --

              The status of a VPC peering connection, if applicable.

            • UserId (string) --

              The ID of an Amazon Web Services account.

              For a referenced security group in another VPC, the account ID of the referenced security group is returned in the response. If the referenced security group is deleted, this value is not returned.

              [EC2-Classic] Required when adding or removing rules that reference a security group in another Amazon Web Services account.

            • 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.

Snapshot

class EC2.Snapshot(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) Snapshot:

import boto3

ec2 = boto3.resource('ec2')
snapshot = ec2.Snapshot('id')
Parameters
id (string) -- The Snapshot's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

These are the resource's available waiters:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The Snapshot's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

data_encryption_key_id
  • (string) --

    The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by DescribeSnapshots .

description
  • (string) --

    The description for the snapshot.

encrypted
  • (boolean) --

    Indicates whether the snapshot is encrypted.

kms_key_id
  • (string) --

    The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the parent volume.

outpost_arn
owner_alias
  • (string) --

    The Amazon Web Services owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the EBS snapshot.

progress
  • (string) --

    The progress of the snapshot, as a percentage.

restore_expiry_time
  • (datetime) --

    Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.

snapshot_id
  • (string) --

    The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

start_time
  • (datetime) --

    The time stamp when the snapshot was initiated.

state
  • (string) --

    The snapshot state.

state_message
  • (string) --

    Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper Key Management Service (KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by DescribeSnapshots .

storage_tier
  • (string) --

    The storage tier in which the snapshot is stored. standard indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use. archive indicates that the snapshot is currently archived and that it must be restored before it can be used.

tags
  • (list) --

    Any tags assigned to the snapshot.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

volume_id
  • (string) --

    The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

volume_size
  • (integer) --

    The size of the volume, in GiB.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

volume

(Volume) The related volume if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

copy(**kwargs)

Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy a snapshot within the same Region, from one Region to another, or from a Region to an Outpost. You can't copy a snapshot from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs).

When copying snapshots to a Region, copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted snapshots remain unencrypted, unless you enable encryption for the snapshot copy operation. By default, encrypted snapshot copies use the default Key Management Service (KMS) KMS key; however, you can specify a different KMS key. To copy an encrypted snapshot that has been shared from another account, you must have permissions for the KMS key used to encrypt the snapshot.

Snapshots copied to an Outpost are encrypted by default using the default encryption key for the Region, or a different key that you specify in the request using KmsKeyId . Outposts do not support unencrypted snapshots. For more information, Amazon EBS local snapshots on Outposts in the Amazon Elastic Compute Cloud User Guide .

Snapshots created by copying another snapshot have an arbitrary volume ID that should not be used for any purpose.

For more information, see Copy an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = snapshot.copy(
    Description='string',
    DestinationOutpostArn='string',
    Encrypted=True|False,
    KmsKeyId='string',
    SourceRegion='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) -- A description for the EBS snapshot.
  • DestinationOutpostArn (string) --

    The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. Only specify this parameter when copying a snapshot from an Amazon Web Services Region to an Outpost. The snapshot must be in the Region for the destination Outpost. You cannot copy a snapshot from an Outpost to a Region, from one Outpost to another, or within the same Outpost.

    For more information, see Copy snapshots from an Amazon Web Services Region to an Outpost in the Amazon Elastic Compute Cloud User Guide .

  • DestinationRegion (string) --

    The destination Region to use in the PresignedUrl parameter of a snapshot copy operation. This parameter is only valid for specifying the destination Region in a PresignedUrl parameter, where it is required.

    The snapshot copy is sent to the regional endpoint that you sent the HTTP request to (for example, ec2.us-east-1.amazonaws.com ). With the CLI, this is specified using the --region parameter or the default Region in your Amazon Web Services configuration file.

    Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
  • Encrypted (boolean) -- To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter. Otherwise, omit this parameter. Encrypted snapshots are encrypted, even if you omit this parameter and encryption by default is not enabled. You cannot set this parameter to false. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .
  • KmsKeyId (string) --

    The identifier of the Key Management Service (KMS) KMS key to use for Amazon EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS is used. If KmsKeyId is specified, the encrypted state must be true .

    You can specify the KMS key using any of the following:

    • Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
    • Key alias. For example, alias/ExampleAlias.
    • Key ARN. For example, arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab.
    • Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias.

    Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you specify an ID, alias, or ARN that is not valid, the action can appear to complete, but eventually fails.

  • PresignedUrl (string) --

    When you copy an encrypted source snapshot using the Amazon EC2 Query API, you must supply a pre-signed URL. This parameter is optional for unencrypted snapshots. For more information, see Query requests .

    The PresignedUrl should use the snapshot source endpoint, the CopySnapshot action, and include the SourceRegion , SourceSnapshotId , and DestinationRegion parameters. The PresignedUrl must be signed using Amazon Web Services Signature Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm for this parameter uses the same logic that is described in Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) in the Amazon Simple Storage Service API Reference . An invalid or improperly signed PresignedUrl will cause the copy operation to fail asynchronously, and the snapshot will move to an error state.

    Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required
  • SourceRegion (string) --

    [REQUIRED]

    The ID of the Region that contains the snapshot to be copied.

  • TagSpecifications (list) --

    The tags to apply to the new snapshot.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'SnapshotId': 'string',
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • SnapshotId (string) --

      The ID of the new snapshot.

    • Tags (list) --

      Any tags applied to the new snapshot.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

          Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

        • Value (string) --

          The value of the tag.

          Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = snapshot.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified snapshot.

When you make periodic snapshots of a volume, the snapshots are incremental, and only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. When you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will have access to all the information needed to restore the volume.

You cannot delete a snapshot of the root device of an EBS volume used by a registered AMI. You must first de-register the AMI before you can delete the snapshot.

For more information, see Delete an Amazon EBS snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = snapshot.delete(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
describe_attribute(**kwargs)

Describes the specified attribute of the specified snapshot. You can specify only one attribute at a time.

For more information about EBS snapshots, see Amazon EBS snapshots in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = snapshot.describe_attribute(
    Attribute='productCodes'|'createVolumePermission',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The snapshot attribute you would like to view.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'CreateVolumePermissions': [
        {
            'Group': 'all',
            'UserId': 'string'
        },
    ],
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'SnapshotId': 'string'
}

Response Structure

  • (dict) --

    • CreateVolumePermissions (list) --

      The users and groups that have the permissions for creating volumes from the snapshot.

      • (dict) --

        Describes the user or group to be added or removed from the list of create volume permissions for a volume.

        • Group (string) --

          The group to be added or removed. The possible value is all .

        • UserId (string) --

          The ID of the Amazon Web Services account to be added or removed.

    • ProductCodes (list) --

      The product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • SnapshotId (string) --

      The ID of the EBS snapshot.

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_snapshots() to update the attributes of the Snapshot resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

snapshot.load()
Returns
None
modify_attribute(**kwargs)

Adds or removes permission settings for the specified snapshot. You may add or remove specified Amazon Web Services account IDs from a snapshot's list of create volume permissions, but you cannot do both in a single operation. If you need to both add and remove account IDs for a snapshot, you must use multiple operations. You can make up to 500 modifications to a snapshot in a single operation.

Encrypted snapshots and snapshots with Amazon Web Services Marketplace product codes cannot be made public. Snapshots encrypted with your default KMS key cannot be shared with other accounts.

For more information about modifying snapshot permissions, see Share a snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = snapshot.modify_attribute(
    Attribute='productCodes'|'createVolumePermission',
    CreateVolumePermission={
        'Add': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ],
        'Remove': [
            {
                'Group': 'all',
                'UserId': 'string'
            },
        ]
    },
    GroupNames=[
        'string',
    ],
    OperationType='add'|'remove',
    UserIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Attribute (string) -- The snapshot attribute to modify. Only volume creation permissions can be modified.
  • CreateVolumePermission (dict) --

    A JSON representation of the snapshot attribute modification.

    • Add (list) --

      Adds the specified Amazon Web Services account ID or group to the list.

      • (dict) --

        Describes the user or group to be added or removed from the list of create volume permissions for a volume.

        • Group (string) --

          The group to be added or removed. The possible value is all .

        • UserId (string) --

          The ID of the Amazon Web Services account to be added or removed.

    • Remove (list) --

      Removes the specified Amazon Web Services account ID or group from the list.

      • (dict) --

        Describes the user or group to be added or removed from the list of create volume permissions for a volume.

        • Group (string) --

          The group to be added or removed. The possible value is all .

        • UserId (string) --

          The ID of the Amazon Web Services account to be added or removed.

  • GroupNames (list) --

    The group to modify for the snapshot.

    • (string) --
  • OperationType (string) -- The type of operation to perform to the attribute.
  • UserIds (list) --

    The account ID to modify for the snapshot.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

reload()

Calls EC2.Client.describe_snapshots() to update the attributes of the Snapshot resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

snapshot.reload()
Returns
None
reset_attribute(**kwargs)

Resets permission settings for the specified snapshot.

For more information about modifying snapshot permissions, see Share a snapshot in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = snapshot.reset_attribute(
    Attribute='productCodes'|'createVolumePermission',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute to reset. Currently, only the attribute for permission to create volumes can be reset.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Waiters

Waiters provide an interface to wait for a resource to reach a specific state. For more information about waiters refer to the Resources Introduction Guide.

wait_until_completed(**kwargs)

Waits until this Snapshot is completed. This method calls EC2.Waiter.snapshot_completed.wait() which polls. EC2.Client.describe_snapshots() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

snapshot.wait_until_completed(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    OwnerIds=[
        'string',
    ],
    RestorableByUserIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • description - A description of the snapshot.
    • encrypted - Indicates whether the snapshot is encrypted (true | false )
    • owner-alias - The owner alias, from an Amazon-maintained list (amazon ). This is not the user-configured Amazon Web Services account alias set using the IAM console. We recommend that you use the related parameter instead of this filter.
    • owner-id - The Amazon Web Services account ID of the owner. We recommend that you use the related parameter instead of this filter.
    • progress - The progress of the snapshot, as a percentage (for example, 80%).
    • snapshot-id - The snapshot ID.
    • start-time - The time stamp when the snapshot was initiated.
    • status - The status of the snapshot (pending | completed | error ).
    • storage-tier - The storage tier of the snapshot (archive | standard ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • volume-id - The ID of the volume the snapshot is for.
    • volume-size - The size of the volume, in GiB.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • OwnerIds (list) --

    Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , and amazon .

    • (string) --
  • RestorableByUserIds (list) --

    The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Subnet

class EC2.Subnet(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) Subnet:

import boto3

ec2 = boto3.resource('ec2')
subnet = ec2.Subnet('id')
Parameters
id (string) -- The Subnet's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

These are the resource's available collections:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The Subnet's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

assign_ipv6_address_on_creation
  • (boolean) --

    Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives an IPv6 address.

availability_zone
  • (string) --

    The Availability Zone of the subnet.

availability_zone_id
  • (string) --

    The AZ ID of the subnet.

available_ip_address_count
  • (integer) --

    The number of unused private IPv4 addresses in the subnet. The IPv4 addresses for any stopped instances are considered unavailable.

cidr_block
  • (string) --

    The IPv4 CIDR block assigned to the subnet.

customer_owned_ipv4_pool
  • (string) --

    The customer-owned IPv4 address pool associated with the subnet.

default_for_az
  • (boolean) --

    Indicates whether this is the default subnet for the Availability Zone.

enable_dns64
  • (boolean) --

    Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

enable_lni_at_device_index
  • (integer) --

    Indicates the device position for local network interfaces in this subnet. For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).

ipv6_cidr_block_association_set
  • (list) --

    Information about the IPv6 CIDR blocks associated with the subnet.

    • (dict) --

      Describes an association between a subnet and an IPv6 CIDR block.

      • AssociationId (string) --

        The ID of the association.

      • Ipv6CidrBlock (string) --

        The IPv6 CIDR block.

      • Ipv6CidrBlockState (dict) --

        The state of the CIDR block.

        • State (string) --

          The state of a CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

ipv6_native
  • (boolean) --

    Indicates whether this is an IPv6 only subnet.

map_customer_owned_ip_on_launch
  • (boolean) --

    Indicates whether a network interface created in this subnet (including a network interface created by RunInstances ) receives a customer-owned IPv4 address.

map_public_ip_on_launch
  • (boolean) --

    Indicates whether instances launched in this subnet receive a public IPv4 address.

outpost_arn
  • (string) --

    The Amazon Resource Name (ARN) of the Outpost.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the subnet.

private_dns_name_options_on_launch
  • (dict) --

    The type of hostnames to assign to instances in the subnet at launch. An instance hostname is based on the IPv4 address or ID of the instance.

    • HostnameType (string) --

      The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

    • EnableResourceNameDnsARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

    • EnableResourceNameDnsAAAARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostname with DNS AAAA records.

state
  • (string) --

    The current state of the subnet.

subnet_arn
  • (string) --

    The Amazon Resource Name (ARN) of the subnet.

subnet_id
  • (string) --

    The ID of the subnet.

tags
  • (list) --

    Any tags assigned to the subnet.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

vpc_id
  • (string) --

    The ID of the VPC the subnet is in.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

vpc

(Vpc) The related vpc if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

create_instances(**kwargs)

Launches the specified number of instances using an AMI for which you have permissions.

You can specify a number of options, or leave the default options. The following rules apply:

  • [EC2-VPC] If you don't specify a subnet ID, we choose a default subnet from your default VPC for you. If you don't have a default VPC, you must specify a subnet ID in the request.
  • [EC2-Classic] If don't specify an Availability Zone, we choose one for you.
  • Some instance types must be launched into a VPC. If you do not have a default VPC, or if you do not specify a subnet ID, the request fails. For more information, see Instance types available only in a VPC .
  • [EC2-VPC] All instances have a network interface with a primary private IPv4 address. If you don't specify this address, we choose one from the IPv4 range of your subnet.
  • Not all instance types support IPv6 addresses. For more information, see Instance types .
  • If you don't specify a security group ID, we use the default security group. For more information, see Security groups .
  • If any of the AMIs have a product code attached for which the user has not subscribed, the request fails.

You can create a launch template , which is a resource that contains the parameters to launch an instance. When you launch an instance using RunInstances , you can specify the launch template instead of specifying the launch parameters.

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.

An instance is ready for you to use when it's in the running state. You can check the state of your instance using DescribeInstances . You can tag instances and EBS volumes during launch, after launch, or both. For more information, see CreateTags and Tagging your Amazon EC2 resources .

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 .

For troubleshooting, see What to do if an instance immediately terminates , and Troubleshooting connecting to your instance .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

instance = subnet.create_instances(
    BlockDeviceMappings=[
        {
            'DeviceName': 'string',
            'VirtualName': 'string',
            'Ebs': {
                'DeleteOnTermination': True|False,
                'Iops': 123,
                'SnapshotId': 'string',
                'VolumeSize': 123,
                'VolumeType': 'standard'|'io1'|'io2'|'gp2'|'sc1'|'st1'|'gp3',
                'KmsKeyId': 'string',
                'Throughput': 123,
                'OutpostArn': 'string',
                'Encrypted': True|False
            },
            'NoDevice': 'string'
        },
    ],
    ImageId='string',
    InstanceType='a1.medium'|'a1.large'|'a1.xlarge'|'a1.2xlarge'|'a1.4xlarge'|'a1.metal'|'c1.medium'|'c1.xlarge'|'c3.large'|'c3.xlarge'|'c3.2xlarge'|'c3.4xlarge'|'c3.8xlarge'|'c4.large'|'c4.xlarge'|'c4.2xlarge'|'c4.4xlarge'|'c4.8xlarge'|'c5.large'|'c5.xlarge'|'c5.2xlarge'|'c5.4xlarge'|'c5.9xlarge'|'c5.12xlarge'|'c5.18xlarge'|'c5.24xlarge'|'c5.metal'|'c5a.large'|'c5a.xlarge'|'c5a.2xlarge'|'c5a.4xlarge'|'c5a.8xlarge'|'c5a.12xlarge'|'c5a.16xlarge'|'c5a.24xlarge'|'c5ad.large'|'c5ad.xlarge'|'c5ad.2xlarge'|'c5ad.4xlarge'|'c5ad.8xlarge'|'c5ad.12xlarge'|'c5ad.16xlarge'|'c5ad.24xlarge'|'c5d.large'|'c5d.xlarge'|'c5d.2xlarge'|'c5d.4xlarge'|'c5d.9xlarge'|'c5d.12xlarge'|'c5d.18xlarge'|'c5d.24xlarge'|'c5d.metal'|'c5n.large'|'c5n.xlarge'|'c5n.2xlarge'|'c5n.4xlarge'|'c5n.9xlarge'|'c5n.18xlarge'|'c5n.metal'|'c6g.medium'|'c6g.large'|'c6g.xlarge'|'c6g.2xlarge'|'c6g.4xlarge'|'c6g.8xlarge'|'c6g.12xlarge'|'c6g.16xlarge'|'c6g.metal'|'c6gd.medium'|'c6gd.large'|'c6gd.xlarge'|'c6gd.2xlarge'|'c6gd.4xlarge'|'c6gd.8xlarge'|'c6gd.12xlarge'|'c6gd.16xlarge'|'c6gd.metal'|'c6gn.medium'|'c6gn.large'|'c6gn.xlarge'|'c6gn.2xlarge'|'c6gn.4xlarge'|'c6gn.8xlarge'|'c6gn.12xlarge'|'c6gn.16xlarge'|'c6i.large'|'c6i.xlarge'|'c6i.2xlarge'|'c6i.4xlarge'|'c6i.8xlarge'|'c6i.12xlarge'|'c6i.16xlarge'|'c6i.24xlarge'|'c6i.32xlarge'|'c6i.metal'|'cc1.4xlarge'|'cc2.8xlarge'|'cg1.4xlarge'|'cr1.8xlarge'|'d2.xlarge'|'d2.2xlarge'|'d2.4xlarge'|'d2.8xlarge'|'d3.xlarge'|'d3.2xlarge'|'d3.4xlarge'|'d3.8xlarge'|'d3en.xlarge'|'d3en.2xlarge'|'d3en.4xlarge'|'d3en.6xlarge'|'d3en.8xlarge'|'d3en.12xlarge'|'dl1.24xlarge'|'f1.2xlarge'|'f1.4xlarge'|'f1.16xlarge'|'g2.2xlarge'|'g2.8xlarge'|'g3.4xlarge'|'g3.8xlarge'|'g3.16xlarge'|'g3s.xlarge'|'g4ad.xlarge'|'g4ad.2xlarge'|'g4ad.4xlarge'|'g4ad.8xlarge'|'g4ad.16xlarge'|'g4dn.xlarge'|'g4dn.2xlarge'|'g4dn.4xlarge'|'g4dn.8xlarge'|'g4dn.12xlarge'|'g4dn.16xlarge'|'g4dn.metal'|'g5.xlarge'|'g5.2xlarge'|'g5.4xlarge'|'g5.8xlarge'|'g5.12xlarge'|'g5.16xlarge'|'g5.24xlarge'|'g5.48xlarge'|'g5g.xlarge'|'g5g.2xlarge'|'g5g.4xlarge'|'g5g.8xlarge'|'g5g.16xlarge'|'g5g.metal'|'hi1.4xlarge'|'hpc6a.48xlarge'|'hs1.8xlarge'|'h1.2xlarge'|'h1.4xlarge'|'h1.8xlarge'|'h1.16xlarge'|'i2.xlarge'|'i2.2xlarge'|'i2.4xlarge'|'i2.8xlarge'|'i3.large'|'i3.xlarge'|'i3.2xlarge'|'i3.4xlarge'|'i3.8xlarge'|'i3.16xlarge'|'i3.metal'|'i3en.large'|'i3en.xlarge'|'i3en.2xlarge'|'i3en.3xlarge'|'i3en.6xlarge'|'i3en.12xlarge'|'i3en.24xlarge'|'i3en.metal'|'im4gn.large'|'im4gn.xlarge'|'im4gn.2xlarge'|'im4gn.4xlarge'|'im4gn.8xlarge'|'im4gn.16xlarge'|'inf1.xlarge'|'inf1.2xlarge'|'inf1.6xlarge'|'inf1.24xlarge'|'is4gen.medium'|'is4gen.large'|'is4gen.xlarge'|'is4gen.2xlarge'|'is4gen.4xlarge'|'is4gen.8xlarge'|'m1.small'|'m1.medium'|'m1.large'|'m1.xlarge'|'m2.xlarge'|'m2.2xlarge'|'m2.4xlarge'|'m3.medium'|'m3.large'|'m3.xlarge'|'m3.2xlarge'|'m4.large'|'m4.xlarge'|'m4.2xlarge'|'m4.4xlarge'|'m4.10xlarge'|'m4.16xlarge'|'m5.large'|'m5.xlarge'|'m5.2xlarge'|'m5.4xlarge'|'m5.8xlarge'|'m5.12xlarge'|'m5.16xlarge'|'m5.24xlarge'|'m5.metal'|'m5a.large'|'m5a.xlarge'|'m5a.2xlarge'|'m5a.4xlarge'|'m5a.8xlarge'|'m5a.12xlarge'|'m5a.16xlarge'|'m5a.24xlarge'|'m5ad.large'|'m5ad.xlarge'|'m5ad.2xlarge'|'m5ad.4xlarge'|'m5ad.8xlarge'|'m5ad.12xlarge'|'m5ad.16xlarge'|'m5ad.24xlarge'|'m5d.large'|'m5d.xlarge'|'m5d.2xlarge'|'m5d.4xlarge'|'m5d.8xlarge'|'m5d.12xlarge'|'m5d.16xlarge'|'m5d.24xlarge'|'m5d.metal'|'m5dn.large'|'m5dn.xlarge'|'m5dn.2xlarge'|'m5dn.4xlarge'|'m5dn.8xlarge'|'m5dn.12xlarge'|'m5dn.16xlarge'|'m5dn.24xlarge'|'m5dn.metal'|'m5n.large'|'m5n.xlarge'|'m5n.2xlarge'|'m5n.4xlarge'|'m5n.8xlarge'|'m5n.12xlarge'|'m5n.16xlarge'|'m5n.24xlarge'|'m5n.metal'|'m5zn.large'|'m5zn.xlarge'|'m5zn.2xlarge'|'m5zn.3xlarge'|'m5zn.6xlarge'|'m5zn.12xlarge'|'m5zn.metal'|'m6a.large'|'m6a.xlarge'|'m6a.2xlarge'|'m6a.4xlarge'|'m6a.8xlarge'|'m6a.12xlarge'|'m6a.16xlarge'|'m6a.24xlarge'|'m6a.32xlarge'|'m6a.48xlarge'|'m6g.metal'|'m6g.medium'|'m6g.large'|'m6g.xlarge'|'m6g.2xlarge'|'m6g.4xlarge'|'m6g.8xlarge'|'m6g.12xlarge'|'m6g.16xlarge'|'m6gd.metal'|'m6gd.medium'|'m6gd.large'|'m6gd.xlarge'|'m6gd.2xlarge'|'m6gd.4xlarge'|'m6gd.8xlarge'|'m6gd.12xlarge'|'m6gd.16xlarge'|'m6i.large'|'m6i.xlarge'|'m6i.2xlarge'|'m6i.4xlarge'|'m6i.8xlarge'|'m6i.12xlarge'|'m6i.16xlarge'|'m6i.24xlarge'|'m6i.32xlarge'|'m6i.metal'|'mac1.metal'|'p2.xlarge'|'p2.8xlarge'|'p2.16xlarge'|'p3.2xlarge'|'p3.8xlarge'|'p3.16xlarge'|'p3dn.24xlarge'|'p4d.24xlarge'|'r3.large'|'r3.xlarge'|'r3.2xlarge'|'r3.4xlarge'|'r3.8xlarge'|'r4.large'|'r4.xlarge'|'r4.2xlarge'|'r4.4xlarge'|'r4.8xlarge'|'r4.16xlarge'|'r5.large'|'r5.xlarge'|'r5.2xlarge'|'r5.4xlarge'|'r5.8xlarge'|'r5.12xlarge'|'r5.16xlarge'|'r5.24xlarge'|'r5.metal'|'r5a.large'|'r5a.xlarge'|'r5a.2xlarge'|'r5a.4xlarge'|'r5a.8xlarge'|'r5a.12xlarge'|'r5a.16xlarge'|'r5a.24xlarge'|'r5ad.large'|'r5ad.xlarge'|'r5ad.2xlarge'|'r5ad.4xlarge'|'r5ad.8xlarge'|'r5ad.12xlarge'|'r5ad.16xlarge'|'r5ad.24xlarge'|'r5b.large'|'r5b.xlarge'|'r5b.2xlarge'|'r5b.4xlarge'|'r5b.8xlarge'|'r5b.12xlarge'|'r5b.16xlarge'|'r5b.24xlarge'|'r5b.metal'|'r5d.large'|'r5d.xlarge'|'r5d.2xlarge'|'r5d.4xlarge'|'r5d.8xlarge'|'r5d.12xlarge'|'r5d.16xlarge'|'r5d.24xlarge'|'r5d.metal'|'r5dn.large'|'r5dn.xlarge'|'r5dn.2xlarge'|'r5dn.4xlarge'|'r5dn.8xlarge'|'r5dn.12xlarge'|'r5dn.16xlarge'|'r5dn.24xlarge'|'r5dn.metal'|'r5n.large'|'r5n.xlarge'|'r5n.2xlarge'|'r5n.4xlarge'|'r5n.8xlarge'|'r5n.12xlarge'|'r5n.16xlarge'|'r5n.24xlarge'|'r5n.metal'|'r6g.medium'|'r6g.large'|'r6g.xlarge'|'r6g.2xlarge'|'r6g.4xlarge'|'r6g.8xlarge'|'r6g.12xlarge'|'r6g.16xlarge'|'r6g.metal'|'r6gd.medium'|'r6gd.large'|'r6gd.xlarge'|'r6gd.2xlarge'|'r6gd.4xlarge'|'r6gd.8xlarge'|'r6gd.12xlarge'|'r6gd.16xlarge'|'r6gd.metal'|'r6i.large'|'r6i.xlarge'|'r6i.2xlarge'|'r6i.4xlarge'|'r6i.8xlarge'|'r6i.12xlarge'|'r6i.16xlarge'|'r6i.24xlarge'|'r6i.32xlarge'|'r6i.metal'|'t1.micro'|'t2.nano'|'t2.micro'|'t2.small'|'t2.medium'|'t2.large'|'t2.xlarge'|'t2.2xlarge'|'t3.nano'|'t3.micro'|'t3.small'|'t3.medium'|'t3.large'|'t3.xlarge'|'t3.2xlarge'|'t3a.nano'|'t3a.micro'|'t3a.small'|'t3a.medium'|'t3a.large'|'t3a.xlarge'|'t3a.2xlarge'|'t4g.nano'|'t4g.micro'|'t4g.small'|'t4g.medium'|'t4g.large'|'t4g.xlarge'|'t4g.2xlarge'|'u-6tb1.56xlarge'|'u-6tb1.112xlarge'|'u-9tb1.112xlarge'|'u-12tb1.112xlarge'|'u-6tb1.metal'|'u-9tb1.metal'|'u-12tb1.metal'|'u-18tb1.metal'|'u-24tb1.metal'|'vt1.3xlarge'|'vt1.6xlarge'|'vt1.24xlarge'|'x1.16xlarge'|'x1.32xlarge'|'x1e.xlarge'|'x1e.2xlarge'|'x1e.4xlarge'|'x1e.8xlarge'|'x1e.16xlarge'|'x1e.32xlarge'|'x2iezn.2xlarge'|'x2iezn.4xlarge'|'x2iezn.6xlarge'|'x2iezn.8xlarge'|'x2iezn.12xlarge'|'x2iezn.metal'|'x2gd.medium'|'x2gd.large'|'x2gd.xlarge'|'x2gd.2xlarge'|'x2gd.4xlarge'|'x2gd.8xlarge'|'x2gd.12xlarge'|'x2gd.16xlarge'|'x2gd.metal'|'z1d.large'|'z1d.xlarge'|'z1d.2xlarge'|'z1d.3xlarge'|'z1d.6xlarge'|'z1d.12xlarge'|'z1d.metal'|'x2idn.16xlarge'|'x2idn.24xlarge'|'x2idn.32xlarge'|'x2iedn.xlarge'|'x2iedn.2xlarge'|'x2iedn.4xlarge'|'x2iedn.8xlarge'|'x2iedn.16xlarge'|'x2iedn.24xlarge'|'x2iedn.32xlarge'|'c6a.large'|'c6a.xlarge'|'c6a.2xlarge'|'c6a.4xlarge'|'c6a.8xlarge'|'c6a.12xlarge'|'c6a.16xlarge'|'c6a.24xlarge'|'c6a.32xlarge'|'c6a.48xlarge'|'c6a.metal'|'m6a.metal'|'i4i.large'|'i4i.xlarge'|'i4i.2xlarge'|'i4i.4xlarge'|'i4i.8xlarge'|'i4i.16xlarge'|'i4i.32xlarge'|'i4i.metal'|'x2idn.metal'|'x2iedn.metal'|'c7g.medium'|'c7g.large'|'c7g.xlarge'|'c7g.2xlarge'|'c7g.4xlarge'|'c7g.8xlarge'|'c7g.12xlarge'|'c7g.16xlarge'|'mac2.metal',
    Ipv6AddressCount=123,
    Ipv6Addresses=[
        {
            'Ipv6Address': 'string'
        },
    ],
    KernelId='string',
    KeyName='string',
    MaxCount=123,
    MinCount=123,
    Monitoring={
        'Enabled': True|False
    },
    Placement={
        'AvailabilityZone': 'string',
        'Affinity': 'string',
        'GroupName': 'string',
        'PartitionNumber': 123,
        'HostId': 'string',
        'Tenancy': 'default'|'dedicated'|'host',
        'SpreadDomain': 'string',
        'HostResourceGroupArn': 'string'
    },
    RamdiskId='string',
    SecurityGroupIds=[
        'string',
    ],
    SecurityGroups=[
        'string',
    ],
    UserData='string',
    AdditionalInfo='string',
    ClientToken='string',
    DisableApiTermination=True|False,
    DryRun=True|False,
    EbsOptimized=True|False,
    IamInstanceProfile={
        'Arn': 'string',
        'Name': 'string'
    },
    InstanceInitiatedShutdownBehavior='stop'|'terminate',
    NetworkInterfaces=[
        {
            'AssociatePublicIpAddress': True|False,
            'DeleteOnTermination': True|False,
            'Description': 'string',
            'DeviceIndex': 123,
            'Groups': [
                'string',
            ],
            'Ipv6AddressCount': 123,
            'Ipv6Addresses': [
                {
                    'Ipv6Address': 'string'
                },
            ],
            'NetworkInterfaceId': 'string',
            'PrivateIpAddress': 'string',
            'PrivateIpAddresses': [
                {
                    'Primary': True|False,
                    'PrivateIpAddress': 'string'
                },
            ],
            'SecondaryPrivateIpAddressCount': 123,
            'SubnetId': 'string',
            'AssociateCarrierIpAddress': True|False,
            'InterfaceType': 'string',
            'NetworkCardIndex': 123,
            'Ipv4Prefixes': [
                {
                    'Ipv4Prefix': 'string'
                },
            ],
            'Ipv4PrefixCount': 123,
            'Ipv6Prefixes': [
                {
                    'Ipv6Prefix': 'string'
                },
            ],
            'Ipv6PrefixCount': 123
        },
    ],
    PrivateIpAddress='string',
    ElasticGpuSpecification=[
        {
            'Type': 'string'
        },
    ],
    ElasticInferenceAccelerators=[
        {
            'Type': 'string',
            'Count': 123
        },
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    LaunchTemplate={
        'LaunchTemplateId': 'string',
        'LaunchTemplateName': 'string',
        'Version': 'string'
    },
    InstanceMarketOptions={
        'MarketType': 'spot',
        'SpotOptions': {
            'MaxPrice': 'string',
            'SpotInstanceType': 'one-time'|'persistent',
            'BlockDurationMinutes': 123,
            'ValidUntil': datetime(2015, 1, 1),
            'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
        }
    },
    CreditSpecification={
        'CpuCredits': 'string'
    },
    CpuOptions={
        'CoreCount': 123,
        'ThreadsPerCore': 123
    },
    CapacityReservationSpecification={
        'CapacityReservationPreference': 'open'|'none',
        'CapacityReservationTarget': {
            'CapacityReservationId': 'string',
            'CapacityReservationResourceGroupArn': 'string'
        }
    },
    HibernationOptions={
        'Configured': True|False
    },
    LicenseSpecifications=[
        {
            'LicenseConfigurationArn': 'string'
        },
    ],
    MetadataOptions={
        'HttpTokens': 'optional'|'required',
        'HttpPutResponseHopLimit': 123,
        'HttpEndpoint': 'disabled'|'enabled',
        'HttpProtocolIpv6': 'disabled'|'enabled',
        'InstanceMetadataTags': 'disabled'|'enabled'
    },
    EnclaveOptions={
        'Enabled': True|False
    },
    PrivateDnsNameOptions={
        'HostnameType': 'ip-name'|'resource-name',
        'EnableResourceNameDnsARecord': True|False,
        'EnableResourceNameDnsAAAARecord': True|False
    },
    MaintenanceOptions={
        'AutoRecovery': 'disabled'|'default'
    },
    DisableApiStop=True|False
)
Parameters
  • BlockDeviceMappings (list) --

    The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide .

    • (dict) --

      Describes a block device mapping, which defines the EBS volumes and instance store volumes to attach to an instance at launch.

      • DeviceName (string) --

        The device name (for example, /dev/sdh or xvdh ).

      • 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.

        NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.

        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.

      • Ebs (dict) --

        Parameters used to automatically set up EBS volumes when the instance is launched.

        • DeleteOnTermination (boolean) --

          Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .

        • Iops (integer) --

          The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

          The following are the supported values for each volume type:

          • gp3 : 3,000-16,000 IOPS
          • io1 : 100-64,000 IOPS
          • io2 : 100-64,000 IOPS

          For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.

          This parameter is required for io1 and io2 volumes. The default for gp3 volumes is 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard volumes.

        • SnapshotId (string) --

          The ID of the snapshot.

        • VolumeSize (integer) --

          The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.

          The following are the supported volumes sizes for each volume type:

          • gp2 and gp3 :1-16,384
          • io1 and io2 : 4-16,384
          • st1 and sc1 : 125-16,384
          • standard : 1-1,024
        • VolumeType (string) --

          The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is io1 or io2 , you must specify the IOPS that the volume supports.

        • KmsKeyId (string) --

          Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK under which the EBS volume is encrypted.

          This parameter is only supported on BlockDeviceMapping objects called by RunInstances , RequestSpotFleet , and RequestSpotInstances .

        • Throughput (integer) --

          The throughput that the volume supports, in MiB/s.

          This parameter is valid only for gp3 volumes.

          Valid Range: Minimum value of 125. Maximum value of 1000.

        • OutpostArn (string) --

          The ARN of the Outpost on which the snapshot is stored.

          This parameter is only supported on BlockDeviceMapping objects called by CreateImage .

        • Encrypted (boolean) --

          Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Amazon EBS encryption in the Amazon EC2 User Guide .

          In no case can you remove encryption from an encrypted volume.

          Encrypted volumes can only be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types .

          This parameter is not returned by DescribeImageAttribute .

      • NoDevice (string) --

        To omit the device from the block device mapping, specify an empty string. When this property is specified, the device is removed from the block device mapping regardless of the assigned value.

  • ImageId (string) -- The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
  • InstanceType (string) --

    The instance type. For more information, see Instance types in the Amazon EC2 User Guide .

    Default: m1.small

  • Ipv6AddressCount (integer) --

    [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

  • Ipv6Addresses (list) --

    [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

    You cannot specify this option and the network interfaces option in the same request.

    • (dict) --

      Describes an IPv6 address.

      • Ipv6Address (string) --

        The IPv6 address.

  • KernelId (string) --

    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 EC2 User Guide .

  • KeyName (string) --

    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.

  • MaxCount (integer) --

    [REQUIRED]

    The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the largest possible number of instances above MinCount .

    Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.

  • MinCount (integer) --

    [REQUIRED]

    The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.

    Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.

  • Monitoring (dict) --

    Specifies whether detailed monitoring is enabled for the instance.

    • Enabled (boolean) -- [REQUIRED]

      Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

  • Placement (dict) --

    The placement for the instance.

    • AvailabilityZone (string) --

      The Availability Zone of the instance.

      If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.

      This parameter is not supported by CreateFleet .

    • Affinity (string) --

      The affinity setting for the instance on the Dedicated Host. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • GroupName (string) --

      The name of the placement group the instance is in.

    • PartitionNumber (integer) --

      The number of the partition that the instance is in. Valid only if the placement group strategy is set to partition .

      This parameter is not supported by CreateFleet .

    • HostId (string) --

      The ID of the Dedicated Host on which the instance resides. This parameter is not supported for the ImportInstance command.

      This parameter is not supported by CreateFleet .

    • 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.

      This parameter is not supported by CreateFleet .

      T3 instances that use the unlimited CPU credit option do not support host tenancy.

    • SpreadDomain (string) --

      Reserved for future use.

      This parameter is not supported by CreateFleet .

    • HostResourceGroupArn (string) --

      The ARN of the host resource group in which to launch the instances. If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

      This parameter is not supported by CreateFleet .

  • RamdiskId (string) --

    The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the kernel ID.

    Warning

    We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide .

  • SecurityGroupIds (list) --

    The IDs of the security groups. You can create a security group using CreateSecurityGroup .

    If you specify a network interface, you must specify any security groups as part of the network interface.

    • (string) --
  • SecurityGroups (list) --

    [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.

    If you specify a network interface, you must specify any security groups as part of the network interface.

    Default: Amazon EC2 uses the default security group.

    • (string) --
  • UserData (string) --

    The user data script to make available to the instance. For more information, see Run commands on your Linux instance at launch and Run commands on your Windows instance at launch . If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.

    This value will be base64 encoded automatically. Do not base64 encode this value prior to performing the operation.
  • AdditionalInfo (string) -- Reserved.
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

    For more information, see Ensuring Idempotency .

    Constraints: Maximum 64 ASCII characters

    This field is autopopulated if not provided.

  • DisableApiTermination (boolean) --

    If you set this parameter to true , you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you can terminate the instance by running the shutdown command from the instance.

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • EbsOptimized (boolean) --

    Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

    Default: false

  • IamInstanceProfile (dict) --

    The name or Amazon Resource Name (ARN) of an IAM instance profile.

    • Arn (string) --

      The Amazon Resource Name (ARN) of the instance profile.

    • Name (string) --

      The name of the instance profile.

  • InstanceInitiatedShutdownBehavior (string) --

    Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

    Default: stop

  • NetworkInterfaces (list) --

    The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.

    • (dict) --

      Describes a network interface.

      • AssociatePublicIpAddress (boolean) --

        Indicates whether to assign a public IPv4 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 .

      • 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.

      • Description (string) --

        The description of the network interface. Applies only if creating a network interface when launching an instance.

      • DeviceIndex (integer) --

        The position of the network interface in the attachment order. A primary network interface has a device index of 0.

        If you specify a network interface when launching an instance, you must specify the device index.

      • Groups (list) --

        The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.

        • (string) --
      • Ipv6AddressCount (integer) --

        A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.

      • Ipv6Addresses (list) --

        One or more IPv6 addresses to assign to the network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.

        • (dict) --

          Describes an IPv6 address.

          • Ipv6Address (string) --

            The IPv6 address.

      • NetworkInterfaceId (string) --

        The ID of the network interface.

        If you are creating a Spot Fleet, omit this parameter because you can’t specify a network interface ID in a launch specification.

      • PrivateIpAddress (string) --

        The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • PrivateIpAddresses (list) --

        One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary. You cannot specify this option if you're launching more than one instance in a RunInstances request.

        • (dict) --

          Describes a secondary private IPv4 address for a network interface.

          • Primary (boolean) --

            Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

          • PrivateIpAddress (string) --

            The private IPv4 addresses.

      • SecondaryPrivateIpAddressCount (integer) --

        The number of secondary private IPv4 addresses. You can't specify this option and specify more than one private IP address using the private IP addresses option. You cannot specify this option if you're launching more than one instance in a RunInstances request.

      • SubnetId (string) --

        The ID of the subnet associated with the network interface. Applies only if creating a network interface when launching an instance.

      • AssociateCarrierIpAddress (boolean) --

        Indicates whether to assign a carrier IP address to the network interface.

        You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the Amazon Web Services Wavelength Developer Guide .

      • InterfaceType (string) --

        The type of network interface.

        Valid values: interface | efa

      • NetworkCardIndex (integer) --

        The index of the network card. Some instance types support multiple network cards. The primary network interface must be assigned to network card index 0. The default is network card index 0.

        If you are using RequestSpotInstances to create Spot Instances, omit this parameter because you can’t specify the network card index when using this API. To specify the network card index, use RunInstances .

      • Ipv4Prefixes (list) --

        One or more IPv4 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

      • Ipv4PrefixCount (integer) --

        The number of IPv4 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv4Prefix option.

      • Ipv6Prefixes (list) --

        One or more IPv6 delegated prefixes to be assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

        • (dict) --

          Describes the IPv4 prefix option for a network interface.

          • Ipv6Prefix (string) --

            The IPv6 prefix.

      • Ipv6PrefixCount (integer) --

        The number of IPv6 delegated prefixes to be automatically assigned to the network interface. You cannot use this option if you use the Ipv6Prefix option.

  • PrivateIpAddress (string) --

    [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.

    Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.

    You cannot specify this option and the network interfaces option in the same request.

  • ElasticGpuSpecification (list) --

    An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide .

    • (dict) --

      A specification for an Elastic Graphics accelerator.

      • Type (string) -- [REQUIRED]

        The type of Elastic Graphics accelerator. For more information about the values to specify for Type , see Elastic Graphics Basics , specifically the Elastic Graphics accelerator column, in the Amazon Elastic Compute Cloud User Guide for Windows Instances .

  • ElasticInferenceAccelerators (list) --

    An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.

    You cannot specify accelerators from different generations in the same request.

    • (dict) --

      Describes an elastic inference accelerator.

      • Type (string) -- [REQUIRED]

        The type of elastic inference accelerator. The possible values are eia1.medium , eia1.large , eia1.xlarge , eia2.medium , eia2.large , and eia2.xlarge .

      • Count (integer) --

        The number of elastic inference accelerators to attach to the instance.

        Default: 1

  • TagSpecifications (list) --

    The tags to apply to the resources that are created during instance launch.

    You can specify tags for the following resources only:

    • Instances
    • Volumes
    • Elastic graphics
    • Spot Instance requests
    • Network interfaces

    To tag a resource after it has been created, see CreateTags .

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • LaunchTemplate (dict) --

    The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.

    • LaunchTemplateId (string) --

      The ID of the launch template.

      You must specify the LaunchTemplateId or the LaunchTemplateName , but not both.

    • LaunchTemplateName (string) --

      The name of the launch template.

      You must specify the LaunchTemplateName or the LaunchTemplateId , but not both.

    • Version (string) --

      The launch template version number, $Latest , or $Default .

      If the value is $Latest , Amazon EC2 uses the latest version of the launch template.

      If the value is $Default , Amazon EC2 uses the default version of the launch template.

      Default: The default version of the launch template.

  • InstanceMarketOptions (dict) --

    The market (purchasing) option for the instances.

    For RunInstances , persistent Spot Instance requests are only supported when InstanceInterruptionBehavior is set to either hibernate or stop .

    • MarketType (string) --

      The market type.

    • SpotOptions (dict) --

      The options for Spot Instances.

      • MaxPrice (string) --

        The maximum hourly price that you're willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

        Warning

        If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.

      • SpotInstanceType (string) --

        The Spot Instance request type. For RunInstances , persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop .

      • BlockDurationMinutes (integer) --

        Deprecated.

      • ValidUntil (datetime) --

        The end date of the request, in UTC format (YYYY -MM -DD T*HH* :MM :SS Z). Supported only for persistent requests.

        • For a persistent request, the request remains active until the ValidUntil date and time is reached. Otherwise, the request remains active until you cancel it.
        • For a one-time request, ValidUntil is not supported. The request remains active until all instances launch or you cancel the request.
      • InstanceInterruptionBehavior (string) --

        The behavior when a Spot Instance is interrupted. The default is terminate .

  • CreditSpecification (dict) --

    The credit option for CPU usage of the burstable performance instance. Valid values are standard and unlimited . To change this attribute after launch, use ModifyInstanceCreditSpecification . For more information, see Burstable performance instances in the Amazon EC2 User Guide .

    Default: standard (T2 instances) or unlimited (T3/T3a/T4g instances)

    For T3 instances with host tenancy, only standard is supported.

    • CpuCredits (string) -- [REQUIRED]

      The credit option for CPU usage of a T instance.

      Valid values: standard | unlimited

  • CpuOptions (dict) --

    The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide .

    • CoreCount (integer) --

      The number of CPU cores for the instance.

    • ThreadsPerCore (integer) --

      The number of threads per CPU core. To disable multithreading for the instance, specify a value of 1 . Otherwise, specify the default value of 2 .

  • CapacityReservationSpecification (dict) --

    Information about the Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open , which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).

    • CapacityReservationPreference (string) --

      Indicates the instance's Capacity Reservation preferences. Possible preferences include:

      • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
      • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.
    • CapacityReservationTarget (dict) --

      Information about the target Capacity Reservation or Capacity Reservation group.

      • CapacityReservationId (string) --

        The ID of the Capacity Reservation in which to run the instance.

      • CapacityReservationResourceGroupArn (string) --

        The ARN of the Capacity Reservation resource group in which to run the instance.

  • HibernationOptions (dict) --

    Indicates whether an instance is enabled for hibernation. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.

    • Configured (boolean) --

      If you set this parameter to true , your instance is enabled for hibernation.

      Default: false

  • LicenseSpecifications (list) --

    The license configurations.

    • (dict) --

      Describes a license configuration.

      • LicenseConfigurationArn (string) --

        The Amazon Resource Name (ARN) of the license configuration.

  • MetadataOptions (dict) --

    The metadata options for the instance. For more information, see Instance metadata and user data .

    • HttpTokens (string) --

      The state of token usage for your instance metadata requests.

      If the state is optional , you can choose to retrieve instance metadata with or without a signed token header on your request. If you retrieve the IAM role credentials without a token, the version 1.0 role credentials are returned. If you retrieve the IAM role credentials using a valid signed token, the version 2.0 role credentials are returned.

      If the state is required , you must send a signed token header with any instance metadata retrieval requests. In this state, retrieving the IAM role credentials always returns the version 2.0 credentials; the version 1.0 credentials are not available.

      Default: optional

    • HttpPutResponseHopLimit (integer) --

      The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.

      Default: 1

      Possible values: Integers from 1 to 64

    • HttpEndpoint (string) --

      Enables or disables the HTTP metadata endpoint on your instances.

      If you specify a value of disabled , you cannot access your instance metadata.

      Default: enabled

    • HttpProtocolIpv6 (string) --

      Enables or disables the IPv6 endpoint for the instance metadata service.

    • InstanceMetadataTags (string) --

      Set to enabled to allow access to instance tags from the instance metadata. Set to disabled to turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .

      Default: disabled

  • EnclaveOptions (dict) --

    Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide .

    You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.

    • Enabled (boolean) --

      To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter to true .

  • PrivateDnsNameOptions (dict) --

    The options for the instance hostname. The default values are inherited from the subnet.

    • HostnameType (string) --

      The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

    • EnableResourceNameDnsARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

    • EnableResourceNameDnsAAAARecord (boolean) --

      Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

  • MaintenanceOptions (dict) --

    The maintenance and recovery options for the instance.

    • AutoRecovery (string) --

      Disables the automatic recovery behavior of your instance or sets it to default. For more information, see Simplified automatic recovery .

  • DisableApiStop (boolean) -- Indicates whether an instance is enabled for stop protection. For more information, see Stop protection .
Return type

list(ec2.Instance)

Returns

A list of Instance resources

create_network_interface(**kwargs)

Creates a network interface in the specified subnet.

For more information about network interfaces, see Elastic Network Interfaces in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

network_interface = subnet.create_network_interface(
    Description='string',
    DryRun=True|False,
    Groups=[
        'string',
    ],
    Ipv6AddressCount=123,
    Ipv6Addresses=[
        {
            'Ipv6Address': 'string'
        },
    ],
    PrivateIpAddress='string',
    PrivateIpAddresses=[
        {
            'Primary': True|False,
            'PrivateIpAddress': 'string'
        },
    ],
    SecondaryPrivateIpAddressCount=123,
    Ipv4Prefixes=[
        {
            'Ipv4Prefix': 'string'
        },
    ],
    Ipv4PrefixCount=123,
    Ipv6Prefixes=[
        {
            'Ipv6Prefix': 'string'
        },
    ],
    Ipv6PrefixCount=123,
    InterfaceType='efa'|'branch'|'trunk',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string'
)
Parameters
  • Description (string) -- A description for the network interface.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    The IDs of one or more security groups.

    • (string) --
  • Ipv6AddressCount (integer) -- The number of IPv6 addresses to assign to a network interface. Amazon EC2 automatically selects the IPv6 addresses from the subnet range. You can't use this option if specifying specific IPv6 addresses. If your subnet has the AssignIpv6AddressOnCreation attribute set to true , you can specify 0 to override this setting.
  • Ipv6Addresses (list) --

    One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't use this option if you're specifying a number of IPv6 addresses.

    • (dict) --

      Describes an IPv6 address.

      • Ipv6Address (string) --

        The IPv6 address.

  • PrivateIpAddress (string) -- The primary private IPv4 address of the network interface. If you don't specify an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR range. If you specify an IP address, you cannot indicate any IP addresses specified in privateIpAddresses as primary (only one IP address can be designated as primary).
  • PrivateIpAddresses (list) --

    One or more private IPv4 addresses.

    • (dict) --

      Describes a secondary private IPv4 address for a network interface.

      • Primary (boolean) --

        Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.

      • PrivateIpAddress (string) --

        The private IPv4 addresses.

  • SecondaryPrivateIpAddressCount (integer) --

    The number of secondary private IPv4 addresses to assign to a network interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 selects these IP addresses within the subnet's IPv4 CIDR range. You can't specify this option and specify more than one private IP address using privateIpAddresses .

    The number of IP addresses you can assign to a network interface varies by instance type. For more information, see IP Addresses Per ENI Per Instance Type in the Amazon Virtual Private Cloud User Guide .

  • Ipv4Prefixes (list) --

    One or more IPv4 prefixes assigned to the network interface. You cannot use this option if you use the Ipv4PrefixCount option.

  • Ipv4PrefixCount (integer) -- The number of IPv4 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv4 Prefixes option.
  • Ipv6Prefixes (list) --

    One or more IPv6 prefixes assigned to the network interface. You cannot use this option if you use the Ipv6PrefixCount option.

    • (dict) --

      Describes the IPv4 prefix option for a network interface.

      • Ipv6Prefix (string) --

        The IPv6 prefix.

  • Ipv6PrefixCount (integer) -- The number of IPv6 prefixes that Amazon Web Services automatically assigns to the network interface. You cannot use this option if you use the Ipv6Prefixes option.
  • InterfaceType (string) --

    The type of network interface. The default is interface .

    The only supported values are efa and trunk .

  • TagSpecifications (list) --

    The tags to apply to the new network interface.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • ClientToken (string) --

    Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency .

    This field is autopopulated if not provided.

Return type

ec2.NetworkInterface

Returns

NetworkInterface resource

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = subnet.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified subnet. You must terminate all running instances in the subnet before you can delete the subnet.

See also: AWS API Documentation

Request Syntax

response = subnet.delete(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_subnets() to update the attributes of the Subnet resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

subnet.load()
Returns
None
reload()

Calls EC2.Client.describe_subnets() to update the attributes of the Subnet resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

subnet.reload()
Returns
None

Collections

Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.

instances

A collection of Instance resources.A Instance Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = subnet.instances.all()
Return type
list(ec2.Instance)
Returns
A list of Instance resources
create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = subnet.instances.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Returns

None

filter(**kwargs)

Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method. A Instance collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

instance_iterator = subnet.instances.filter(
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Return type

list(ec2.Instance)

Returns

A list of Instance resources

limit(**kwargs)

Creates an iterable up to a specified amount of Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = subnet.instances.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Instance)
Returns
A list of Instance resources
monitor(**kwargs)

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitor your instances using CloudWatch in the Amazon EC2 User Guide .

To disable detailed monitoring, see UnmonitorInstances .

See also: AWS API Documentation

Request Syntax

response = subnet.instances.monitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

page_size(**kwargs)

Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

instance_iterator = subnet.instances.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Instance)
Returns
A list of Instance resources
reboot(**kwargs)

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Troubleshoot an unreachable instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = subnet.instances.reboot(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
start(**kwargs)

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

If you attempt to start a T3 instance with host tenancy and the unlimted CPU credit option, the request fails. The unlimited CPU credit option is not supported on Dedicated Hosts. Before you start the instance, either change its CPU credit option to standard , or change its tenancy to default or dedicated .

For more information, see Stop and start your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = subnet.instances.start(
    AdditionalInfo='string',
    DryRun=True|False
)
Parameters
  • AdditionalInfo (string) -- Reserved.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'StartingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StartingInstances (list) --

      Information about the started instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

stop(**kwargs)

Stops an Amazon EBS-backed instance. For more information, see Stop and start your instance in the Amazon EC2 User Guide .

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon EC2 User Guide .

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide .

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshoot stopping your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = subnet.instances.stop(
    Hibernate=True|False,
    DryRun=True|False,
    Force=True|False
)
Parameters
  • Hibernate (boolean) --

    Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'StoppingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StoppingInstances (list) --

      Information about the stopped instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

terminate(**kwargs)

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

If you terminate multiple instances across multiple Availability Zones, and one or more of the specified instances are enabled for termination protection, the request fails with the following results:

  • The specified instances that are in the same Availability Zone as the protected instance are not terminated.
  • The specified instances that are in different Availability Zones, where no other specified instances are protected, are successfully terminated.

For example, say you have the following instances:

  • Instance A: us-east-1a ; Not protected
  • Instance B: us-east-1a ; Not protected
  • Instance C: us-east-1b ; Protected
  • Instance D: us-east-1b ; not protected

If you attempt to terminate all of these instances in the same request, the request reports failure with the following results:

  • Instance A and Instance B are successfully terminated because none of the specified instances in us-east-1a are enabled for termination protection.
  • Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = subnet.instances.terminate(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'TerminatingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • TerminatingInstances (list) --

      Information about the terminated instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

unmonitor(**kwargs)

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = subnet.instances.unmonitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

network_interfaces

A collection of NetworkInterface resources.A NetworkInterface Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all NetworkInterface resources in the collection.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = subnet.network_interfaces.all()
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
filter(**kwargs)

Creates an iterable of all NetworkInterface resources in the collection filtered by kwargs passed to method. A NetworkInterface collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = subnet.network_interfaces.filter(
    DryRun=True|False,
    NetworkInterfaceIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceIds (list) --

    One or more network interface IDs.

    Default: Describes all your network interfaces.

    • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. You cannot specify this parameter and the network interface IDs parameter in the same request.
Return type

list(ec2.NetworkInterface)

Returns

A list of NetworkInterface resources

limit(**kwargs)

Creates an iterable up to a specified amount of NetworkInterface resources in the collection.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = subnet.network_interfaces.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
page_size(**kwargs)

Creates an iterable of all NetworkInterface resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = subnet.network_interfaces.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources

Tag

class EC2.Tag(resource_id, key, value)

A resource representing an Amazon Elastic Compute Cloud (EC2) Tag:

import boto3

ec2 = boto3.resource('ec2')
tag = ec2.Tag('resource_id','key','value')
Parameters
  • resource_id (string) -- The Tag's resource_id identifier. This must be set.
  • key (string) -- The Tag's key identifier. This must be set.
  • value (string) -- The Tag's value identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

resource_id

(string) The Tag's resource_id identifier. This must be set.

key

(string) The Tag's key identifier. This must be set.

value

(string) The Tag's value identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

resource_type
  • (string) --

    The resource type.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

delete(**kwargs)

Deletes the specified set of tags from the specified set of resources.

To list the current tags, use DescribeTags . For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = tag.delete(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_tags() to update the attributes of the Tag resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

tag.load()
Returns
None
reload()

Calls EC2.Client.describe_tags() to update the attributes of the Tag resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

tag.reload()
Returns
None

Volume

class EC2.Volume(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) Volume:

import boto3

ec2 = boto3.resource('ec2')
volume = ec2.Volume('id')
Parameters
id (string) -- The Volume's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available actions:

These are the resource's available collections:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The Volume's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

attachments
  • (list) --

    Information about the volume attachments.

    • (dict) --

      Describes volume attachment details.

      • AttachTime (datetime) --

        The time stamp when the attachment initiated.

      • Device (string) --

        The device name.

      • InstanceId (string) --

        The ID of the instance.

      • State (string) --

        The attachment state of the volume.

      • VolumeId (string) --

        The ID of the volume.

      • DeleteOnTermination (boolean) --

        Indicates whether the EBS volume is deleted on instance termination.

availability_zone
  • (string) --

    The Availability Zone for the volume.

create_time
  • (datetime) --

    The time stamp when volume creation was initiated.

encrypted
  • (boolean) --

    Indicates whether the volume is encrypted.

fast_restored
  • (boolean) --

    Indicates whether the volume was created using fast snapshot restore.

iops
  • (integer) --

    The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 volumes, this represents the number of IOPS that are provisioned for the volume. For gp2 volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.

kms_key_id
  • (string) --

    The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that was used to protect the volume encryption key for the volume.

multi_attach_enabled
  • (boolean) --

    Indicates whether Amazon EBS Multi-Attach is enabled.

outpost_arn
  • (string) --

    The Amazon Resource Name (ARN) of the Outpost.

size
  • (integer) --

    The size of the volume, in GiBs.

snapshot_id
  • (string) --

    The snapshot from which the volume was created, if applicable.

state
  • (string) --

    The volume state.

tags
  • (list) --

    Any tags assigned to the volume.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

throughput
  • (integer) --

    The throughput that the volume supports, in MiB/s.

volume_id
  • (string) --

    The ID of the volume.

volume_type
  • (string) --

    The volume type.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

attach_to_instance(**kwargs)

Attaches an EBS volume to a running or stopped instance and exposes it to the instance with the specified device name.

Encrypted EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

After you attach an EBS volume, you must make it available. For more information, see Make an EBS volume available for use .

If a volume has an Amazon Web Services Marketplace product code:

  • The volume can be attached only to a stopped instance.
  • Amazon Web Services Marketplace product codes are copied from the volume to the instance.
  • You must be subscribed to the product.
  • The instance type and operating system of the instance must support the product. For example, you can't detach a volume from a Windows instance and attach it to a Linux instance.

For more information, see Attach an Amazon EBS volume to an instance in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = volume.attach_to_instance(
    Device='string',
    InstanceId='string',
    DryRun=True|False
)
Parameters
  • Device (string) --

    [REQUIRED]

    The device name (for example, /dev/sdh or xvdh ).

  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AttachTime': datetime(2015, 1, 1),
    'Device': 'string',
    'InstanceId': 'string',
    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
    'VolumeId': 'string',
    'DeleteOnTermination': True|False
}

Response Structure

  • (dict) --

    Describes volume attachment details.

    • AttachTime (datetime) --

      The time stamp when the attachment initiated.

    • Device (string) --

      The device name.

    • InstanceId (string) --

      The ID of the instance.

    • State (string) --

      The attachment state of the volume.

    • VolumeId (string) --

      The ID of the volume.

    • DeleteOnTermination (boolean) --

      Indicates whether the EBS volume is deleted on instance termination.

create_snapshot(**kwargs)

Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use snapshots for backups, to make copies of EBS volumes, and to save data before shutting down an instance.

You can create snapshots of volumes in a Region and volumes on an Outpost. If you create a snapshot of a volume in a Region, the snapshot must be stored in the same Region as the volume. If you create a snapshot of a volume on an Outpost, the snapshot can be stored on the same Outpost as the volume, or in the Region for that Outpost.

When a snapshot is created, any Amazon Web Services Marketplace product codes that are associated with the source volume are propagated to the snapshot.

You can take a snapshot of an attached volume that is in use. However, snapshots only capture data that has been written to your Amazon EBS volume at the time the snapshot command is issued; this might exclude any data that has been cached by any applications or the operating system. If you can pause any file systems on the volume long enough to take a snapshot, your snapshot should be complete. However, if you cannot pause all file writes to the volume, you should unmount the volume from within the instance, issue the snapshot command, and then remount the volume to ensure a consistent and complete snapshot. You may remount and use your volume while the snapshot status is pending .

To create a snapshot for Amazon EBS volumes that serve as root devices, you should stop the instance before taking the snapshot.

Snapshots that are taken from encrypted volumes are automatically encrypted. Volumes that are created from encrypted snapshots are also automatically encrypted. Your encrypted volumes and any associated snapshots always remain protected.

You can tag your snapshots during creation. For more information, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide .

For more information, see Amazon Elastic Block Store and Amazon EBS encryption in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

snapshot = volume.create_snapshot(
    Description='string',
    OutpostArn='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) -- A description for the snapshot.
  • OutpostArn (string) --

    The Amazon Resource Name (ARN) of the Outpost on which to create a local snapshot.

    • To create a snapshot of a volume in a Region, omit this parameter. The snapshot is created in the same Region as the volume.
    • To create a snapshot of a volume on an Outpost and store the snapshot in the Region, omit this parameter. The snapshot is created in the Region for the Outpost.
    • To create a snapshot of a volume on an Outpost and store the snapshot on an Outpost, specify the ARN of the destination Outpost. The snapshot must be created on the same Outpost as the volume.

    For more information, see Create local snapshots from volumes on an Outpost in the Amazon Elastic Compute Cloud User Guide .

  • TagSpecifications (list) --

    The tags to apply to the snapshot during creation.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

ec2.Snapshot

Returns

Snapshot resource

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = volume.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified EBS volume. The volume must be in the available state (not attached to an instance).

The volume can remain in the deleting state for several minutes.

For more information, see Delete an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = volume.delete(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
describe_attribute(**kwargs)

Describes the specified attribute of the specified volume. You can specify only one attribute at a time.

For more information about EBS volumes, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = volume.describe_attribute(
    Attribute='autoEnableIO'|'productCodes',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The attribute of the volume. This parameter is required.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AutoEnableIO': {
        'Value': True|False
    },
    'ProductCodes': [
        {
            'ProductCodeId': 'string',
            'ProductCodeType': 'devpay'|'marketplace'
        },
    ],
    'VolumeId': 'string'
}

Response Structure

  • (dict) --

    • AutoEnableIO (dict) --

      The state of autoEnableIO attribute.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • ProductCodes (list) --

      A list of product codes.

      • (dict) --

        Describes a product code.

        • ProductCodeId (string) --

          The product code.

        • ProductCodeType (string) --

          The type of product code.

    • VolumeId (string) --

      The ID of the volume.

describe_status(**kwargs)

Describes the status of the specified volumes. Volume status provides the result of the checks performed on your volumes to determine events that can impair the performance of your volumes. The performance of a volume can be affected if an issue occurs on the volume's underlying host. If the volume's underlying host experiences a power outage or system issue, after the system is restored, there could be data inconsistencies on the volume. Volume events notify you if this occurs. Volume actions notify you if any action needs to be taken in response to the event.

The DescribeVolumeStatus operation provides the following information about the specified volumes:

Status : Reflects the current status of the volume. The possible values are ok , impaired , warning , or insufficient-data . If all checks pass, the overall status of the volume is ok . If the check fails, the overall status is impaired . If the status is insufficient-data , then the checks might still be taking place on your volume at the time. We recommend that you retry the request. For more information about volume status, see Monitor the status of your volumes in the Amazon Elastic Compute Cloud User Guide .

Events : Reflect the cause of a volume status and might require you to take action. For example, if your volume returns an impaired status, then the volume event might be potential-data-inconsistency . This means that your volume has been affected by an issue with the underlying host, has all I/O operations disabled, and might have inconsistent data.

Actions : Reflect the actions you might have to take in response to an event. For example, if the status of the volume is impaired and the volume event shows potential-data-inconsistency , then the action shows enable-volume-io . This means that you may want to enable the I/O operations for the volume by calling the EnableVolumeIO action and then check the volume for data consistency.

Volume status is based on the volume status checks, and does not reflect the volume state. Therefore, volume status does not indicate volumes in the error state (for example, when a volume is incapable of accepting I/O.)

See also: AWS API Documentation

Request Syntax

response = volume.describe_status(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    DryRun=True|False
)
Parameters
  • Filters (list) --

    The filters.

    • action.code - The action code for the event (for example, enable-volume-io ).
    • action.description - A description of the action.
    • action.event-id - The event ID associated with the action.
    • availability-zone - The Availability Zone of the instance.
    • event.description - A description of the event.
    • event.event-id - The event ID.
    • event.event-type - The event type (for io-enabled : passed | failed ; for io-performance : io-performance:degraded | io-performance:severely-degraded | io-performance:stalled ).
    • event.not-after - The latest end time for the event.
    • event.not-before - The earliest start time for the event.
    • volume-status.details-name - The cause for volume-status.status (io-enabled | io-performance ).
    • volume-status.details-status - The status of volume-status.details-name (for io-enabled : passed | failed ; for io-performance : normal | degraded | severely-degraded | stalled ).
    • volume-status.status - The status of the volume (ok | impaired | warning | insufficient-data ).
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • MaxResults (integer) -- The maximum number of volume results returned by DescribeVolumeStatus in paginated output. When this parameter is used, the request only returns MaxResults results in a single page along with a NextToken response element. 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 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeVolumeStatus returns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
  • NextToken (string) -- The NextToken value to include in a future DescribeVolumeStatus request. When the results of the request exceed MaxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'VolumeStatuses': [
        {
            'Actions': [
                {
                    'Code': 'string',
                    'Description': 'string',
                    'EventId': 'string',
                    'EventType': 'string'
                },
            ],
            'AvailabilityZone': 'string',
            'OutpostArn': 'string',
            'Events': [
                {
                    'Description': 'string',
                    'EventId': 'string',
                    'EventType': 'string',
                    'NotAfter': datetime(2015, 1, 1),
                    'NotBefore': datetime(2015, 1, 1),
                    'InstanceId': 'string'
                },
            ],
            'VolumeId': 'string',
            'VolumeStatus': {
                'Details': [
                    {
                        'Name': 'io-enabled'|'io-performance',
                        'Status': 'string'
                    },
                ],
                'Status': 'ok'|'impaired'|'insufficient-data'
            },
            'AttachmentStatuses': [
                {
                    'IoPerformance': 'string',
                    'InstanceId': 'string'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • 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.

    • VolumeStatuses (list) --

      Information about the status of the volumes.

      • (dict) --

        Describes the volume status.

        • Actions (list) --

          The details of the operation.

          • (dict) --

            Describes a volume status operation code.

            • Code (string) --

              The code identifying the operation, for example, enable-volume-io .

            • Description (string) --

              A description of the operation.

            • EventId (string) --

              The ID of the event associated with this operation.

            • EventType (string) --

              The event type associated with this operation.

        • AvailabilityZone (string) --

          The Availability Zone of the volume.

        • OutpostArn (string) --

          The Amazon Resource Name (ARN) of the Outpost.

        • Events (list) --

          A list of events associated with the volume.

          • (dict) --

            Describes a volume status event.

            • Description (string) --

              A description of the event.

            • EventId (string) --

              The ID of this event.

            • EventType (string) --

              The type of this event.

            • NotAfter (datetime) --

              The latest end time of the event.

            • NotBefore (datetime) --

              The earliest start time of the event.

            • InstanceId (string) --

              The ID of the instance associated with the event.

        • VolumeId (string) --

          The volume ID.

        • VolumeStatus (dict) --

          The volume status.

          • Details (list) --

            The details of the volume status.

            • (dict) --

              Describes a volume status.

              • Name (string) --

                The name of the volume status.

              • Status (string) --

                The intended status of the volume status.

          • Status (string) --

            The status of the volume.

        • AttachmentStatuses (list) --

          Information about the instances to which the volume is attached.

          • (dict) --

            Information about the instances to which the volume is attached.

            • IoPerformance (string) --

              The maximum IOPS supported by the attached instance.

            • InstanceId (string) --

              The ID of the attached instance.

detach_from_instance(**kwargs)

Detaches an EBS volume from an instance. Make sure to unmount any file systems on the device within your operating system before detaching the volume. Failure to do so can result in the volume becoming stuck in the busy state while detaching. If this happens, detachment can be delayed indefinitely until you unmount the volume, force detachment, reboot the instance, or all three. If an EBS volume is the root device of an instance, it can't be detached while the instance is running. To detach the root volume, stop the instance first.

When a volume with an Amazon Web Services Marketplace product code is detached from an instance, the product code is no longer associated with the instance.

For more information, see Detach an Amazon EBS volume in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = volume.detach_from_instance(
    Device='string',
    Force=True|False,
    InstanceId='string',
    DryRun=True|False
)
Parameters
  • Device (string) -- The device name.
  • Force (boolean) -- Forces detachment if the previous detachment attempt did not occur cleanly (for example, logging into an instance, unmounting the volume, and detaching normally). This option can lead to data loss or a corrupted file system. Use this option only as a last resort to detach a volume from a failed instance. The instance won't have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures.
  • InstanceId (string) -- The ID of the instance. If you are detaching a Multi-Attach enabled volume, you must specify an instance ID.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'AttachTime': datetime(2015, 1, 1),
    'Device': 'string',
    'InstanceId': 'string',
    'State': 'attaching'|'attached'|'detaching'|'detached'|'busy',
    'VolumeId': 'string',
    'DeleteOnTermination': True|False
}

Response Structure

  • (dict) --

    Describes volume attachment details.

    • AttachTime (datetime) --

      The time stamp when the attachment initiated.

    • Device (string) --

      The device name.

    • InstanceId (string) --

      The ID of the instance.

    • State (string) --

      The attachment state of the volume.

    • VolumeId (string) --

      The ID of the volume.

    • DeleteOnTermination (boolean) --

      Indicates whether the EBS volume is deleted on instance termination.

enable_io(**kwargs)

Enables I/O operations for a volume that had I/O operations disabled because the data on the volume was potentially inconsistent.

See also: AWS API Documentation

Request Syntax

response = volume.enable_io(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_volumes() to update the attributes of the Volume resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

volume.load()
Returns
None
modify_attribute(**kwargs)

Modifies a volume attribute.

By default, all I/O operations for the volume are suspended when the data on the volume is determined to be potentially inconsistent, to prevent undetectable, latent data corruption. The I/O access to the volume can be resumed by first enabling I/O access and then checking the data consistency on your volume.

You can change the default behavior to resume I/O operations. We recommend that you change this only for boot volumes or for volumes that are stateless or disposable.

See also: AWS API Documentation

Request Syntax

response = volume.modify_attribute(
    AutoEnableIO={
        'Value': True|False
    },
    DryRun=True|False
)
Parameters
  • AutoEnableIO (dict) --

    Indicates whether the volume should be auto-enabled for I/O operations.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

reload()

Calls EC2.Client.describe_volumes() to update the attributes of the Volume resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

volume.reload()
Returns
None

Collections

Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.

snapshots

A collection of Snapshot resources.A Snapshot Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Snapshot resources in the collection.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = volume.snapshots.all()
Return type
list(ec2.Snapshot)
Returns
A list of Snapshot resources
filter(**kwargs)

Creates an iterable of all Snapshot resources in the collection filtered by kwargs passed to method. A Snapshot collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = volume.snapshots.filter(
    MaxResults=123,
    NextToken='string',
    OwnerIds=[
        'string',
    ],
    RestorableByUserIds=[
        'string',
    ],
    SnapshotIds=[
        'string',
    ],
    DryRun=True|False
)
Parameters
  • MaxResults (integer) -- The maximum number of snapshot results returned by DescribeSnapshots in paginated output. When this parameter is used, DescribeSnapshots only returns MaxResults results in a single page along with a NextToken response element. The remaining results of the initial request can be seen by sending another DescribeSnapshots request with the returned NextToken value. This value can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned. If this parameter is not used, then DescribeSnapshots returns all results. You cannot specify this parameter and the snapshot IDs parameter in the same request.
  • NextToken (string) -- The NextToken value returned from a previous paginated DescribeSnapshots request where MaxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the NextToken value. This value is null when there are no more results to return.
  • OwnerIds (list) --

    Scopes the results to snapshots with the specified owners. You can specify a combination of Amazon Web Services account IDs, self , and amazon .

    • (string) --
  • RestorableByUserIds (list) --

    The IDs of the Amazon Web Services accounts that can create volumes from the snapshot.

    • (string) --
  • SnapshotIds (list) --

    The snapshot IDs.

    Default: Describes the snapshots for which you have create volume permissions.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

list(ec2.Snapshot)

Returns

A list of Snapshot resources

limit(**kwargs)

Creates an iterable up to a specified amount of Snapshot resources in the collection.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = volume.snapshots.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Snapshot)
Returns
A list of Snapshot resources
page_size(**kwargs)

Creates an iterable of all Snapshot resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

snapshot_iterator = volume.snapshots.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Snapshot)
Returns
A list of Snapshot resources

Vpc

class EC2.Vpc(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) Vpc:

import boto3

ec2 = boto3.resource('ec2')
vpc = ec2.Vpc('id')
Parameters
id (string) -- The Vpc's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

These are the resource's available collections:

These are the resource's available waiters:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The Vpc's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

cidr_block
  • (string) --

    The primary IPv4 CIDR block for the VPC.

cidr_block_association_set
  • (list) --

    Information about the IPv4 CIDR blocks associated with the VPC.

    • (dict) --

      Describes an IPv4 CIDR block associated with a VPC.

      • AssociationId (string) --

        The association ID for the IPv4 CIDR block.

      • CidrBlock (string) --

        The IPv4 CIDR block.

      • CidrBlockState (dict) --

        Information about the state of the CIDR block.

        • State (string) --

          The state of the CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

dhcp_options_id
  • (string) --

    The ID of the set of DHCP options you've associated with the VPC.

instance_tenancy
  • (string) --

    The allowed tenancy of instances launched into the VPC.

ipv6_cidr_block_association_set
  • (list) --

    Information about the IPv6 CIDR blocks associated with the VPC.

    • (dict) --

      Describes an IPv6 CIDR block associated with a VPC.

      • AssociationId (string) --

        The association ID for the IPv6 CIDR block.

      • Ipv6CidrBlock (string) --

        The IPv6 CIDR block.

      • Ipv6CidrBlockState (dict) --

        Information about the state of the CIDR block.

        • State (string) --

          The state of the CIDR block.

        • StatusMessage (string) --

          A message about the status of the CIDR block, if applicable.

      • NetworkBorderGroup (string) --

        The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses, for example, us-east-1-wl1-bos-wlz-1 .

      • Ipv6Pool (string) --

        The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.

is_default
  • (boolean) --

    Indicates whether the VPC is the default VPC.

owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the VPC.

state
  • (string) --

    The current state of the VPC.

tags
  • (list) --

    Any tags assigned to the VPC.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

vpc_id
  • (string) --

    The ID of the VPC.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

dhcp_options

(DhcpOptions) The related dhcp_options if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

associate_dhcp_options(**kwargs)

Associates a set of DHCP options (that you've previously created) with the specified VPC, or associates no DHCP options with the VPC.

After you associate the options with the VPC, any existing instances and all new instances that you launch in that VPC use the options. You don't need to restart or relaunch the instances. They automatically pick up the changes within a few hours, depending on how frequently the instance renews its DHCP lease. You can explicitly renew the lease using the operating system on the instance.

For more information, see DHCP options sets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.associate_dhcp_options(
    DhcpOptionsId='string',
    DryRun=True|False
)
Parameters
  • DhcpOptionsId (string) --

    [REQUIRED]

    The ID of the DHCP options set, or default to associate no DHCP options with the VPC.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Links an EC2-Classic instance to a ClassicLink-enabled VPC through one or more of the VPC's security groups. You cannot link an EC2-Classic instance to more than one VPC at a time. You can only link an instance that's in the running state. An instance is automatically unlinked from a VPC when it's stopped - you can link it to the VPC again when you restart it.

After you've linked an instance, you cannot change the VPC security groups that are associated with it. To change the security groups, you must first unlink the instance, and then link it again.

Linking your instance to a VPC is sometimes referred to as attaching your instance.

See also: AWS API Documentation

Request Syntax

response = vpc.attach_classic_link_instance(
    DryRun=True|False,
    Groups=[
        'string',
    ],
    InstanceId='string',

)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Groups (list) --

    [REQUIRED]

    The ID of one or more of the VPC's security groups. You cannot specify security groups from a different VPC.

    • (string) --
  • InstanceId (string) --

    [REQUIRED]

    The ID of an EC2-Classic instance to link to the ClassicLink-enabled VPC.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

attach_internet_gateway(**kwargs)

Attaches an internet gateway or a virtual private gateway to a VPC, enabling connectivity between the internet and the VPC. For more information about your VPC and internet gateway, see the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.attach_internet_gateway(
    DryRun=True|False,
    InternetGatewayId='string',

)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayId (string) --

    [REQUIRED]

    The ID of the internet gateway.

Returns

None

create_network_acl(**kwargs)

Creates a network ACL in a VPC. Network ACLs provide an optional layer of security (in addition to security groups) for the instances in your VPC.

For more information, see Network ACLs in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

network_acl = vpc.create_network_acl(
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to assign to the network ACL.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.NetworkAcl

Returns

NetworkAcl resource

create_route_table(**kwargs)

Creates a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet.

For more information, see Route tables in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

route_table = vpc.create_route_table(
    DryRun=True|False,
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • TagSpecifications (list) --

    The tags to assign to the route table.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.RouteTable

Returns

RouteTable resource

create_security_group(**kwargs)

Creates a security group.

A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. 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 .

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress , AuthorizeSecurityGroupEgress , RevokeSecurityGroupIngress , and RevokeSecurityGroupEgress .

For more information about VPC security group limits, see Amazon VPC Limits .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

security_group = vpc.create_security_group(
    Description='string',
    GroupName='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters
  • Description (string) --

    [REQUIRED]

    A description for the security group. This is informational only.

    Constraints: Up to 255 characters in length

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • GroupName (string) --

    [REQUIRED]

    The name of the security group.

    Constraints: Up to 255 characters in length. Cannot start with sg- .

    Constraints for EC2-Classic: ASCII characters

    Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

  • TagSpecifications (list) --

    The tags to assign to the security group.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

ec2.SecurityGroup

Returns

SecurityGroup resource

create_subnet(**kwargs)

Creates a subnet in a specified VPC.

You must specify an IPv4 CIDR block for the subnet. After you create a subnet, you can't change its CIDR block. The allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP addresses). The CIDR block must not overlap with the CIDR block of an existing subnet in the VPC.

If you've associated an IPv6 CIDR block with your VPC, you can create a subnet with an IPv6 CIDR block that uses a /64 prefix length.

Warning

Amazon Web Services reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for use.

If you add more than one subnet to a VPC, they're set up in a star topology with a logical router in the middle.

When you stop an instance in a subnet, it retains its private IPv4 address. It's therefore possible to have a subnet with no running instances (they're all stopped), but no remaining IP addresses available.

For more information about subnets, see Your VPC and subnets in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

subnet = vpc.create_subnet(
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    AvailabilityZone='string',
    AvailabilityZoneId='string',
    CidrBlock='string',
    Ipv6CidrBlock='string',
    OutpostArn='string',
    DryRun=True|False,
    Ipv6Native=True|False
)
Parameters
  • TagSpecifications (list) --

    The tags to assign to the subnet.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

  • AvailabilityZone (string) --

    The Availability Zone or Local Zone for the subnet.

    Default: Amazon Web Services selects one for you. If you create more than one subnet in your VPC, we do not necessarily select a different zone for each subnet.

    To create a subnet in a Local Zone, set this value to the Local Zone ID, for example us-west-2-lax-1a . For information about the Regions that support Local Zones, see Available Regions in the Amazon Elastic Compute Cloud User Guide .

    To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

  • AvailabilityZoneId (string) -- The AZ ID or the Local Zone ID of the subnet.
  • CidrBlock (string) --

    The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24 . We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .

    This parameter is not supported for an IPv6 only subnet.

  • Ipv6CidrBlock (string) --

    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length.

    This parameter is required for an IPv6 only subnet.

  • OutpostArn (string) -- The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, you must also specify the Availability Zone of the Outpost subnet.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Ipv6Native (boolean) -- Indicates whether to create an IPv6 only subnet.
Return type

ec2.Subnet

Returns

Subnet resource

create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

tag = vpc.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Return type

list(ec2.Tag)

Returns

A list of Tag resources

delete(**kwargs)

Deletes the specified VPC. You must detach or delete all gateways and resources that are associated with the VPC before you can delete it. For example, you must terminate all instances running in the VPC, delete all security groups associated with the VPC (except the default one), delete all route tables associated with the VPC (except the default one), and so on.

See also: AWS API Documentation

Request Syntax

response = vpc.delete(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
describe_attribute(**kwargs)

Describes the specified attribute of the specified VPC. You can specify only one attribute at a time.

See also: AWS API Documentation

Request Syntax

response = vpc.describe_attribute(
    Attribute='enableDnsSupport'|'enableDnsHostnames',
    DryRun=True|False
)
Parameters
  • Attribute (string) --

    [REQUIRED]

    The VPC attribute.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'VpcId': 'string',
    'EnableDnsHostnames': {
        'Value': True|False
    },
    'EnableDnsSupport': {
        'Value': True|False
    }
}

Response Structure

  • (dict) --

    • VpcId (string) --

      The ID of the VPC.

    • EnableDnsHostnames (dict) --

      Indicates whether the instances launched in the VPC get DNS hostnames. If this attribute is true , instances in the VPC get DNS hostnames; otherwise, they do not.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

    • EnableDnsSupport (dict) --

      Indicates whether DNS resolution is enabled for the VPC. If this attribute is true , the Amazon DNS server resolves DNS hostnames for your instances to their corresponding IP addresses; otherwise, it does not.

      • Value (boolean) --

        The attribute value. The valid values are true or false .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Unlinks (detaches) a linked EC2-Classic instance from a VPC. After the instance has been unlinked, the VPC security groups are no longer associated with it. An instance is automatically unlinked from a VPC when it's stopped.

See also: AWS API Documentation

Request Syntax

response = vpc.detach_classic_link_instance(
    DryRun=True|False,
    InstanceId='string',

)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InstanceId (string) --

    [REQUIRED]

    The ID of the instance to unlink from the VPC.

Return type

dict

Returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

detach_internet_gateway(**kwargs)

Detaches an internet gateway from a VPC, disabling connectivity between the internet and the VPC. The VPC must not contain any running instances with Elastic IP addresses or public IPv4 addresses.

See also: AWS API Documentation

Request Syntax

response = vpc.detach_internet_gateway(
    DryRun=True|False,
    InternetGatewayId='string',

)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayId (string) --

    [REQUIRED]

    The ID of the internet gateway.

Returns

None

Disables ClassicLink for a VPC. You cannot disable ClassicLink for a VPC that has EC2-Classic instances linked to it.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.disable_classic_link(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'Return': True|False
}

Response Structure

  • (dict) --
    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

Enables a VPC for ClassicLink. You can then link EC2-Classic instances to your ClassicLink-enabled VPC to allow communication over private IP addresses. You cannot enable your VPC for ClassicLink if any of your VPC route tables have existing routes for address ranges within the 10.0.0.0/8 IP address range, excluding local routes for VPCs in the 10.0.0.0/16 and 10.1.0.0/16 IP address ranges. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.enable_classic_link(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'Return': True|False
}

Response Structure

  • (dict) --
    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_vpcs() to update the attributes of the Vpc resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

vpc.load()
Returns
None
modify_attribute(**kwargs)

Modifies the specified attribute of the specified VPC.

See also: AWS API Documentation

Request Syntax

response = vpc.modify_attribute(
    EnableDnsHostnames={
        'Value': True|False
    },
    EnableDnsSupport={
        'Value': True|False
    },

)
Parameters
  • EnableDnsHostnames (dict) --

    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not.

    You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute. You can only enable DNS hostnames if you've enabled DNS support.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

  • EnableDnsSupport (dict) --

    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled.

    You cannot modify the DNS resolution and DNS hostnames attributes in the same request. Use separate requests for each attribute.

    • Value (boolean) --

      The attribute value. The valid values are true or false .

Returns

None

reload()

Calls EC2.Client.describe_vpcs() to update the attributes of the Vpc resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

vpc.reload()
Returns
None
request_vpc_peering_connection(**kwargs)

Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection. The accepter VPC can belong to another Amazon Web Services account and can be in a different Region to the requester VPC. The requester VPC and accepter VPC cannot have overlapping CIDR blocks.

Note

Limitations and rules apply to a VPC peering connection. For more information, see the limitations section in the VPC Peering Guide .

The owner of the accepter VPC must accept the peering request to activate the peering connection. The VPC peering connection request expires after 7 days, after which it cannot be accepted or rejected.

If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed .

See also: AWS API Documentation

Request Syntax

vpc_peering_connection = vpc.request_vpc_peering_connection(
    DryRun=True|False,
    PeerOwnerId='string',
    PeerVpcId='string',
    PeerRegion='string',
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'instance-event-window'|'internet-gateway'|'ipam'|'ipam-pool'|'ipam-scope'|'ipv4pool-ec2'|'ipv6pool-ec2'|'key-pair'|'launch-template'|'local-gateway'|'local-gateway-route-table'|'local-gateway-virtual-interface'|'local-gateway-virtual-interface-group'|'local-gateway-route-table-vpc-association'|'local-gateway-route-table-virtual-interface-group-association'|'natgateway'|'network-acl'|'network-interface'|'network-insights-analysis'|'network-insights-path'|'network-insights-access-scope'|'network-insights-access-scope-analysis'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'subnet-cidr-reservation'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-connect-peer'|'transit-gateway-multicast-domain'|'transit-gateway-policy-table'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-service'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • PeerOwnerId (string) --

    The Amazon Web Services account ID of the owner of the accepter VPC.

    Default: Your Amazon Web Services account ID

  • PeerVpcId (string) -- The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request.
  • PeerRegion (string) --

    The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.

    Default: The Region in which you make the request.

  • TagSpecifications (list) --

    The tags to assign to the peering connection.

    • (dict) --

      The tags to apply to a resource when the resource is being created.

      Note

      The Valid Values lists all the resource types that can be tagged. However, the action you're using might not support tagging all of these resource types. If you try to tag a resource type that is unsupported for the action you're using, you'll get an error.

      • ResourceType (string) --

        The type of resource to tag on creation.

      • Tags (list) --

        The tags to apply 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 256 Unicode characters.

Return type

ec2.VpcPeeringConnection

Returns

VpcPeeringConnection resource

Collections

Collections provide an interface to iterate over and manipulate groups of resources. For more information about collections refer to the Resources Introduction Guide.

accepted_vpc_peering_connections

A collection of VpcPeeringConnection resources.A VpcPeeringConnection Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all VpcPeeringConnection resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.all()
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
filter(**kwargs)

Creates an iterable of all VpcPeeringConnection resources in the collection filtered by kwargs passed to method. A VpcPeeringConnection collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.filter(
    DryRun=True|False,
    VpcPeeringConnectionIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionIds (list) --

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.VpcPeeringConnection)

Returns

A list of VpcPeeringConnection resources

limit(**kwargs)

Creates an iterable up to a specified amount of VpcPeeringConnection resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
page_size(**kwargs)

Creates an iterable of all VpcPeeringConnection resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.accepted_vpc_peering_connections.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
instances

A collection of Instance resources.A Instance Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = vpc.instances.all()
Return type
list(ec2.Instance)
Returns
A list of Instance resources
create_tags(**kwargs)

Adds or overwrites only the specified tags for the specified Amazon EC2 resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique per resource.

For more information about tags, see Tag your Amazon EC2 resources in the Amazon Elastic Compute Cloud User Guide . For more information about creating IAM policies that control users' access to resources based on tags, see Supported resource-level permissions for Amazon EC2 API actions in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.instances.create_tags(
    DryRun=True|False,
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Tags (list) --

    [REQUIRED]

    The tags. The value parameter is required, but if you don't want the tag to have a value, specify the parameter with no value, and we set the value to an empty string.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

Returns

None

filter(**kwargs)

Creates an iterable of all Instance resources in the collection filtered by kwargs passed to method. A Instance collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

instance_iterator = vpc.instances.filter(
    InstanceIds=[
        'string',
    ],
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
Parameters
  • InstanceIds (list) --

    The instance IDs.

    Default: Describes all your instances.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 5 and 1000. You cannot specify this parameter and the instance IDs parameter in the same call.
  • NextToken (string) -- The token to request the next page of results.
Return type

list(ec2.Instance)

Returns

A list of Instance resources

limit(**kwargs)

Creates an iterable up to a specified amount of Instance resources in the collection.

See also: AWS API Documentation

Request Syntax

instance_iterator = vpc.instances.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Instance)
Returns
A list of Instance resources
monitor(**kwargs)

Enables detailed monitoring for a running instance. Otherwise, basic monitoring is enabled. For more information, see Monitor your instances using CloudWatch in the Amazon EC2 User Guide .

To disable detailed monitoring, see UnmonitorInstances .

See also: AWS API Documentation

Request Syntax

response = vpc.instances.monitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

page_size(**kwargs)

Creates an iterable of all Instance resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

instance_iterator = vpc.instances.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Instance)
Returns
A list of Instance resources
reboot(**kwargs)

Requests a reboot of the specified instances. This operation is asynchronous; it only queues a request to reboot the specified instances. The operation succeeds if the instances are valid and belong to you. Requests to reboot terminated instances are ignored.

If an instance does not cleanly shut down within a few minutes, Amazon EC2 performs a hard reboot.

For more information about troubleshooting, see Troubleshoot an unreachable instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.instances.reboot(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns
None
start(**kwargs)

Starts an Amazon EBS-backed instance that you've previously stopped.

Instances that use Amazon EBS volumes as their root devices can be quickly stopped and started. When an instance is stopped, the compute resources are released and you are not billed for instance usage. However, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. You can restart your instance at any time. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Performing this operation on an instance that uses an instance store as its root device returns an error.

If you attempt to start a T3 instance with host tenancy and the unlimted CPU credit option, the request fails. The unlimited CPU credit option is not supported on Dedicated Hosts. Before you start the instance, either change its CPU credit option to standard , or change its tenancy to default or dedicated .

For more information, see Stop and start your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.instances.start(
    AdditionalInfo='string',
    DryRun=True|False
)
Parameters
  • AdditionalInfo (string) -- Reserved.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type

dict

Returns

Response Syntax

{
    'StartingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StartingInstances (list) --

      Information about the started instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

stop(**kwargs)

Stops an Amazon EBS-backed instance. For more information, see Stop and start your instance in the Amazon EC2 User Guide .

You can use the Stop action to hibernate an instance if the instance is enabled for hibernation and it meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon EC2 User Guide .

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

You can't stop or hibernate instance store-backed instances. You can't use the Stop action to hibernate Spot Instances, but you can specify that Amazon EC2 should hibernate Spot Instances when they are interrupted. For more information, see Hibernating interrupted Spot Instances in the Amazon EC2 User Guide .

When you stop or hibernate an instance, we shut it down. You can restart your instance at any time. Before stopping or hibernating an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM, but hibernating an instance does preserve data stored in RAM. If an instance cannot hibernate successfully, a normal shutdown occurs.

Stopping and hibernating an instance is different to rebooting or terminating it. For example, when you stop or hibernate an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, hibernating, and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshoot stopping your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.instances.stop(
    Hibernate=True|False,
    DryRun=True|False,
    Force=True|False
)
Parameters
  • Hibernate (boolean) --

    Hibernates the instance if the instance was enabled for hibernation at launch. If the instance cannot hibernate successfully, a normal shutdown occurs. For more information, see Hibernate your instance in the Amazon EC2 User Guide .

    Default: false

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • Force (boolean) --

    Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances.

    Default: false

Return type

dict

Returns

Response Syntax

{
    'StoppingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • StoppingInstances (list) --

      Information about the stopped instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

terminate(**kwargs)

Shuts down the specified instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

If you terminate multiple instances across multiple Availability Zones, and one or more of the specified instances are enabled for termination protection, the request fails with the following results:

  • The specified instances that are in the same Availability Zone as the protected instance are not terminated.
  • The specified instances that are in different Availability Zones, where no other specified instances are protected, are successfully terminated.

For example, say you have the following instances:

  • Instance A: us-east-1a ; Not protected
  • Instance B: us-east-1a ; Not protected
  • Instance C: us-east-1b ; Protected
  • Instance D: us-east-1b ; not protected

If you attempt to terminate all of these instances in the same request, the request reports failure with the following results:

  • Instance A and Instance B are successfully terminated because none of the specified instances in us-east-1a are enabled for termination protection.
  • Instance C and Instance D fail to terminate because at least one of the specified instances in us-east-1b (Instance C) is enabled for termination protection.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance lifecycle in the Amazon EC2 User Guide .

For more information about troubleshooting, see Troubleshooting terminating your instance in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.instances.terminate(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'TerminatingInstances': [
        {
            'CurrentState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            },
            'InstanceId': 'string',
            'PreviousState': {
                'Code': 123,
                'Name': 'pending'|'running'|'shutting-down'|'terminated'|'stopping'|'stopped'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • TerminatingInstances (list) --

      Information about the terminated instances.

      • (dict) --

        Describes an instance state change.

        • CurrentState (dict) --

          The current state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

        • InstanceId (string) --

          The ID of the instance.

        • PreviousState (dict) --

          The previous state of the instance.

          • Code (integer) --

            The state of the instance as a 16-bit unsigned integer.

            The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.

            The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.

            The valid values for instance-state-code will all be in the range of the low byte and they are:

            • 0 : pending
            • 16 : running
            • 32 : shutting-down
            • 48 : terminated
            • 64 : stopping
            • 80 : stopped

            You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.

          • Name (string) --

            The current state of the instance.

unmonitor(**kwargs)

Disables detailed monitoring for a running instance. For more information, see Monitoring your instances and volumes in the Amazon EC2 User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc.instances.unmonitor(
    DryRun=True|False
)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'InstanceMonitorings': [
        {
            'InstanceId': 'string',
            'Monitoring': {
                'State': 'disabled'|'disabling'|'enabled'|'pending'
            }
        },
    ]
}

Response Structure

  • (dict) --
    • InstanceMonitorings (list) --

      The monitoring information.

      • (dict) --

        Describes the monitoring of an instance.

        • InstanceId (string) --

          The ID of the instance.

        • Monitoring (dict) --

          The monitoring for the instance.

          • State (string) --

            Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

internet_gateways

A collection of InternetGateway resources.A InternetGateway Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all InternetGateway resources in the collection.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = vpc.internet_gateways.all()
Return type
list(ec2.InternetGateway)
Returns
A list of InternetGateway resources
filter(**kwargs)

Creates an iterable of all InternetGateway resources in the collection filtered by kwargs passed to method. A InternetGateway collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = vpc.internet_gateways.filter(
    DryRun=True|False,
    InternetGatewayIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • InternetGatewayIds (list) --

    One or more internet gateway IDs.

    Default: Describes all your internet gateways.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.InternetGateway)

Returns

A list of InternetGateway resources

limit(**kwargs)

Creates an iterable up to a specified amount of InternetGateway resources in the collection.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = vpc.internet_gateways.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.InternetGateway)
Returns
A list of InternetGateway resources
page_size(**kwargs)

Creates an iterable of all InternetGateway resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

internet_gateway_iterator = vpc.internet_gateways.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.InternetGateway)
Returns
A list of InternetGateway resources
network_acls

A collection of NetworkAcl resources.A NetworkAcl Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all NetworkAcl resources in the collection.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = vpc.network_acls.all()
Return type
list(ec2.NetworkAcl)
Returns
A list of NetworkAcl resources
filter(**kwargs)

Creates an iterable of all NetworkAcl resources in the collection filtered by kwargs passed to method. A NetworkAcl collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = vpc.network_acls.filter(
    DryRun=True|False,
    NetworkAclIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkAclIds (list) --

    One or more network ACL IDs.

    Default: Describes all your network ACLs.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.NetworkAcl)

Returns

A list of NetworkAcl resources

limit(**kwargs)

Creates an iterable up to a specified amount of NetworkAcl resources in the collection.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = vpc.network_acls.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.NetworkAcl)
Returns
A list of NetworkAcl resources
page_size(**kwargs)

Creates an iterable of all NetworkAcl resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

network_acl_iterator = vpc.network_acls.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.NetworkAcl)
Returns
A list of NetworkAcl resources
network_interfaces

A collection of NetworkInterface resources.A NetworkInterface Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all NetworkInterface resources in the collection.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = vpc.network_interfaces.all()
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
filter(**kwargs)

Creates an iterable of all NetworkInterface resources in the collection filtered by kwargs passed to method. A NetworkInterface collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = vpc.network_interfaces.filter(
    DryRun=True|False,
    NetworkInterfaceIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceIds (list) --

    One or more network interface IDs.

    Default: Describes all your network interfaces.

    • (string) --
  • NextToken (string) -- The token to retrieve the next page of results.
  • MaxResults (integer) -- The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results. You cannot specify this parameter and the network interface IDs parameter in the same request.
Return type

list(ec2.NetworkInterface)

Returns

A list of NetworkInterface resources

limit(**kwargs)

Creates an iterable up to a specified amount of NetworkInterface resources in the collection.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = vpc.network_interfaces.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
page_size(**kwargs)

Creates an iterable of all NetworkInterface resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

network_interface_iterator = vpc.network_interfaces.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.NetworkInterface)
Returns
A list of NetworkInterface resources
requested_vpc_peering_connections

A collection of VpcPeeringConnection resources.A VpcPeeringConnection Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all VpcPeeringConnection resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.all()
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
filter(**kwargs)

Creates an iterable of all VpcPeeringConnection resources in the collection filtered by kwargs passed to method. A VpcPeeringConnection collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.filter(
    DryRun=True|False,
    VpcPeeringConnectionIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • VpcPeeringConnectionIds (list) --

    One or more VPC peering connection IDs.

    Default: Describes all your VPC peering connections.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.VpcPeeringConnection)

Returns

A list of VpcPeeringConnection resources

limit(**kwargs)

Creates an iterable up to a specified amount of VpcPeeringConnection resources in the collection.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
page_size(**kwargs)

Creates an iterable of all VpcPeeringConnection resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection_iterator = vpc.requested_vpc_peering_connections.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.VpcPeeringConnection)
Returns
A list of VpcPeeringConnection resources
route_tables

A collection of RouteTable resources.A RouteTable Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all RouteTable resources in the collection.

See also: AWS API Documentation

Request Syntax

route_table_iterator = vpc.route_tables.all()
Return type
list(ec2.RouteTable)
Returns
A list of RouteTable resources
filter(**kwargs)

Creates an iterable of all RouteTable resources in the collection filtered by kwargs passed to method. A RouteTable collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

route_table_iterator = vpc.route_tables.filter(
    DryRun=True|False,
    RouteTableIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
Parameters
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • RouteTableIds (list) --

    One or more route table IDs.

    Default: Describes all your route tables.

    • (string) --
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.RouteTable)

Returns

A list of RouteTable resources

limit(**kwargs)

Creates an iterable up to a specified amount of RouteTable resources in the collection.

See also: AWS API Documentation

Request Syntax

route_table_iterator = vpc.route_tables.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.RouteTable)
Returns
A list of RouteTable resources
page_size(**kwargs)

Creates an iterable of all RouteTable resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

route_table_iterator = vpc.route_tables.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.RouteTable)
Returns
A list of RouteTable resources
security_groups

A collection of SecurityGroup resources.A SecurityGroup Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all SecurityGroup resources in the collection.

See also: AWS API Documentation

Request Syntax

security_group_iterator = vpc.security_groups.all()
Return type
list(ec2.SecurityGroup)
Returns
A list of SecurityGroup resources
filter(**kwargs)

Creates an iterable of all SecurityGroup resources in the collection filtered by kwargs passed to method. A SecurityGroup collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

security_group_iterator = vpc.security_groups.filter(
    GroupIds=[
        'string',
    ],
    GroupNames=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • GroupIds (list) --

    The IDs of the security groups. Required for security groups in a nondefault VPC.

    Default: Describes all of your security groups.

    • (string) --
  • GroupNames (list) --

    [EC2-Classic and default VPC only] The names of the security groups. 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 of your security groups.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token to request the next page of results.
  • MaxResults (integer) -- The maximum number of results to return in a single call. To retrieve the remaining results, make another request with the returned NextToken value. This value can be between 5 and 1000. If this parameter is not specified, then all results are returned.
Return type

list(ec2.SecurityGroup)

Returns

A list of SecurityGroup resources

limit(**kwargs)

Creates an iterable up to a specified amount of SecurityGroup resources in the collection.

See also: AWS API Documentation

Request Syntax

security_group_iterator = vpc.security_groups.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.SecurityGroup)
Returns
A list of SecurityGroup resources
page_size(**kwargs)

Creates an iterable of all SecurityGroup resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

security_group_iterator = vpc.security_groups.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.SecurityGroup)
Returns
A list of SecurityGroup resources
subnets

A collection of Subnet resources.A Subnet Collection will include all resources by default, and extreme caution should be taken when performing actions on all resources.

all()

Creates an iterable of all Subnet resources in the collection.

See also: AWS API Documentation

Request Syntax

subnet_iterator = vpc.subnets.all()
Return type
list(ec2.Subnet)
Returns
A list of Subnet resources
filter(**kwargs)

Creates an iterable of all Subnet resources in the collection filtered by kwargs passed to method. A Subnet collection will include all resources by default if no filters are provided, and extreme caution should be taken when performing actions on all resources.

See also: AWS API Documentation

Request Syntax

subnet_iterator = vpc.subnets.filter(
    SubnetIds=[
        'string',
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • SubnetIds (list) --

    One or more subnet IDs.

    Default: Describes all your subnets.

    • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

list(ec2.Subnet)

Returns

A list of Subnet resources

limit(**kwargs)

Creates an iterable up to a specified amount of Subnet resources in the collection.

See also: AWS API Documentation

Request Syntax

subnet_iterator = vpc.subnets.limit(
    count=123
)
Parameters
count (integer) -- The limit to the number of resources in the iterable.
Return type
list(ec2.Subnet)
Returns
A list of Subnet resources
page_size(**kwargs)

Creates an iterable of all Subnet resources in the collection, but limits the number of items returned by each service call by the specified amount.

See also: AWS API Documentation

Request Syntax

subnet_iterator = vpc.subnets.page_size(
    count=123
)
Parameters
count (integer) -- The number of items returned by each service call
Return type
list(ec2.Subnet)
Returns
A list of Subnet resources

Waiters

Waiters provide an interface to wait for a resource to reach a specific state. For more information about waiters refer to the Resources Introduction Guide.

wait_until_available(**kwargs)

Waits until this Vpc is available. This method calls EC2.Waiter.vpc_available.wait() which polls. EC2.Client.describe_vpcs() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

vpc.wait_until_available(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28 ).
    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
    • dhcp-options-id - The ID of a set of DHCP options.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.
    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
    • is-default - Indicates whether the VPC is the default VPC.
    • owner-id - The ID of the Amazon Web Services account that owns the VPC.
    • state - The state of the VPC (pending | available ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Returns

None

wait_until_exists(**kwargs)

Waits until this Vpc is exists. This method calls EC2.Waiter.vpc_exists.wait() which polls. EC2.Client.describe_vpcs() every 1 seconds until a successful state is reached. An error is returned after 5 failed checks.

See also: AWS API Documentation

Request Syntax

vpc.wait_until_exists(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify must exactly match the VPC's CIDR block for information to be returned for the VPC. Must contain the slash followed by one or two digits (for example, /28 ).
    • cidr-block-association.cidr-block - An IPv4 CIDR block associated with the VPC.
    • cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the VPC.
    • cidr-block-association.state - The state of an IPv4 CIDR block associated with the VPC.
    • dhcp-options-id - The ID of a set of DHCP options.
    • ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated.
    • ipv6-cidr-block-association.association-id - The association ID for an IPv6 CIDR block associated with the VPC.
    • ipv6-cidr-block-association.state - The state of an IPv6 CIDR block associated with the VPC.
    • is-default - Indicates whether the VPC is the default VPC.
    • owner-id - The ID of the Amazon Web Services account that owns the VPC.
    • state - The state of the VPC (pending | available ).
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-id - The ID of the VPC.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Returns

None

VpcPeeringConnection

class EC2.VpcPeeringConnection(id)

A resource representing an Amazon Elastic Compute Cloud (EC2) VpcPeeringConnection:

import boto3

ec2 = boto3.resource('ec2')
vpc_peering_connection = ec2.VpcPeeringConnection('id')
Parameters
id (string) -- The VpcPeeringConnection's id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

These are the resource's available waiters:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

id

(string) The VpcPeeringConnection's id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

accepter_vpc_info
  • (dict) --

    Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

    • CidrBlock (string) --

      The IPv4 CIDR block for the VPC.

    • Ipv6CidrBlockSet (list) --

      The IPv6 CIDR block for the VPC.

      • (dict) --

        Describes an IPv6 CIDR block.

        • Ipv6CidrBlock (string) --

          The IPv6 CIDR block.

    • CidrBlockSet (list) --

      Information about the IPv4 CIDR blocks for the VPC.

      • (dict) --

        Describes an IPv4 CIDR block.

        • CidrBlock (string) --

          The IPv4 CIDR block.

    • OwnerId (string) --

      The ID of the Amazon Web Services account that owns the VPC.

    • PeeringOptions (dict) --

      Information about the VPC peering connection options for the accepter or requester VPC.

      • AllowDnsResolutionFromRemoteVpc (boolean) --

        Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

      • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

        Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

      • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

        Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

    • VpcId (string) --

      The ID of the VPC.

    • Region (string) --

      The Region in which the VPC is located.

expiration_time
  • (datetime) --

    The time that an unaccepted VPC peering connection will expire.

requester_vpc_info
  • (dict) --

    Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

    • CidrBlock (string) --

      The IPv4 CIDR block for the VPC.

    • Ipv6CidrBlockSet (list) --

      The IPv6 CIDR block for the VPC.

      • (dict) --

        Describes an IPv6 CIDR block.

        • Ipv6CidrBlock (string) --

          The IPv6 CIDR block.

    • CidrBlockSet (list) --

      Information about the IPv4 CIDR blocks for the VPC.

      • (dict) --

        Describes an IPv4 CIDR block.

        • CidrBlock (string) --

          The IPv4 CIDR block.

    • OwnerId (string) --

      The ID of the Amazon Web Services account that owns the VPC.

    • PeeringOptions (dict) --

      Information about the VPC peering connection options for the accepter or requester VPC.

      • AllowDnsResolutionFromRemoteVpc (boolean) --

        Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

      • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

        Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

      • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

        Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

    • VpcId (string) --

      The ID of the VPC.

    • Region (string) --

      The Region in which the VPC is located.

status
  • (dict) --

    The status of the VPC peering connection.

    • Code (string) --

      The status of the VPC peering connection.

    • Message (string) --

      A message that provides more information about the status, if applicable.

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 256 Unicode characters.

vpc_peering_connection_id
  • (string) --

    The ID of the VPC peering connection.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

accepter_vpc

(Vpc) The related accepter_vpc if set, otherwise None.

requester_vpc

(Vpc) The related requester_vpc if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

accept(**kwargs)

Accept a VPC peering connection request. To accept a request, the VPC peering connection must be in the pending-acceptance state, and you must be the owner of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC peering connection requests.

For an inter-Region VPC peering connection request, you must accept the VPC peering connection in the Region of the accepter VPC.

See also: AWS API Documentation

Request Syntax

response = vpc_peering_connection.accept(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'VpcPeeringConnection': {
        'AccepterVpcInfo': {
            'CidrBlock': 'string',
            'Ipv6CidrBlockSet': [
                {
                    'Ipv6CidrBlock': 'string'
                },
            ],
            'CidrBlockSet': [
                {
                    'CidrBlock': 'string'
                },
            ],
            'OwnerId': 'string',
            'PeeringOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            },
            'VpcId': 'string',
            'Region': 'string'
        },
        'ExpirationTime': datetime(2015, 1, 1),
        'RequesterVpcInfo': {
            'CidrBlock': 'string',
            'Ipv6CidrBlockSet': [
                {
                    'Ipv6CidrBlock': 'string'
                },
            ],
            'CidrBlockSet': [
                {
                    'CidrBlock': 'string'
                },
            ],
            'OwnerId': 'string',
            'PeeringOptions': {
                'AllowDnsResolutionFromRemoteVpc': True|False,
                'AllowEgressFromLocalClassicLinkToRemoteVpc': True|False,
                'AllowEgressFromLocalVpcToRemoteClassicLink': True|False
            },
            'VpcId': 'string',
            'Region': 'string'
        },
        'Status': {
            'Code': 'initiating-request'|'pending-acceptance'|'active'|'deleted'|'rejected'|'failed'|'expired'|'provisioning'|'deleting',
            'Message': 'string'
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VpcPeeringConnectionId': 'string'
    }
}

Response Structure

  • (dict) --
    • VpcPeeringConnection (dict) --

      Information about the VPC peering connection.

      • AccepterVpcInfo (dict) --

        Information about the accepter VPC. CIDR block information is only returned when describing an active VPC peering connection.

        • CidrBlock (string) --

          The IPv4 CIDR block for the VPC.

        • Ipv6CidrBlockSet (list) --

          The IPv6 CIDR block for the VPC.

          • (dict) --

            Describes an IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

        • CidrBlockSet (list) --

          Information about the IPv4 CIDR blocks for the VPC.

          • (dict) --

            Describes an IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • PeeringOptions (dict) --

          Information about the VPC peering connection options for the accepter or requester VPC.

          • AllowDnsResolutionFromRemoteVpc (boolean) --

            Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

            Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

            Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

        • VpcId (string) --

          The ID of the VPC.

        • Region (string) --

          The Region in which the VPC is located.

      • ExpirationTime (datetime) --

        The time that an unaccepted VPC peering connection will expire.

      • RequesterVpcInfo (dict) --

        Information about the requester VPC. CIDR block information is only returned when describing an active VPC peering connection.

        • CidrBlock (string) --

          The IPv4 CIDR block for the VPC.

        • Ipv6CidrBlockSet (list) --

          The IPv6 CIDR block for the VPC.

          • (dict) --

            Describes an IPv6 CIDR block.

            • Ipv6CidrBlock (string) --

              The IPv6 CIDR block.

        • CidrBlockSet (list) --

          Information about the IPv4 CIDR blocks for the VPC.

          • (dict) --

            Describes an IPv4 CIDR block.

            • CidrBlock (string) --

              The IPv4 CIDR block.

        • OwnerId (string) --

          The ID of the Amazon Web Services account that owns the VPC.

        • PeeringOptions (dict) --

          Information about the VPC peering connection options for the accepter or requester VPC.

          • AllowDnsResolutionFromRemoteVpc (boolean) --

            Indicates whether a local VPC can resolve public DNS hostnames to private IP addresses when queried from instances in a peer VPC.

          • AllowEgressFromLocalClassicLinkToRemoteVpc (boolean) --

            Indicates whether a local ClassicLink connection can communicate with the peer VPC over the VPC peering connection.

          • AllowEgressFromLocalVpcToRemoteClassicLink (boolean) --

            Indicates whether a local VPC can communicate with a ClassicLink connection in the peer VPC over the VPC peering connection.

        • VpcId (string) --

          The ID of the VPC.

        • Region (string) --

          The Region in which the VPC is located.

      • Status (dict) --

        The status of the VPC peering connection.

        • Code (string) --

          The status of the VPC peering connection.

        • Message (string) --

          A message that provides more information about the status, if applicable.

      • 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 256 Unicode characters.

      • VpcPeeringConnectionId (string) --

        The ID of the VPC peering connection.

delete(**kwargs)

Deletes a VPC peering connection. Either the owner of the requester VPC or the owner of the accepter VPC can delete the VPC peering connection if it's in the active state. The owner of the requester VPC can delete a VPC peering connection in the pending-acceptance state. You cannot delete a VPC peering connection that's in the failed state.

See also: AWS API Documentation

Request Syntax

response = vpc_peering_connection.delete(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'Return': True|False
}

Response Structure

  • (dict) --
    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_vpc_peering_connections() to update the attributes of the VpcPeeringConnection resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection.load()
Returns
None
reject(**kwargs)

Rejects a VPC peering connection request. The VPC peering connection must be in the pending-acceptance state. Use the DescribeVpcPeeringConnections request to view your outstanding VPC peering connection requests. To delete an active VPC peering connection, or to delete a VPC peering connection request that you initiated, use DeleteVpcPeeringConnection .

See also: AWS API Documentation

Request Syntax

response = vpc_peering_connection.reject(
    DryRun=True|False,

)
Parameters
DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Return type
dict
Returns
Response Syntax
{
    'Return': True|False
}

Response Structure

  • (dict) --
    • Return (boolean) --

      Returns true if the request succeeds; otherwise, it returns an error.

reload()

Calls EC2.Client.describe_vpc_peering_connections() to update the attributes of the VpcPeeringConnection resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection.reload()
Returns
None

Waiters

Waiters provide an interface to wait for a resource to reach a specific state. For more information about waiters refer to the Resources Introduction Guide.

wait_until_exists(**kwargs)

Waits until this VpcPeeringConnection is exists. This method calls EC2.Waiter.vpc_peering_connection_exists.wait() which polls. EC2.Client.describe_vpc_peering_connections() every 15 seconds until a successful state is reached. An error is returned after 40 failed checks.

See also: AWS API Documentation

Request Syntax

vpc_peering_connection.wait_until_exists(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    DryRun=True|False,
    NextToken='string',
    MaxResults=123
)
Parameters
  • Filters (list) --

    One or more filters.

    • accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC.
    • accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the accepter VPC.
    • accepter-vpc-info.vpc-id - The ID of the accepter VPC.
    • expiration-time - The expiration date and time for the VPC peering connection.
    • requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC.
    • requester-vpc-info.owner-id - The ID of the Amazon Web Services account that owns the requester VPC.
    • requester-vpc-info.vpc-id - The ID of the requester VPC.
    • status-code - The status of the VPC peering connection (pending-acceptance | failed | expired | provisioning | active | deleting | deleted | rejected ).
    • status-message - A message that provides more information about the status of the VPC peering connection, if applicable.
    • tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.
    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
    • vpc-peering-connection-id - The ID of the VPC peering connection.
    • (dict) --

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

      If you specify multiple filters, the filters are joined with an AND , and the request returns only results that match all of the specified filters.

      • Name (string) --

        The name of the filter. Filter names are case-sensitive.

      • Values (list) --

        The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR , and the request returns all results that match any of the specified values.

        • (string) --
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NextToken (string) -- The token for the next page of results.
  • MaxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Returns

None

VpcAddress

class EC2.VpcAddress(allocation_id)

A resource representing an Amazon Elastic Compute Cloud (EC2) VpcAddress:

import boto3

ec2 = boto3.resource('ec2')
vpc_address = ec2.VpcAddress('allocation_id')
Parameters
allocation_id (string) -- The VpcAddress's allocation_id identifier. This must be set.

These are the resource's available identifiers:

These are the resource's available attributes:

These are the resource's available references:

These are the resource's available actions:

Identifiers

Identifiers are properties of a resource that are set upon instantiation of the resource. For more information about identifiers refer to the Resources Introduction Guide.

allocation_id

(string) The VpcAddress's allocation_id identifier. This must be set.

Attributes

Attributes provide access to the properties of a resource. Attributes are lazy-loaded the first time one is accessed via the load() method. For more information about attributes refer to the Resources Introduction Guide.

association_id
  • (string) --

    The ID representing the association of the address with an instance in a VPC.

carrier_ip
  • (string) --

    The carrier IP address associated. This option is only available for network interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 instance).

customer_owned_ip
  • (string) --

    The customer-owned IP address.

customer_owned_ipv4_pool
  • (string) --

    The ID of the customer-owned address pool.

domain
  • (string) --

    Indicates whether this Elastic IP address is for use with instances in EC2-Classic (standard ) or instances in a VPC (vpc ).

instance_id
  • (string) --

    The ID of the instance that the address is associated with (if any).

network_border_group
  • (string) --

    The name of the unique set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

network_interface_id
  • (string) --

    The ID of the network interface.

network_interface_owner_id
  • (string) --

    The ID of the Amazon Web Services account that owns the network interface.

private_ip_address
  • (string) --

    The private IP address associated with the Elastic IP address.

public_ip
  • (string) --

    The Elastic IP address.

public_ipv4_pool
  • (string) --

    The ID of an address pool.

tags
  • (list) --

    Any tags assigned to the Elastic IP address.

    • (dict) --

      Describes a tag.

      • Key (string) --

        The key of the tag.

        Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode characters. May not begin with aws: .

      • Value (string) --

        The value of the tag.

        Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.

References

References are related resource instances that have a belongs-to relationship. For more information about references refer to the Resources Introduction Guide.

association

(NetworkInterfaceAssociation) The related association if set, otherwise None.

Actions

Actions call operations on resources. They may automatically handle the passing in of arguments set from identifiers and some attributes. For more information about actions refer to the Resources Introduction Guide.

associate(**kwargs)

Associates an Elastic IP address, or carrier IP address (for instances that are in subnets in Wavelength Zones) with an instance or a network interface. Before you can use an Elastic IP address, you must allocate it to your account.

An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

[EC2-Classic, VPC in an EC2-VPC-only account] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance. If you associate an Elastic IP address with an instance that has an existing Elastic IP address, the existing address is disassociated from the instance, but remains allocated to your account.

[VPC in an EC2-Classic account] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation. You cannot associate an Elastic IP address with an instance or network interface that has an existing Elastic IP address.

[Subnets in Wavelength Zones] You can associate an IP address from the telecommunication carrier to the instance or network interface.

You cannot associate an Elastic IP address with an interface in a different network border group.

Warning

This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error, and you may be charged for each time the Elastic IP address is remapped to the same instance. For more information, see the Elastic IP Addresses section of Amazon EC2 Pricing .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc_address.associate(
    InstanceId='string',
    PublicIp='string',
    AllowReassociation=True|False,
    DryRun=True|False,
    NetworkInterfaceId='string',
    PrivateIpAddress='string'
)
Parameters
  • InstanceId (string) -- The ID of the instance. The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.
  • PublicIp (string) -- [EC2-Classic] The Elastic IP address to associate with the instance. This is required for EC2-Classic.
  • AllowReassociation (boolean) -- [EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.
  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • NetworkInterfaceId (string) --

    [EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.

    For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.

  • PrivateIpAddress (string) -- [EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.
Return type

dict

Returns

Response Syntax

{
    'AssociationId': 'string'
}

Response Structure

  • (dict) --

    • AssociationId (string) --

      [EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.

get_available_subresources()

Returns a list of all the available sub-resources for this Resource.

Returns
A list containing the name of each sub-resource for this resource
Return type
list of str
load()

Calls EC2.Client.describe_addresses() to update the attributes of the VpcAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

vpc_address.load()
Returns
None
release(**kwargs)

Releases the specified Elastic IP address.

[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use DisassociateAddress .

Note

We are retiring EC2-Classic on August 15, 2022. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

[Nondefault VPC] You must use DisassociateAddress to disassociate the Elastic IP address before you can release it. Otherwise, Amazon EC2 returns an error (InvalidIPAddress.InUse ).

After releasing an Elastic IP address, it is released to the IP address pool. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another Amazon Web Services account.

[EC2-VPC] After you release an Elastic IP address for use in a VPC, you might be able to recover it. For more information, see AllocateAddress .

For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = vpc_address.release(
    PublicIp='string',
    NetworkBorderGroup='string',
    DryRun=True|False
)
Parameters
  • PublicIp (string) -- [EC2-Classic] The Elastic IP address. Required for EC2-Classic.
  • NetworkBorderGroup (string) --

    The set of Availability Zones, Local Zones, or Wavelength Zones from which Amazon Web Services advertises IP addresses.

    If you provide an incorrect network border group, you receive an InvalidAddress.NotFound error.

    You cannot use a network border group with EC2 Classic. If you attempt this operation on EC2 classic, you receive an InvalidParameterCombination error.

  • DryRun (boolean) -- Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
Returns

None

reload()

Calls EC2.Client.describe_addresses() to update the attributes of the VpcAddress resource. Note that the load and reload methods are the same method and can be used interchangeably.

See also: AWS API Documentation

Request Syntax

vpc_address.reload()
Returns
None