Amazon Elastic Compute Cloud

2026/11/20 - Amazon Elastic Compute Cloud - 14 updated api methods

Changes  This release adds documentation for the T9g instance family to the EC2 ModifyDefaultCreditSpecification and GetDefaultCreditSpecification APIs, adds the disable-complete state for IPAM routing policy registrations, and adds Network Firewall automated Internet firewall API changes.

CreateDefaultSubnet (updated) Link ¶
Changes (response)
{'Subnet': {'NetworkFirewallConnectivityType': 'flexible | outbound-only | '
                                               'bidirectional | exclude | '
                                               'az-unsupported'}}

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 Create a default subnet in the Amazon VPC User Guide.

See also: AWS API Documentation

Request Syntax

client.create_default_subnet(
    AvailabilityZone='string',
    DryRun=True|False,
    Ipv6Native=True|False,
    AvailabilityZoneId='string'
)
type AvailabilityZone:

string

param AvailabilityZone:

The Availability Zone in which to create the default subnet.

Either AvailabilityZone or AvailabilityZoneId must be specified, but not both.

type DryRun:

boolean

param DryRun:

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

type Ipv6Native:

boolean

param Ipv6Native:

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.

type AvailabilityZoneId:

string

param AvailabilityZoneId:

The ID of the Availability Zone.

Either AvailabilityZone or AvailabilityZoneId must be specified, but not both.

rtype:

dict

returns:

Response Syntax

{
    'Subnet': {
        'AvailabilityZoneId': 'string',
        'EnableLniAtDeviceIndex': 123,
        'MapCustomerOwnedIpOnLaunch': True|False,
        'CustomerOwnedIpv4Pool': 'string',
        'OwnerId': 'string',
        'AssignIpv6AddressOnCreation': True|False,
        'Ipv6CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                },
                'Ipv6AddressAttribute': 'public'|'private',
                'IpSource': 'amazon'|'byoip'|'none'
            },
        ],
        '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
        },
        'BlockPublicAccessStates': {
            'InternetGatewayBlockMode': 'off'|'block-bidirectional'|'block-ingress'
        },
        'Type': 'string',
        'NetworkFirewallConnectivityType': 'flexible'|'outbound-only'|'bidirectional'|'exclude'|'az-unsupported',
        'SubnetId': 'string',
        'State': 'pending'|'available'|'unavailable'|'failed'|'failed-insufficient-capacity',
        'VpcId': 'string',
        'CidrBlock': 'string',
        'AvailableIpAddressCount': 123,
        'AvailabilityZone': 'string',
        'DefaultForAz': True|False,
        'MapPublicIpOnLaunch': True|False
    }
}

Response Structure

  • (dict) --

    • Subnet (dict) --

      Information about the subnet.

      • AvailabilityZoneId (string) --

        The AZ ID of the subnet.

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

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

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

          • Ipv6AddressAttribute (string) --

            Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

          • IpSource (string) --

            The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

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

      • BlockPublicAccessStates (dict) --

        The state of VPC Block Public Access (BPA).

        • InternetGatewayBlockMode (string) --

          The mode of VPC BPA.

          • off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region.

          • block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets).

          • block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.

      • Type (string) --

        Indicates if this is a subnet used with Amazon Elastic VMware Service (EVS). Possible values are Elastic VMware Service or no value. For more information about Amazon EVS, see Amazon Elastic VMware Service API Reference.

      • NetworkFirewallConnectivityType (string) --

        The internet connectivity treatment that the Automated Internet Firewall applies to the subnet. The response includes this value only if the subnet is in a VPC that has a firewall. Possible values:

        • az-unsupported: The firewall doesn't support the subnet's Availability Zone, so it doesn't inspect traffic for the subnet.

        • bidirectional: Provides bidirectional internet connectivity to every network interface that has a public IP association. Any network interface without a public IP cannot communicate with the internet unless a NAT device is explicitly inserted in the path. All inbound and outbound traffic is inspected against your firewall rules.

        • exclude: The firewall doesn't inspect traffic for the subnet. The subnet bypasses the firewall, and its traffic passes directly through the internet gateway.

        • flexible: Sets the connectivity for each network interface in the subnet based on whether it is associated with a public IP address. A network interface with a public IP address gets bidirectional internet connectivity. A network interface without a public IP address gets outbound-only connectivity. All traffic is inspected against your firewall rules.

        • outbound-only: Provides egress-only connectivity for all network interfaces in the subnet. All outbound traffic and inbound responses are inspected against your firewall rules. Unsolicited inbound connections are dropped. For IPv4 traffic, the firewall performs NAT.

      • SubnetId (string) --

        The ID of the subnet.

      • State (string) --

        The current state of the subnet.

        • failed: The underlying infrastructure to support the subnet failed to provision as expected.

        • failed-insufficient-capacity: The underlying infrastructure to support the subnet failed to provision due to a shortage of EC2 instance capacity.

      • VpcId (string) --

        The ID of the VPC the subnet is in.

      • CidrBlock (string) --

        The IPv4 CIDR block assigned to the subnet.

      • AvailableIpAddressCount (integer) --

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

      • AvailabilityZone (string) --

        The Availability Zone of the subnet.

      • DefaultForAz (boolean) --

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

      • MapPublicIpOnLaunch (boolean) --

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

        Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.

CreateDefaultVpc (updated) Link ¶
Changes (response)
{'Vpc': {'NetworkFirewallAssociations': [{'FirewallArn': 'string',
                                          'FirewallMode': 'monitor | enforce',
                                          'FirewallOnboardingStatus': 'pending '
                                                                      '| '
                                                                      'active '
                                                                      '| '
                                                                      'disabling'}]}}

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 VPCs in the Amazon VPC 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.

See also: AWS API Documentation

Request Syntax

client.create_default_vpc(
    DryRun=True|False
)
type DryRun:

boolean

param DryRun:

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

rtype:

dict

returns:

Response Syntax

{
    'Vpc': {
        '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',
                'Ipv6AddressAttribute': 'public'|'private',
                'IpSource': 'amazon'|'byoip'|'none'
            },
        ],
        'CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'CidrBlock': 'string',
                'CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
        ],
        'IsDefault': True|False,
        'EncryptionControl': {
            'VpcId': 'string',
            'VpcEncryptionControlId': 'string',
            'Mode': 'monitor'|'enforce',
            'State': 'enforce-in-progress'|'monitor-in-progress'|'enforce-failed'|'monitor-failed'|'deleting'|'deleted'|'available'|'creating'|'delete-failed',
            'StateMessage': 'string',
            'ResourceExclusions': {
                'InternetGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'EgressOnlyInternetGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'NatGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'VirtualPrivateGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'VpcPeering': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'Lambda': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'VpcLattice': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'ElasticFileSystem': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'GlobalAccelerator': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'ApiGatewayV2': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                }
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'BlockPublicAccessStates': {
            'InternetGatewayBlockMode': 'off'|'block-bidirectional'|'block-ingress'
        },
        'NetworkFirewallAssociations': [
            {
                'FirewallArn': 'string',
                'FirewallOnboardingStatus': 'pending'|'active'|'disabling',
                'FirewallMode': 'monitor'|'enforce'
            },
        ],
        'VpcId': 'string',
        'State': 'pending'|'available'|'deleting',
        'CidrBlock': 'string',
        'DhcpOptionsId': 'string'
    }
}

