Amazon Elastic Compute Cloud

2018/10/23 - Amazon Elastic Compute Cloud - 6 new 2 updated api methods

Changes  Provides customers the ability to Bring Your Own IP (BYOIP) prefix. You can bring part or all of your public IPv4 address range from your on-premises network to your AWS account. You continue to own the address range, but AWS advertises it on the internet.

ProvisionByoipCidr (new) Link ¶

Provisions an address range for use with your AWS resources through bring your own IP addresses (BYOIP) and creates a corresponding address pool. After the address range is provisioned, it is ready to be advertised using AdvertiseByoipCidr.

AWS verifies that you own the address range and are authorized to advertise it. You must ensure that the address range is registered to you and that you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more information, see Bring Your Own IP Addresses (BYOIP) in the Amazon Elastic Compute Cloud User Guide .

Provisioning an address range is an asynchronous operation, so the call returns immediately, but the address range is not ready to use until its status changes from pending-provision to provisioned . To monitor the status of an address range, use DescribeByoipCidrs. To allocate an Elastic IP address from your address pool, use AllocateAddress with either the specific address from the address pool or the ID of the address pool.

See also: AWS API Documentation

Request Syntax

client.provision_byoip_cidr(
    Cidr='string',
    CidrAuthorizationContext={
        'Message': 'string',
        'Signature': 'string'
    },
    Description='string',
    DryRun=True|False
)
type Cidr

string

param Cidr

[REQUIRED]

The public IPv4 address range, in CIDR notation. The most specific prefix that you can specify is /24. The address range cannot overlap with another address range that you've brought to this or another region.

type CidrAuthorizationContext

dict

param CidrAuthorizationContext

A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.

  • Message (string) -- [REQUIRED]

    The plain-text authorization message for the prefix and account.

  • Signature (string) -- [REQUIRED]

    The signed authorization message for the prefix and account.

type Description

string

param Description

A description for the address range and the address pool.

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

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

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address pool.

      • Cidr (string) --

        The public IPv4 address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

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

      • State (string) --

        The state of the address pool.

AdvertiseByoipCidr (new) Link ¶

Advertises an IPv4 address range that is provisioned for use with your AWS resources through bring your own IP addresses (BYOIP).

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

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

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

To stop advertising the BYOIP CIDR, use WithdrawByoipCidr.

See also: AWS API Documentation

Request Syntax

client.advertise_byoip_cidr(
    Cidr='string',
    DryRun=True|False
)
type Cidr

string

param Cidr

[REQUIRED]

The IPv4 address range, in CIDR notation.

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

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

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address range.

      • Cidr (string) --

        The public IPv4 address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

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

      • State (string) --

        The state of the address pool.

WithdrawByoipCidr (new) Link ¶

Stops advertising an IPv4 address range that is provisioned as an address pool.

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

It can take a few minutes before traffic to the specified addresses stops routing to AWS because of BGP propagation delays.

See also: AWS API Documentation

Request Syntax

client.withdraw_byoip_cidr(
    Cidr='string',
    DryRun=True|False
)
type Cidr

string

param Cidr

[REQUIRED]

The public IPv4 address range, in CIDR notation.

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

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

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address pool.

      • Cidr (string) --

        The public IPv4 address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

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

      • State (string) --

        The state of the address pool.

DescribeByoipCidrs (new) Link ¶

Describes the IP address ranges that were specified in calls to ProvisionByoipCidr.

To describe the address pools that were created when you provisioned the address ranges, use DescribePublicIpv4Pools.

See also: AWS API Documentation

Request Syntax

client.describe_byoip_cidrs(
    DryRun=True|False,
    MaxResults=123,
    NextToken='string'
)
type DryRun

boolean

param DryRun

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

type MaxResults

integer

param MaxResults

[REQUIRED]

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

type NextToken

string

param NextToken

The token for the next page of results.

rtype

dict

returns

Response Syntax