Response Structure

  • (dict) --

    • Vpc (dict) --

      Information about 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.

          • Ipv6AddressAttribute (string) --

            Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

          • IpSource (string) --

            The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

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

      • EncryptionControl (dict) --

        Describes the configuration and state of VPC encryption controls.

        For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

        • VpcId (string) --

          The ID of the VPC associated with the encryption control configuration.

        • VpcEncryptionControlId (string) --

          The ID of the VPC Encryption Control configuration.

        • Mode (string) --

          The encryption mode for the VPC Encryption Control configuration.

        • State (string) --

          The current state of the VPC Encryption Control configuration.

        • StateMessage (string) --

          A message providing additional information about the encryption control state.

        • ResourceExclusions (dict) --

          Information about resource exclusions for the VPC Encryption Control configuration.

          • InternetGateway (dict) --

            The exclusion configuration for internet gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • EgressOnlyInternetGateway (dict) --

            The exclusion configuration for egress-only internet gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • NatGateway (dict) --

            The exclusion configuration for NAT gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • VirtualPrivateGateway (dict) --

            The exclusion configuration for virtual private gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • VpcPeering (dict) --

            The exclusion configuration for VPC peering connection traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • Lambda (dict) --

            The exclusion configuration for Lambda function traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • VpcLattice (dict) --

            The exclusion configuration for VPC Lattice traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • ElasticFileSystem (dict) --

            The exclusion configuration for Elastic File System traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • GlobalAccelerator (dict) --

            The exclusion configuration for Amazon Web Services Global Accelerator traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • ApiGatewayV2 (dict) --

            The exclusion configuration for Amazon API Gateway V2 traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

        • Tags (list) --

          The tags assigned to the VPC Encryption Control configuration.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

      • BlockPublicAccessStates (dict) --

        The state of VPC Block Public Access (BPA).

        • InternetGatewayBlockMode (string) --

          The mode of VPC BPA.

          • off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region.

          • block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets).

          • block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.

      • NetworkFirewallAssociations (list) --

        Information about the firewall associations for the VPC. Automated Internet Firewall, a feature of Amazon Virtual Private Cloud (Amazon VPC), inspects traffic between the VPC and its internet gateway or egress-only internet gateway. This list is empty if the VPC doesn't have a firewall.

        • (dict) --

          Describes an Automated Internet Firewall that inspects traffic between a VPC and its internet gateway or egress-only internet gateway.

          • FirewallArn (string) --

            The Amazon Resource Name (ARN) of the firewall.

          • FirewallOnboardingStatus (string) --

            The status of the firewall for the VPC. Possible values:

            • active: The firewall inspects traffic for the VPC.

            • disabling: AWS is removing the firewall from the VPC.

            • pending: AWS is setting up the firewall for the VPC. The firewall might not inspect traffic yet.

          • FirewallMode (string) --

            The mode of the firewall. Possible values:

            • enforce: The firewall applies its policy to traffic.

            • monitor: The firewall logs traffic that its policy would act on, but doesn't block it.

      • VpcId (string) --

        The ID of the VPC.

      • State (string) --

        The current state of 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.

CreateRouteTable (updated) Link ¶
Changes (response)
{'RouteTable': {'Routes': {'IgwFirewall': {'FirewallArn': 'string',
                                           'Status': 'pending | active | '
                                                     'disabling'}}}}

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 VPC User Guide.

See also: AWS API Documentation

Request Syntax

client.create_route_table(
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'declarative-policies-report'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fca-policy'|'fleet'|'fpga-image'|'host-reservation'|'image'|'image-usage-report'|'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'|'outpost-lag'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'service-link-virtual-interface'|'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-metering-policy'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'vpc-encryption-control'|'route-server'|'route-server-endpoint'|'route-server-peer'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint'|'verified-access-endpoint-target'|'ipam-external-resource-verification-token'|'capacity-block'|'mac-modification-task'|'ipam-prefix-list-resolver'|'ipam-policy'|'ipam-prefix-list-resolver-target'|'ipam-internet-registry-association'|'secondary-interface'|'secondary-network'|'secondary-subnet'|'capacity-manager-data-export'|'vpn-concentrator'|'ipam-pool-allocation'|'capacity-reservation-cancellation-quote'|'application-status-check'|'capacity-reservation-modification-quote'|'metric-category',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    ClientToken='string',
    DryRun=True|False,
    VpcId='string'
)
type TagSpecifications:

list

param TagSpecifications:

The tags to assign to the route table.

  • (dict) --

    The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

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

type ClientToken:

string

param ClientToken:

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.

type DryRun:

boolean

param DryRun:

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

type VpcId:

string

param VpcId:

[REQUIRED]

The ID of the VPC.

rtype:

dict

returns:

Response Syntax

{
    'RouteTable': {
        'Associations': [
            {
                'Main': True|False,
                'RouteTableAssociationId': 'string',
                'RouteTableId': 'string',
                'SubnetId': 'string',
                'GatewayId': 'string',
                'PublicIpv4Pool': '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'|'Advertisement',
                'State': 'active'|'blackhole'|'filtered',
                'VpcPeeringConnectionId': 'string',
                'CoreNetworkArn': 'string',
                'OdbNetworkArn': 'string',
                'IpAddress': 'string',
                'IgwFirewall': {
                    'FirewallArn': 'string',
                    'Status': 'pending'|'active'|'disabling'
                }
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'VpcId': 'string',
        'OwnerId': 'string'
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) --

    • RouteTable (dict) --

      Information about the route table.

      • Associations (list) --

        The associations between the route table and your subnets or gateways.

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

          • PublicIpv4Pool (string) --

            The ID of a public IPv4 pool. A public IPv4 pool is a pool of IPv4 addresses that you've brought to Amazon Web Services with BYOIP.

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

            • Advertisement - The route was created dynamically by Amazon VPC Route Server.

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

          • OdbNetworkArn (string) --

            The Amazon Resource Name (ARN) of the ODB network.

          • IpAddress (string) --

            The next hop IP address for routes propagated by VPC Route Server into VPC route tables.

          • IgwFirewall (dict) --

            Information about the Automated Internet Firewall that inspects traffic for this route. The response includes this value only for routes that target an internet gateway or egress-only internet gateway in a VPC that has a firewall. The route target remains the internet gateway or egress-only internet gateway.

            • FirewallArn (string) --

              The ARN of the firewall that inspects traffic for this route.

            • Status (string) --

              The status of the firewall that inspects traffic for this route. Uses the same values as NetworkFirewallAssociation$firewallOnboardingStatus: active, disabling, or pending.

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

    • ClientToken (string) --

      Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.

CreateSubnet (updated) Link ¶
Changes (response)
{'Subnet': {'NetworkFirewallConnectivityType': 'flexible | outbound-only | '
                                               'bidirectional | exclude | '
                                               'az-unsupported'}}

Creates a subnet in the specified VPC. For an IPv4 only subnet, specify an IPv4 CIDR block. If the VPC has an IPv6 CIDR block, you can create an IPv6 only subnet or a dual stack subnet instead. For an IPv6 only subnet, specify an IPv6 CIDR block. For a dual stack subnet, specify both an IPv4 CIDR block and an IPv6 CIDR block.

A subnet CIDR block must not overlap the CIDR block of an existing subnet in the VPC. After you create a subnet, you can't change its CIDR block.

The allowed size for an IPv4 subnet is between a /28 netmask (16 IP addresses) and a /16 netmask (65,536 IP addresses). Amazon Web Services reserves both the first four and the last IPv4 address in each subnet's CIDR block. They're not available for your use.

If you've associated an IPv6 CIDR block with your VPC, you can associate an IPv6 CIDR block with a subnet when you create it.

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, see Subnets in the Amazon VPC User Guide.

See also: AWS API Documentation

Request Syntax

client.create_subnet(
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'declarative-policies-report'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fca-policy'|'fleet'|'fpga-image'|'host-reservation'|'image'|'image-usage-report'|'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'|'outpost-lag'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'service-link-virtual-interface'|'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-metering-policy'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'vpc-encryption-control'|'route-server'|'route-server-endpoint'|'route-server-peer'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint'|'verified-access-endpoint-target'|'ipam-external-resource-verification-token'|'capacity-block'|'mac-modification-task'|'ipam-prefix-list-resolver'|'ipam-policy'|'ipam-prefix-list-resolver-target'|'ipam-internet-registry-association'|'secondary-interface'|'secondary-network'|'secondary-subnet'|'capacity-manager-data-export'|'vpn-concentrator'|'ipam-pool-allocation'|'capacity-reservation-cancellation-quote'|'application-status-check'|'capacity-reservation-modification-quote'|'metric-category',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    AvailabilityZone='string',
    AvailabilityZoneId='string',
    CidrBlock='string',
    Ipv6CidrBlock='string',
    OutpostArn='string',
    VpcId='string',
    Ipv6Native=True|False,
    Ipv4IpamPoolId='string',
    Ipv4NetmaskLength=123,
    Ipv6IpamPoolId='string',
    Ipv6NetmaskLength=123,
    DryRun=True|False
)
type TagSpecifications:

list

param TagSpecifications:

The tags to assign to the subnet.

  • (dict) --

    The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

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

type AvailabilityZone:

string

param AvailabilityZone:

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 Local Zones.

To create a subnet in an Outpost, set this value to the Availability Zone for the Outpost and specify the Outpost ARN.

type AvailabilityZoneId:

string

param AvailabilityZoneId:

The AZ ID or the Local Zone ID of the subnet.

type CidrBlock:

string

param CidrBlock:

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.

type Ipv6CidrBlock:

string

param Ipv6CidrBlock:

The IPv6 network range for the subnet, in CIDR notation. This parameter is required for an IPv6 only subnet.

type OutpostArn:

string

param OutpostArn:

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.

type VpcId:

string

param VpcId:

[REQUIRED]

The ID of the VPC.

type Ipv6Native:

boolean

param Ipv6Native:

Indicates whether to create an IPv6 only subnet.

type Ipv4IpamPoolId:

string

param Ipv4IpamPoolId:

An IPv4 IPAM pool ID for the subnet.

type Ipv4NetmaskLength:

integer

param Ipv4NetmaskLength:

An IPv4 netmask length for the subnet.

type Ipv6IpamPoolId:

string

param Ipv6IpamPoolId:

An IPv6 IPAM pool ID for the subnet.

type Ipv6NetmaskLength:

integer

param Ipv6NetmaskLength:

An IPv6 netmask length for the subnet.

type DryRun:

boolean

param DryRun:

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

rtype:

dict

returns:

Response Syntax

{
    'Subnet': {
        'AvailabilityZoneId': 'string',
        'EnableLniAtDeviceIndex': 123,
        'MapCustomerOwnedIpOnLaunch': True|False,
        'CustomerOwnedIpv4Pool': 'string',
        'OwnerId': 'string',
        'AssignIpv6AddressOnCreation': True|False,
        'Ipv6CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'Ipv6CidrBlock': 'string',
                'Ipv6CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                },
                'Ipv6AddressAttribute': 'public'|'private',
                'IpSource': 'amazon'|'byoip'|'none'
            },
        ],
        '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
        },
        'BlockPublicAccessStates': {
            'InternetGatewayBlockMode': 'off'|'block-bidirectional'|'block-ingress'
        },
        'Type': 'string',
        'NetworkFirewallConnectivityType': 'flexible'|'outbound-only'|'bidirectional'|'exclude'|'az-unsupported',
        'SubnetId': 'string',
        'State': 'pending'|'available'|'unavailable'|'failed'|'failed-insufficient-capacity',
        'VpcId': 'string',
        'CidrBlock': 'string',
        'AvailableIpAddressCount': 123,
        'AvailabilityZone': 'string',
        'DefaultForAz': True|False,
        'MapPublicIpOnLaunch': True|False
    }
}

Response Structure

  • (dict) --

    • Subnet (dict) --

      Information about the subnet.

      • AvailabilityZoneId (string) --

        The AZ ID of the subnet.

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

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

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

          • Ipv6AddressAttribute (string) --

            Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

          • IpSource (string) --

            The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

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

      • BlockPublicAccessStates (dict) --

        The state of VPC Block Public Access (BPA).

        • InternetGatewayBlockMode (string) --

          The mode of VPC BPA.

          • off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region.

          • block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets).

          • block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.

      • Type (string) --

        Indicates if this is a subnet used with Amazon Elastic VMware Service (EVS). Possible values are Elastic VMware Service or no value. For more information about Amazon EVS, see Amazon Elastic VMware Service API Reference.

      • NetworkFirewallConnectivityType (string) --

        The internet connectivity treatment that the Automated Internet Firewall applies to the subnet. The response includes this value only if the subnet is in a VPC that has a firewall. Possible values:

        • az-unsupported: The firewall doesn't support the subnet's Availability Zone, so it doesn't inspect traffic for the subnet.

        • bidirectional: Provides bidirectional internet connectivity to every network interface that has a public IP association. Any network interface without a public IP cannot communicate with the internet unless a NAT device is explicitly inserted in the path. All inbound and outbound traffic is inspected against your firewall rules.

        • exclude: The firewall doesn't inspect traffic for the subnet. The subnet bypasses the firewall, and its traffic passes directly through the internet gateway.

        • flexible: Sets the connectivity for each network interface in the subnet based on whether it is associated with a public IP address. A network interface with a public IP address gets bidirectional internet connectivity. A network interface without a public IP address gets outbound-only connectivity. All traffic is inspected against your firewall rules.

        • outbound-only: Provides egress-only connectivity for all network interfaces in the subnet. All outbound traffic and inbound responses are inspected against your firewall rules. Unsolicited inbound connections are dropped. For IPv4 traffic, the firewall performs NAT.

      • SubnetId (string) --

        The ID of the subnet.

      • State (string) --

        The current state of the subnet.

        • failed: The underlying infrastructure to support the subnet failed to provision as expected.

        • failed-insufficient-capacity: The underlying infrastructure to support the subnet failed to provision due to a shortage of EC2 instance capacity.

      • VpcId (string) --

        The ID of the VPC the subnet is in.

      • CidrBlock (string) --

        The IPv4 CIDR block assigned to the subnet.

      • AvailableIpAddressCount (integer) --

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

      • AvailabilityZone (string) --

        The Availability Zone of the subnet.

      • DefaultForAz (boolean) --

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

      • MapPublicIpOnLaunch (boolean) --

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

        Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.

CreateVpc (updated) Link ¶
Changes (response)
{'Vpc': {'NetworkFirewallAssociations': [{'FirewallArn': 'string',
                                          'FirewallMode': 'monitor | enforce',
                                          'FirewallOnboardingStatus': 'pending '
                                                                      '| '
                                                                      'active '
                                                                      '| '
                                                                      'disabling'}]}}

Creates a VPC with the specified CIDR blocks.

A VPC must have an associated IPv4 CIDR block. You can choose an IPv4 CIDR block or an IPAM-allocated IPv4 CIDR block. You can optionally associate an IPv6 CIDR block with a VPC. You can choose an IPv6 CIDR block, an Amazon-provided IPv6 CIDR block, an IPAM-allocated IPv6 CIDR block, or an IPv6 CIDR block that you brought to Amazon Web Services. For more information, see IP addressing for your VPCs and subnets in the Amazon VPC User Guide.

By default, each instance that 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 option sets in the Amazon VPC User Guide.

You can specify DNS options and tenancy for a VPC when you create it. You can't change the tenancy of a VPC after you create it. For more information, see VPC configuration options in the Amazon VPC User Guide.

See also: AWS API Documentation

Request Syntax