{
    'ByoipCidrs': [
        {
            'Cidr': 'string',
            'Description': 'string',
            'StatusMessage': 'string',
            'State': 'advertised'|'deprovisioned'|'failed-deprovision'|'failed-provision'|'pending-deprovision'|'pending-provision'|'provisioned'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ByoipCidrs (list) --

      Information about your address ranges.

      • (dict) --

        Information about an address range that is provisioned for use with your AWS resources through bring your own IP addresses (BYOIP).

        • Cidr (string) --

          The public IPv4 address range, in CIDR notation.

        • Description (string) --

          The description of the address range.

        • StatusMessage (string) --

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

        • State (string) --

          The state of the address pool.

    • NextToken (string) --

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

DescribePublicIpv4Pools (new) Link ¶

Describes the specified IPv4 address pools.

See also: AWS API Documentation

Request Syntax

client.describe_public_ipv4_pools(
    PoolIds=[
        'string',
    ],
    NextToken='string',
    MaxResults=123
)
type PoolIds

list

param PoolIds

The IDs of the address pools.

  • (string) --

type NextToken

string

param NextToken

The token for the next page of results.

type MaxResults

integer

param MaxResults

The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

rtype

dict

returns

Response Syntax

{
    'PublicIpv4Pools': [
        {
            'PoolId': 'string',
            'Description': 'string',
            'PoolAddressRanges': [
                {
                    'FirstAddress': 'string',
                    'LastAddress': 'string',
                    'AddressCount': 123,
                    'AvailableAddressCount': 123
                },
            ],
            'TotalAddressCount': 123,
            'TotalAvailableAddressCount': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PublicIpv4Pools (list) --

      Information about the address pools.

      • (dict) --

        Describes an address pool.

        • PoolId (string) --

          The ID of the IPv4 address pool.

        • Description (string) --

          A description of the address pool.

        • PoolAddressRanges (list) --

          The address ranges.

          • (dict) --

            Describes an address range of an IPv4 address pool.

            • FirstAddress (string) --

              The first IP address in the range.

            • LastAddress (string) --

              The last IP address in the range.

            • AddressCount (integer) --

              The number of addresses in the range.

            • AvailableAddressCount (integer) --

              The number of available addresses in the range.

        • TotalAddressCount (integer) --

          The total number of addresses.

        • TotalAvailableAddressCount (integer) --

          The total number of available addresses.

    • NextToken (string) --

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

DeprovisionByoipCidr (new) Link ¶

Releases the specified address range that you provisioned for use with your AWS resources through bring your own IP addresses (BYOIP) and deletes the corresponding address pool.

Before you can release an address range, you must stop advertising it using WithdrawByoipCidr and you must not have any IP addresses allocated from its address range.

See also: AWS API Documentation

Request Syntax

client.deprovision_byoip_cidr(
    Cidr='string',
    DryRun=True|False
)
type Cidr

string

param Cidr

[REQUIRED]

The public IPv4 address range, in CIDR notation. The prefix must be the same prefix that you specified when you provisioned the address range.

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

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

Response Structure

  • (dict) --

    • ByoipCidr (dict) --

      Information about the address range.

      • Cidr (string) --

        The public IPv4 address range, in CIDR notation.

      • Description (string) --

        The description of the address range.

      • StatusMessage (string) --

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

      • State (string) --

        The state of the address pool.

AllocateAddress (updated) Link ¶
Changes (both)
{'PublicIpv4Pool': 'string'}

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

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

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

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

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

See also: AWS API Documentation

Request Syntax

client.allocate_address(
    Domain='vpc'|'standard',
    Address='string',
    PublicIpv4Pool='string',
    DryRun=True|False
)
type Domain

string

param Domain

Set to vpc to allocate the address for use with instances in a VPC.

Default: The address is for use with instances in EC2-Classic.

type Address

string

param Address

[EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address pool.

type PublicIpv4Pool

string

param PublicIpv4Pool

The ID of an address pool that you own. Use this parameter to let Amazon EC2 select an address from the address pool. To specify a specific address from the address pool, use the Address parameter instead.

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

{
    'PublicIp': 'string',
    'AllocationId': 'string',
    'PublicIpv4Pool': 'string',
    'Domain': 'vpc'|'standard'
}

Response Structure

  • (dict) --

    • PublicIp (string) --

      The Elastic IP address.

    • AllocationId (string) --

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

    • PublicIpv4Pool (string) --

      The ID of an address pool.

    • Domain (string) --

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

DescribeAddresses (updated) Link ¶
Changes (response)
{'Addresses': {'PublicIpv4Pool': 'string'}}

Describes one or more of your Elastic IP addresses.

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

See also: AWS API Documentation

Request Syntax

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

list

param Filters

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

  • allocation-id - [EC2-VPC] The allocation ID for the address.

  • association-id - [EC2-VPC] The association ID for the address.

  • domain - Indicates whether the address is for use in EC2-Classic ( standard ) or in a VPC ( vpc ).

  • instance-id - The ID of the instance the address is associated with, if any.

  • network-interface-id - [EC2-VPC] The ID of the network interface that the address is associated with, if any.

  • network-interface-owner-id - The AWS account ID of the owner.

  • private-ip-address - [EC2-VPC] The private IP address associated with the Elastic IP address.

  • public-ip - The Elastic IP address.

  • 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. The filters supported by a describe operation are documented with the describe operation. For example:

    • DescribeAvailabilityZones

    • DescribeImages

    • DescribeInstances

    • DescribeKeyPairs

    • DescribeSecurityGroups

    • DescribeSnapshots

    • DescribeSubnets

    • DescribeTags

    • DescribeVolumes

    • DescribeVpcs

    • Name (string) --

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

    • Values (list) --

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

      • (string) --

type PublicIps

list

param PublicIps

[EC2-Classic] One or more Elastic IP addresses.

Default: Describes all your Elastic IP addresses.

  • (string) --

type AllocationIds

list

param AllocationIds

[EC2-VPC] One or more allocation IDs.

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 .

rtype

dict

returns

Response Syntax

{
    'Addresses': [
        {
            'InstanceId': 'string',
            'PublicIp': 'string',
            'AllocationId': 'string',
            'AssociationId': 'string',
            'Domain': 'vpc'|'standard',
            'NetworkInterfaceId': 'string',
            'NetworkInterfaceOwnerId': 'string',
            'PrivateIpAddress': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'PublicIpv4Pool': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Addresses (list) --

      Information about one or more Elastic IP addresses.

      • (dict) --

        Describes an Elastic IP address.

        • InstanceId (string) --

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

        • PublicIp (string) --

          The Elastic IP address.

        • AllocationId (string) --

          The ID representing the allocation of the address for use with EC2-VPC.

        • AssociationId (string) --

          The ID representing the association of the address with an instance in a VPC.

        • Domain (string) --

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

        • NetworkInterfaceId (string) --

          The ID of the network interface.

        • NetworkInterfaceOwnerId (string) --

          The ID of the AWS 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 255 Unicode characters.

        • PublicIpv4Pool (string) --

          The ID of an address pool.