client.create_vpc(
    CidrBlock='string',
    Ipv6Pool='string',
    Ipv6CidrBlock='string',
    Ipv4IpamPoolId='string',
    Ipv4NetmaskLength=123,
    Ipv6IpamPoolId='string',
    Ipv6NetmaskLength=123,
    Ipv6CidrBlockNetworkBorderGroup='string',
    VpcEncryptionControl={
        'Mode': 'monitor'|'enforce',
        'InternetGatewayExclusion': 'enable'|'disable',
        'EgressOnlyInternetGatewayExclusion': 'enable'|'disable',
        'NatGatewayExclusion': 'enable'|'disable',
        'VirtualPrivateGatewayExclusion': 'enable'|'disable',
        'VpcPeeringExclusion': 'enable'|'disable',
        'LambdaExclusion': 'enable'|'disable',
        'VpcLatticeExclusion': 'enable'|'disable',
        'ElasticFileSystemExclusion': 'enable'|'disable',
        'GlobalAcceleratorExclusion': 'enable'|'disable',
        'ApiGatewayV2Exclusion': 'enable'|'disable'
    },
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'coip-pool'|'declarative-policies-report'|'dedicated-host'|'dhcp-options'|'egress-only-internet-gateway'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fca-policy'|'fleet'|'fpga-image'|'host-reservation'|'image'|'image-usage-report'|'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'|'outpost-lag'|'placement-group'|'prefix-list'|'replace-root-volume-task'|'reserved-instances'|'route-table'|'security-group'|'security-group-rule'|'service-link-virtual-interface'|'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-metering-policy'|'transit-gateway-route-table'|'transit-gateway-route-table-announcement'|'volume'|'vpc'|'vpc-endpoint'|'vpc-endpoint-connection'|'vpc-endpoint-service'|'vpc-endpoint-service-permission'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log'|'capacity-reservation-fleet'|'traffic-mirror-filter-rule'|'vpc-endpoint-connection-device-type'|'verified-access-instance'|'verified-access-group'|'verified-access-endpoint'|'verified-access-policy'|'verified-access-trust-provider'|'vpn-connection-device-type'|'vpc-block-public-access-exclusion'|'vpc-encryption-control'|'route-server'|'route-server-endpoint'|'route-server-peer'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint'|'verified-access-endpoint-target'|'ipam-external-resource-verification-token'|'capacity-block'|'mac-modification-task'|'ipam-prefix-list-resolver'|'ipam-policy'|'ipam-prefix-list-resolver-target'|'ipam-internet-registry-association'|'secondary-interface'|'secondary-network'|'secondary-subnet'|'capacity-manager-data-export'|'vpn-concentrator'|'ipam-pool-allocation'|'capacity-reservation-cancellation-quote'|'application-status-check'|'capacity-reservation-modification-quote'|'metric-category',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False,
    InstanceTenancy='default'|'dedicated'|'host',
    AmazonProvidedIpv6CidrBlock=True|False
)
type CidrBlock:

string

param CidrBlock:

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.

type Ipv6Pool:

string

param Ipv6Pool:

The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block.

type Ipv6CidrBlock:

string

param Ipv6CidrBlock:

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.

type Ipv4IpamPoolId:

string

param Ipv4IpamPoolId:

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.

type Ipv4NetmaskLength:

integer

param Ipv4NetmaskLength:

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.

type Ipv6IpamPoolId:

string

param Ipv6IpamPoolId:

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.

type Ipv6NetmaskLength:

integer

param Ipv6NetmaskLength:

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.

type Ipv6CidrBlockNetworkBorderGroup:

string

param Ipv6CidrBlockNetworkBorderGroup:

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.

type VpcEncryptionControl:

dict

param VpcEncryptionControl:

Specifies the encryption control configuration to apply to the VPC during creation. VPC Encryption Control enables you to enforce encryption for all data in transit within and between VPCs to meet compliance requirements.

For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

  • Mode (string) -- [REQUIRED]

    The encryption mode for the VPC Encryption Control configuration.

  • InternetGatewayExclusion (string) --

    Specifies whether to exclude internet gateway traffic from encryption enforcement.

  • EgressOnlyInternetGatewayExclusion (string) --

    Specifies whether to exclude egress-only internet gateway traffic from encryption enforcement.

  • NatGatewayExclusion (string) --

    Specifies whether to exclude NAT gateway traffic from encryption enforcement.

  • VirtualPrivateGatewayExclusion (string) --

    Specifies whether to exclude virtual private gateway traffic from encryption enforcement.

  • VpcPeeringExclusion (string) --

    Specifies whether to exclude VPC peering connection traffic from encryption enforcement.

  • LambdaExclusion (string) --

    Specifies whether to exclude Lambda function traffic from encryption enforcement.

  • VpcLatticeExclusion (string) --

    Specifies whether to exclude VPC Lattice traffic from encryption enforcement.

  • ElasticFileSystemExclusion (string) --

    Specifies whether to exclude Elastic File System traffic from encryption enforcement.

  • GlobalAcceleratorExclusion (string) --

    Specifies whether to exclude Amazon Web Services Global Accelerator traffic from encryption enforcement.

  • ApiGatewayV2Exclusion (string) --

    Specifies whether to exclude Amazon API Gateway V2 traffic from encryption enforcement.

type TagSpecifications:

list

param TagSpecifications:

The tags to assign to the VPC.

  • (dict) --

    The tags to apply to a resource when the resource is being created. When you specify a tag, you must specify the resource type to tag, otherwise the request will fail.

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

type DryRun:

boolean

param DryRun:

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

type InstanceTenancy:

string

param InstanceTenancy:

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

type AmazonProvidedIpv6CidrBlock:

boolean

param AmazonProvidedIpv6CidrBlock:

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.

rtype:

dict

returns:

Response Syntax

{
    'Vpc': {
        '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',
                'Ipv6AddressAttribute': 'public'|'private',
                'IpSource': 'amazon'|'byoip'|'none'
            },
        ],
        'CidrBlockAssociationSet': [
            {
                'AssociationId': 'string',
                'CidrBlock': 'string',
                'CidrBlockState': {
                    'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                    'StatusMessage': 'string'
                }
            },
        ],
        'IsDefault': True|False,
        'EncryptionControl': {
            'VpcId': 'string',
            'VpcEncryptionControlId': 'string',
            'Mode': 'monitor'|'enforce',
            'State': 'enforce-in-progress'|'monitor-in-progress'|'enforce-failed'|'monitor-failed'|'deleting'|'deleted'|'available'|'creating'|'delete-failed',
            'StateMessage': 'string',
            'ResourceExclusions': {
                'InternetGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'EgressOnlyInternetGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'NatGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'VirtualPrivateGateway': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'VpcPeering': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'Lambda': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'VpcLattice': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'ElasticFileSystem': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'GlobalAccelerator': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                },
                'ApiGatewayV2': {
                    'State': 'enabling'|'enabled'|'disabling'|'disabled',
                    'StateMessage': 'string'
                }
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'BlockPublicAccessStates': {
            'InternetGatewayBlockMode': 'off'|'block-bidirectional'|'block-ingress'
        },
        'NetworkFirewallAssociations': [
            {
                'FirewallArn': 'string',
                'FirewallOnboardingStatus': 'pending'|'active'|'disabling',
                'FirewallMode': 'monitor'|'enforce'
            },
        ],
        'VpcId': 'string',
        'State': 'pending'|'available'|'deleting',
        'CidrBlock': 'string',
        'DhcpOptionsId': 'string'
    }
}

Response Structure

  • (dict) --

    • Vpc (dict) --

      Information about 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.

          • Ipv6AddressAttribute (string) --

            Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

          • IpSource (string) --

            The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

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

      • EncryptionControl (dict) --

        Describes the configuration and state of VPC encryption controls.

        For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

        • VpcId (string) --

          The ID of the VPC associated with the encryption control configuration.

        • VpcEncryptionControlId (string) --

          The ID of the VPC Encryption Control configuration.

        • Mode (string) --

          The encryption mode for the VPC Encryption Control configuration.

        • State (string) --

          The current state of the VPC Encryption Control configuration.

        • StateMessage (string) --

          A message providing additional information about the encryption control state.

        • ResourceExclusions (dict) --

          Information about resource exclusions for the VPC Encryption Control configuration.

          • InternetGateway (dict) --

            The exclusion configuration for internet gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • EgressOnlyInternetGateway (dict) --

            The exclusion configuration for egress-only internet gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • NatGateway (dict) --

            The exclusion configuration for NAT gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • VirtualPrivateGateway (dict) --

            The exclusion configuration for virtual private gateway traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • VpcPeering (dict) --

            The exclusion configuration for VPC peering connection traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • Lambda (dict) --

            The exclusion configuration for Lambda function traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • VpcLattice (dict) --

            The exclusion configuration for VPC Lattice traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • ElasticFileSystem (dict) --

            The exclusion configuration for Elastic File System traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • GlobalAccelerator (dict) --

            The exclusion configuration for Amazon Web Services Global Accelerator traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

          • ApiGatewayV2 (dict) --

            The exclusion configuration for Amazon API Gateway V2 traffic.

            • State (string) --

              The current state of the exclusion configuration.

            • StateMessage (string) --

              A message providing additional information about the exclusion state.

        • Tags (list) --

          The tags assigned to the VPC Encryption Control configuration.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

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

      • BlockPublicAccessStates (dict) --

        The state of VPC Block Public Access (BPA).

        • InternetGatewayBlockMode (string) --

          The mode of VPC BPA.

          • off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region.

          • block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets).

          • block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.

      • NetworkFirewallAssociations (list) --

        Information about the firewall associations for the VPC. Automated Internet Firewall, a feature of Amazon Virtual Private Cloud (Amazon VPC), inspects traffic between the VPC and its internet gateway or egress-only internet gateway. This list is empty if the VPC doesn't have a firewall.

        • (dict) --

          Describes an Automated Internet Firewall that inspects traffic between a VPC and its internet gateway or egress-only internet gateway.

          • FirewallArn (string) --

            The Amazon Resource Name (ARN) of the firewall.

          • FirewallOnboardingStatus (string) --

            The status of the firewall for the VPC. Possible values:

            • active: The firewall inspects traffic for the VPC.

            • disabling: AWS is removing the firewall from the VPC.

            • pending: AWS is setting up the firewall for the VPC. The firewall might not inspect traffic yet.

          • FirewallMode (string) --

            The mode of the firewall. Possible values:

            • enforce: The firewall applies its policy to traffic.

            • monitor: The firewall logs traffic that its policy would act on, but doesn't block it.

      • VpcId (string) --

        The ID of the VPC.

      • State (string) --

        The current state of 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.

DescribeAddresses (updated) Link ¶
Changes (response)
{'Addresses': {'ServiceManaged': {'lambda-network-connector', 'igw-firewall'}}}

Describes the specified Elastic IP addresses or all of your Elastic IP addresses.

See also: AWS API Documentation

Request Syntax

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

list

param PublicIps:

One or more Elastic IP addresses.

Default: Describes all your Elastic IP addresses.

  • (string) --

type DryRun:

boolean

param DryRun:

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

type Filters:

list

param Filters:

One or more filters. Filter names and values are case-sensitive.

  • allocation-id - The allocation ID for the address.

  • association-id - The association ID for the address.

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

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

type AllocationIds:

list

param AllocationIds:

Information about the allocation IDs.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Addresses': [
        {
            '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',
            'SubnetId': 'string',
            'ServiceManaged': 'alb'|'nlb'|'rnat'|'rds'|'lambda-network-connector'|'igw-firewall',
            'InstanceId': 'string',
            'PublicIp': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Addresses (list) --

      Information about the Elastic IP addresses.

      • (dict) --

        Describes an Elastic IP address, or a carrier IP address.

        • AllocationId (string) --

          The ID representing the allocation of the address.

        • AssociationId (string) --

          The ID representing the association of the address with an instance.

        • Domain (string) --

          The network ( 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).

        • SubnetId (string) --

          The ID of the subnet where the IP address is allocated.

        • ServiceManaged (string) --

          The service that manages the elastic IP address.

        • InstanceId (string) --

          The ID of the instance that the address is associated with (if any).

        • PublicIp (string) --

          The Elastic IP address.

DescribeRouteTables (updated) Link ¶
Changes (response)
{'RouteTables': {'Routes': {'IgwFirewall': {'FirewallArn': 'string',
                                            'Status': 'pending | active | '
                                                      'disabling'}}}}

Describes your route tables. The default is to describe all your route tables. Alternatively, you can specify specific route table IDs or filter the results to include only the route tables that match specific criteria.

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 VPC User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_route_tables(
    NextToken='string',
    MaxResults=123,
    DryRun=True|False,
    RouteTableIds=[
        'string',
    ],
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ]
)
type NextToken:

string

param NextToken:

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

type MaxResults:

integer

param MaxResults:

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

type DryRun:

boolean

param DryRun:

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

type RouteTableIds:

list

param RouteTableIds:

The IDs of the route tables.

  • (string) --

type Filters:

list

param Filters:

The filters.

  • association.gateway-id - The ID of the gateway involved in the association.

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

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

rtype:

dict

returns:

Response Syntax

{
    'RouteTables': [
        {
            'Associations': [
                {
                    'Main': True|False,
                    'RouteTableAssociationId': 'string',
                    'RouteTableId': 'string',
                    'SubnetId': 'string',
                    'GatewayId': 'string',
                    'PublicIpv4Pool': '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'|'Advertisement',
                    'State': 'active'|'blackhole'|'filtered',
                    'VpcPeeringConnectionId': 'string',
                    'CoreNetworkArn': 'string',
                    'OdbNetworkArn': 'string',
                    'IpAddress': 'string',
                    'IgwFirewall': {
                        'FirewallArn': 'string',
                        'Status': 'pending'|'active'|'disabling'
                    }
                },
            ],
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'VpcId': 'string',
            'OwnerId': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the output of DescribeRouteTables.

    • RouteTables (list) --

      Information about the route tables.

      • (dict) --

        Describes a route table.

        • Associations (list) --

          The associations between the route table and your subnets or gateways.

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

            • PublicIpv4Pool (string) --

              The ID of a public IPv4 pool. A public IPv4 pool is a pool of IPv4 addresses that you've brought to Amazon Web Services with BYOIP.

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

              • Advertisement - The route was created dynamically by Amazon VPC Route Server.

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

            • OdbNetworkArn (string) --

              The Amazon Resource Name (ARN) of the ODB network.

            • IpAddress (string) --

              The next hop IP address for routes propagated by VPC Route Server into VPC route tables.

            • IgwFirewall (dict) --

              Information about the Automated Internet Firewall that inspects traffic for this route. The response includes this value only for routes that target an internet gateway or egress-only internet gateway in a VPC that has a firewall. The route target remains the internet gateway or egress-only internet gateway.

              • FirewallArn (string) --

                The ARN of the firewall that inspects traffic for this route.

              • Status (string) --

                The status of the firewall that inspects traffic for this route. Uses the same values as NetworkFirewallAssociation$firewallOnboardingStatus: active, disabling, or pending.

        • 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 include in another request to get the next page of items. This value is null when there are no more items to return.

DescribeSubnets (updated) Link ¶
Changes (response)
{'Subnets': {'NetworkFirewallConnectivityType': 'flexible | outbound-only | '
                                                'bidirectional | exclude | '
                                                'az-unsupported'}}

Describes your subnets. The default is to describe all your subnets. Alternatively, you can specify specific subnet IDs or filter the results to include only the subnets that match specific criteria.

For more information, see Subnets in the Amazon VPC User Guide.

See also: AWS API Documentation

Request Syntax

client.describe_subnets(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SubnetIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
type Filters:

list

param Filters:

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

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

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

  • enable-dns64 - 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 - 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.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).

  • map-customer-owned-ip-on-launch - 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 - Indicates whether instances launched in this subnet receive a public IPv4 address.

  • outpost-arn - The Amazon Resource Name (ARN) of the Outpost.

  • owner-id - The ID of the Amazon Web Services account that owns the subnet.

  • private-dns-name-options-on-launch.hostname-type - 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).

  • private-dns-name-options-on-launch.enable-resource-name-dns-a-record - Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

  • private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record - Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

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

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

type SubnetIds:

list

param SubnetIds:

The IDs of the subnets.

Default: Describes all your subnets.

  • (string) --

type NextToken:

string

param NextToken:

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

type MaxResults:

integer

param MaxResults:

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

type DryRun:

boolean

param DryRun:

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

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'Subnets': [
        {
            'AvailabilityZoneId': 'string',
            'EnableLniAtDeviceIndex': 123,
            'MapCustomerOwnedIpOnLaunch': True|False,
            'CustomerOwnedIpv4Pool': 'string',
            'OwnerId': 'string',
            'AssignIpv6AddressOnCreation': True|False,
            'Ipv6CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'Ipv6CidrBlock': 'string',
                    'Ipv6CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    },
                    'Ipv6AddressAttribute': 'public'|'private',
                    'IpSource': 'amazon'|'byoip'|'none'
                },
            ],
            '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
            },
            'BlockPublicAccessStates': {
                'InternetGatewayBlockMode': 'off'|'block-bidirectional'|'block-ingress'
            },
            'Type': 'string',
            'NetworkFirewallConnectivityType': 'flexible'|'outbound-only'|'bidirectional'|'exclude'|'az-unsupported',
            'SubnetId': 'string',
            'State': 'pending'|'available'|'unavailable'|'failed'|'failed-insufficient-capacity',
            'VpcId': 'string',
            'CidrBlock': 'string',
            'AvailableIpAddressCount': 123,
            'AvailabilityZone': 'string',
            'DefaultForAz': True|False,
            'MapPublicIpOnLaunch': True|False
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The token to include in another request to get the next page of items. This value is null when there are no more items to return.

    • Subnets (list) --

      Information about the subnets.

      • (dict) --

        Describes a subnet.

        • AvailabilityZoneId (string) --

          The AZ ID of the subnet.

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

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

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

            • Ipv6AddressAttribute (string) --

              Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

            • IpSource (string) --

              The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

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

        • BlockPublicAccessStates (dict) --

          The state of VPC Block Public Access (BPA).

          • InternetGatewayBlockMode (string) --

            The mode of VPC BPA.

            • off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region.

            • block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets).

            • block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.

        • Type (string) --

          Indicates if this is a subnet used with Amazon Elastic VMware Service (EVS). Possible values are Elastic VMware Service or no value. For more information about Amazon EVS, see Amazon Elastic VMware Service API Reference.

        • NetworkFirewallConnectivityType (string) --

          The internet connectivity treatment that the Automated Internet Firewall applies to the subnet. The response includes this value only if the subnet is in a VPC that has a firewall. Possible values:

          • az-unsupported: The firewall doesn't support the subnet's Availability Zone, so it doesn't inspect traffic for the subnet.

          • bidirectional: Provides bidirectional internet connectivity to every network interface that has a public IP association. Any network interface without a public IP cannot communicate with the internet unless a NAT device is explicitly inserted in the path. All inbound and outbound traffic is inspected against your firewall rules.

          • exclude: The firewall doesn't inspect traffic for the subnet. The subnet bypasses the firewall, and its traffic passes directly through the internet gateway.

          • flexible: Sets the connectivity for each network interface in the subnet based on whether it is associated with a public IP address. A network interface with a public IP address gets bidirectional internet connectivity. A network interface without a public IP address gets outbound-only connectivity. All traffic is inspected against your firewall rules.

          • outbound-only: Provides egress-only connectivity for all network interfaces in the subnet. All outbound traffic and inbound responses are inspected against your firewall rules. Unsolicited inbound connections are dropped. For IPv4 traffic, the firewall performs NAT.

        • SubnetId (string) --

          The ID of the subnet.

        • State (string) --

          The current state of the subnet.

          • failed: The underlying infrastructure to support the subnet failed to provision as expected.

          • failed-insufficient-capacity: The underlying infrastructure to support the subnet failed to provision due to a shortage of EC2 instance capacity.

        • VpcId (string) --

          The ID of the VPC the subnet is in.

        • CidrBlock (string) --

          The IPv4 CIDR block assigned to the subnet.

        • AvailableIpAddressCount (integer) --

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

        • AvailabilityZone (string) --

          The Availability Zone of the subnet.

        • DefaultForAz (boolean) --

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

        • MapPublicIpOnLaunch (boolean) --

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

          Amazon Web Services charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page.

DescribeVpcs (updated) Link ¶
Changes (response)
{'Vpcs': {'NetworkFirewallAssociations': [{'FirewallArn': 'string',
                                           'FirewallMode': 'monitor | enforce',
                                           'FirewallOnboardingStatus': 'pending '
                                                                       '| '
                                                                       'active '
                                                                       '| '
                                                                       'disabling'}]}}

Describes your VPCs. The default is to describe all your VPCs. Alternatively, you can specify specific VPC IDs or filter the results to include only the VPCs that match specific criteria.

See also: AWS API Documentation

Request Syntax

client.describe_vpcs(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    VpcIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123,
    DryRun=True|False
)
type Filters:

list

param Filters:

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

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

type VpcIds:

list

param VpcIds:

The IDs of the VPCs.

  • (string) --

type NextToken:

string

param NextToken:

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

type MaxResults:

integer

param MaxResults:

The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination.

type DryRun:

boolean

param DryRun:

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

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'Vpcs': [
        {
            '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',
                    'Ipv6AddressAttribute': 'public'|'private',
                    'IpSource': 'amazon'|'byoip'|'none'
                },
            ],
            'CidrBlockAssociationSet': [
                {
                    'AssociationId': 'string',
                    'CidrBlock': 'string',
                    'CidrBlockState': {
                        'State': 'associating'|'associated'|'disassociating'|'disassociated'|'failing'|'failed',
                        'StatusMessage': 'string'
                    }
                },
            ],
            'IsDefault': True|False,
            'EncryptionControl': {
                'VpcId': 'string',
                'VpcEncryptionControlId': 'string',
                'Mode': 'monitor'|'enforce',
                'State': 'enforce-in-progress'|'monitor-in-progress'|'enforce-failed'|'monitor-failed'|'deleting'|'deleted'|'available'|'creating'|'delete-failed',
                'StateMessage': 'string',
                'ResourceExclusions': {
                    'InternetGateway': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'EgressOnlyInternetGateway': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'NatGateway': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'VirtualPrivateGateway': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'VpcPeering': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'Lambda': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'VpcLattice': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'ElasticFileSystem': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'GlobalAccelerator': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    },
                    'ApiGatewayV2': {
                        'State': 'enabling'|'enabled'|'disabling'|'disabled',
                        'StateMessage': 'string'
                    }
                },
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'BlockPublicAccessStates': {
                'InternetGatewayBlockMode': 'off'|'block-bidirectional'|'block-ingress'
            },
            'NetworkFirewallAssociations': [
                {
                    'FirewallArn': 'string',
                    'FirewallOnboardingStatus': 'pending'|'active'|'disabling',
                    'FirewallMode': 'monitor'|'enforce'
                },
            ],
            'VpcId': 'string',
            'State': 'pending'|'available'|'deleting',
            'CidrBlock': 'string',
            'DhcpOptionsId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      The token to include in another request to get the next page of items. This value is null when there are no more items to return.

    • Vpcs (list) --

      Information about the VPCs.

      • (dict) --

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

            • Ipv6AddressAttribute (string) --

              Public IPv6 addresses are those advertised on the internet from Amazon Web Services. Private IP addresses are not and cannot be advertised on the internet from Amazon Web Services.

            • IpSource (string) --

              The source that allocated the IP address space. byoip or amazon indicates public IP address space allocated by Amazon or space that you have allocated with Bring your own IP (BYOIP). none indicates private space.

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

        • EncryptionControl (dict) --

          Describes the configuration and state of VPC encryption controls.

          For more information, see Enforce VPC encryption in transit in the Amazon VPC User Guide.

          • VpcId (string) --

            The ID of the VPC associated with the encryption control configuration.

          • VpcEncryptionControlId (string) --

            The ID of the VPC Encryption Control configuration.

          • Mode (string) --

            The encryption mode for the VPC Encryption Control configuration.

          • State (string) --

            The current state of the VPC Encryption Control configuration.

          • StateMessage (string) --

            A message providing additional information about the encryption control state.

          • ResourceExclusions (dict) --

            Information about resource exclusions for the VPC Encryption Control configuration.

            • InternetGateway (dict) --

              The exclusion configuration for internet gateway traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • EgressOnlyInternetGateway (dict) --

              The exclusion configuration for egress-only internet gateway traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • NatGateway (dict) --

              The exclusion configuration for NAT gateway traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • VirtualPrivateGateway (dict) --

              The exclusion configuration for virtual private gateway traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • VpcPeering (dict) --

              The exclusion configuration for VPC peering connection traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • Lambda (dict) --

              The exclusion configuration for Lambda function traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • VpcLattice (dict) --

              The exclusion configuration for VPC Lattice traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • ElasticFileSystem (dict) --

              The exclusion configuration for Elastic File System traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • GlobalAccelerator (dict) --

              The exclusion configuration for Amazon Web Services Global Accelerator traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

            • ApiGatewayV2 (dict) --

              The exclusion configuration for Amazon API Gateway V2 traffic.

              • State (string) --

                The current state of the exclusion configuration.

              • StateMessage (string) --

                A message providing additional information about the exclusion state.

          • Tags (list) --

            The tags assigned to the VPC Encryption Control configuration.

            • (dict) --

              Describes a tag.

              • Key (string) --

                The key of the tag.

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

              • Value (string) --

                The value of the tag.

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

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

        • BlockPublicAccessStates (dict) --

          The state of VPC Block Public Access (BPA).

          • InternetGatewayBlockMode (string) --

            The mode of VPC BPA.

            • off: VPC BPA is not enabled and traffic is allowed to and from internet gateways and egress-only internet gateways in this Region.

            • block-bidirectional: Block all traffic to and from internet gateways and egress-only internet gateways in this Region (except for excluded VPCs and subnets).

            • block-ingress: Block all internet traffic to the VPCs in this Region (except for VPCs or subnets which are excluded). Only traffic to and from NAT gateways and egress-only internet gateways is allowed because these gateways only allow outbound connections to be established.

        • NetworkFirewallAssociations (list) --

          Information about the firewall associations for the VPC. Automated Internet Firewall, a feature of Amazon Virtual Private Cloud (Amazon VPC), inspects traffic between the VPC and its internet gateway or egress-only internet gateway. This list is empty if the VPC doesn't have a firewall.

          • (dict) --

            Describes an Automated Internet Firewall that inspects traffic between a VPC and its internet gateway or egress-only internet gateway.

            • FirewallArn (string) --

              The Amazon Resource Name (ARN) of the firewall.

            • FirewallOnboardingStatus (string) --

              The status of the firewall for the VPC. Possible values:

              • active: The firewall inspects traffic for the VPC.

              • disabling: AWS is removing the firewall from the VPC.

              • pending: AWS is setting up the firewall for the VPC. The firewall might not inspect traffic yet.

            • FirewallMode (string) --

              The mode of the firewall. Possible values:

              • enforce: The firewall applies its policy to traffic.

              • monitor: The firewall logs traffic that its policy would act on, but doesn't block it.

        • VpcId (string) --

          The ID of the VPC.

        • State (string) --

          The current state of 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.

GetDefaultCreditSpecification (updated) Link ¶
Changes (request, response)
Request
{'InstanceFamily': {'t9g'}}
Response
{'InstanceFamilyCreditSpecification': {'InstanceFamily': {'t9g'}}}

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

client.get_default_credit_specification(
    DryRun=True|False,
    InstanceFamily='t2'|'t3'|'t3a'|'t4g'|'t8i'|'t9g'
)
type DryRun:

boolean

param DryRun:

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

type InstanceFamily:

string

param InstanceFamily:

[REQUIRED]

The instance family.

rtype:

dict

returns:

Response Syntax

{
    'InstanceFamilyCreditSpecification': {
        'InstanceFamily': 't2'|'t3'|'t3a'|'t4g'|'t8i'|'t9g',
        '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.

GetIpamPolicyAllocationRules (updated) Link ¶
Changes (request, response)
Request
{'ResourceType': {'lambda-network-connector', 'igw-firewall'}}
Response
{'IpamPolicyDocuments': {'ResourceType': {'igw-firewall',
                                          'lambda-network-connector'}}}

Gets the allocation rules for an IPAM policy.

An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations.

Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

See also: AWS API Documentation

Request Syntax

client.get_ipam_policy_allocation_rules(
    DryRun=True|False,
    IpamPolicyId='string',
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    Locale='string',
    ResourceType='alb'|'eip'|'rds'|'rnat'|'lambda-network-connector'|'igw-firewall',
    MaxResults=123,
    NextToken='string'
)
type DryRun:

boolean

param DryRun:

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.

type IpamPolicyId:

string

param IpamPolicyId:

[REQUIRED]

The ID of the IPAM policy for which to get allocation rules.

type Filters:

list

param Filters:

One or more filters for the allocation rules.

  • (dict) --

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

    If you specify multiple filters, the filters are joined with an AND, and the request returns only results that match all of the specified filters.

    For more information, see List and filter using the CLI and API in the Amazon EC2 User Guide.

    • Name (string) --

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

    • Values (list) --

      The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an OR, and the request returns all results that match any of the specified values.

      • (string) --

type Locale:

string

param Locale:

The locale for which to get the allocation rules.

type ResourceType:

string

param ResourceType:

The resource type for which to get the allocation rules.

The Amazon Web Services service or resource type that can use IP addresses through IPAM policies. Supported services and resource types include:

  • Elastic IP addresses

  • Application Load Balancers

  • Amazon RDS

  • NAT gateways in regional availability mode

  • Lambda Network Connector

  • Automated Internet Firewall

type MaxResults:

integer

param MaxResults:

The maximum number of results to return in a single call.

type NextToken:

string

param NextToken:

The token for the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'IpamPolicyDocuments': [
        {
            'IpamPolicyId': 'string',
            'Locale': 'string',
            'ResourceType': 'alb'|'eip'|'rds'|'rnat'|'lambda-network-connector'|'igw-firewall',
            'AllocationRules': [
                {
                    'SourceIpamPoolId': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • IpamPolicyDocuments (list) --

      The IPAM policy documents containing the allocation rules.

      Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

      • (dict) --

        Information about an IPAM policy.

        • IpamPolicyId (string) --

          The ID of the IPAM policy.

        • Locale (string) --

          The locale of the IPAM policy document.

        • ResourceType (string) --

          The resource type of the IPAM policy document.

          The Amazon Web Services service or resource type that can use IP addresses through IPAM policies. Supported services and resource types include:

          • Elastic IP addresses

          • Application Load Balancers

          • Amazon RDS

          • NAT gateways in regional availability mode

          • Lambda Network Connector

          • Automated Internet Firewall

        • AllocationRules (list) --

          The allocation rules in the IPAM policy document.

          Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

          • (dict) --

            Information about an IPAM policy allocation rule.

            Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

            • SourceIpamPoolId (string) --

              The ID of the source IPAM pool for the allocation rule.

              An IPAM pool is a collection of IP addresses in IPAM that can be allocated to Amazon Web Services resources.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

GetIpamRoutingPolicyRegistrations (updated) Link ¶
Changes (response)
{'IpamRoutingPolicyRegistrations': {'State': {'disable-complete'}}}

Retrieves routing policy registrations for an IPAM internet registry association. Each registration represents a Route Origin Authorization (ROA) that has been created or is pending publication to the RPKI. We recommend using pagination to ensure that the operation returns quickly and successfully.

See also: AWS API Documentation

Request Syntax

client.get_ipam_routing_policy_registrations(
    DryRun=True|False,
    IpamInternetRegistryAssociationId='string',
    Cidr='string',
    MaxResults=123,
    NextToken='string'
)
type DryRun:

boolean

param DryRun:

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

type IpamInternetRegistryAssociationId:

string

param IpamInternetRegistryAssociationId:

[REQUIRED]

The ID of the IPAM internet registry association.

type Cidr:

string

param Cidr:

Filter results to a specific CIDR prefix.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return in a single call. If not specified, all available results are returned. To retrieve the remaining results, make another call with the returned nextToken value.

type NextToken:

string

param NextToken:

The token for the next page of results.

rtype:

dict

returns:

Response Syntax

{
    'IpamRoutingPolicyRegistrations': [
        {
            'Cidr': 'string',
            'Asns': [
                'string',
            ],
            'PermitMoreSpecificAnnouncements': True|False,
            'MaxLength': 123,
            'Description': 'string',
            'LatestDeltaId': 'string',
            'State': 'pending-activate'|'activate-failed'|'create-in-progress'|'create-complete'|'update-in-progress'|'update-complete'|'delete-in-progress'|'delete-complete'|'disable-complete'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • IpamRoutingPolicyRegistrations (list) --

      The routing policy registrations.

      • (dict) --

        Contains information about a routing policy registration that represents a Route Origin Authorization (ROA) managed through IPAM.

        • Cidr (string) --

          The IP address prefix in CIDR notation authorized by the ROA.

        • Asns (list) --

          The Autonomous System Numbers (ASNs) authorized to originate the prefix.

          • (string) --

        • PermitMoreSpecificAnnouncements (boolean) --

          Specifies whether to permit more specific route announcements than the CIDR prefix. When enabled, ASNs can announce sub-prefixes of the authorized CIDR up to the specified maximum length. Default: false.

        • MaxLength (integer) --

          The maximum prefix length that the ASNs are authorized to announce.

        • Description (string) --

          The description of the routing policy registration.

        • LatestDeltaId (string) --

          The ID of the most recent delta that modified this registration.

        • State (string) --

          The state of the routing policy registration. Valid values: pending-activate | activate-failed | create-in-progress | create-complete | update-in-progress | update-complete | delete-in-progress | delete-complete | disable-complete.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

ModifyDefaultCreditSpecification (updated) Link ¶
Changes (request, response)
Request
{'InstanceFamily': {'t9g'}}
Response
{'InstanceFamilyCreditSpecification': {'InstanceFamily': {'t9g'}}}

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

client.modify_default_credit_specification(
    DryRun=True|False,
    InstanceFamily='t2'|'t3'|'t3a'|'t4g'|'t8i'|'t9g',
    CpuCredits='string'
)
type DryRun:

boolean

param DryRun:

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

type InstanceFamily:

string

param InstanceFamily:

[REQUIRED]

The instance family.

type CpuCredits:

string

param CpuCredits:

[REQUIRED]

The credit option for CPU usage of the instance family.

Valid Values: standard | unlimited

rtype:

dict

returns:

Response Syntax

{
    'InstanceFamilyCreditSpecification': {
        'InstanceFamily': 't2'|'t3'|'t3a'|'t4g'|'t8i'|'t9g',
        '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.

ModifyIpamPolicyAllocationRules (updated) Link ¶
Changes (request, response)
Request
{'ResourceType': {'lambda-network-connector', 'igw-firewall'}}
Response
{'IpamPolicyDocument': {'ResourceType': {'igw-firewall',
                                         'lambda-network-connector'}}}

Modifies the allocation rules in an IPAM policy.

An IPAM policy is a set of rules that define how public IPv4 addresses from IPAM pools are allocated to Amazon Web Services resources. Each rule maps an Amazon Web Services service to IPAM pools that the service will use to get IP addresses. A single policy can have multiple rules and be applied to multiple Amazon Web Services Regions. If the IPAM pool run out of addresses then the services fallback to Amazon-provided IP addresses. A policy can be applied to an individual Amazon Web Services account or an entity within Amazon Web Services Organizations.

Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

See also: AWS API Documentation

Request Syntax

client.modify_ipam_policy_allocation_rules(
    DryRun=True|False,
    IpamPolicyId='string',
    Locale='string',
    ResourceType='alb'|'eip'|'rds'|'rnat'|'lambda-network-connector'|'igw-firewall',
    AllocationRules=[
        {
            'SourceIpamPoolId': 'string'
        },
    ]
)
type DryRun:

boolean

param DryRun:

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.

type IpamPolicyId:

string

param IpamPolicyId:

[REQUIRED]

The ID of the IPAM policy whose allocation rules you want to modify.

type Locale:

string

param Locale:

[REQUIRED]

The locale for which to modify the allocation rules.

type ResourceType:

string

param ResourceType:

[REQUIRED]

The resource type for which to modify the allocation rules.

The Amazon Web Services service or resource type that can use IP addresses through IPAM policies. Supported services and resource types include:

  • Elastic IP addresses

  • Application Load Balancers

  • Amazon RDS

  • NAT gateways in regional availability mode

  • Lambda Network Connector

  • Automated Internet Firewall

type AllocationRules:

list

param AllocationRules:

The new allocation rules to apply to the IPAM policy.

Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

  • (dict) --

    Information about a requested IPAM policy allocation rule.

    Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

    • SourceIpamPoolId (string) --

      The ID of the source IPAM pool for the requested allocation rule.

      An IPAM pool is a collection of IP addresses in IPAM that can be allocated to Amazon Web Services resources.

rtype:

dict

returns:

Response Syntax

{
    'IpamPolicyDocument': {
        'IpamPolicyId': 'string',
        'Locale': 'string',
        'ResourceType': 'alb'|'eip'|'rds'|'rnat'|'lambda-network-connector'|'igw-firewall',
        'AllocationRules': [
            {
                'SourceIpamPoolId': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • IpamPolicyDocument (dict) --

      The modified IPAM policy containing the updated allocation rules.

      • IpamPolicyId (string) --

        The ID of the IPAM policy.

      • Locale (string) --

        The locale of the IPAM policy document.

      • ResourceType (string) --

        The resource type of the IPAM policy document.

        The Amazon Web Services service or resource type that can use IP addresses through IPAM policies. Supported services and resource types include:

        • Elastic IP addresses

        • Application Load Balancers

        • Amazon RDS

        • NAT gateways in regional availability mode

        • Lambda Network Connector

        • Automated Internet Firewall

      • AllocationRules (list) --

        The allocation rules in the IPAM policy document.

        Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

        • (dict) --

          Information about an IPAM policy allocation rule.

          Allocation rules are optional configurations within an IPAM policy that map Amazon Web Services resource types to specific IPAM pools. If no rules are defined, the resource types default to using Amazon-provided IP addresses.

          • SourceIpamPoolId (string) --

            The ID of the source IPAM pool for the allocation rule.

            An IPAM pool is a collection of IP addresses in IPAM that can be allocated to Amazon Web Services resources.