Amazon Elastic Compute Cloud

2022/10/31 - Amazon Elastic Compute Cloud - 4 new api methods

Changes  Elastic IP transfer is a new Amazon VPC feature that allows you to transfer your Elastic IP addresses from one AWS Account to another.

DisableAddressTransfer (new) Link ¶

Disables Elastic IP address transfer. For more information, see Transfer Elastic IP addresses in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

client.disable_address_transfer(
    AllocationId='string',
    DryRun=True|False
)
type AllocationId

string

param AllocationId

[REQUIRED]

The allocation ID of an Elastic IP address.

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

{
    'AddressTransfer': {
        'PublicIp': 'string',
        'AllocationId': 'string',
        'TransferAccountId': 'string',
        'TransferOfferExpirationTimestamp': datetime(2015, 1, 1),
        'TransferOfferAcceptedTimestamp': datetime(2015, 1, 1),
        'AddressTransferStatus': 'pending'|'disabled'|'accepted'
    }
}

Response Structure

  • (dict) --

    • AddressTransfer (dict) --

      An Elastic IP address transfer.

      • PublicIp (string) --

        The Elastic IP address being transferred.

      • AllocationId (string) --

        The allocation ID of an Elastic IP address.

      • TransferAccountId (string) --

        The ID of the account that you want to transfer the Elastic IP address to.

      • TransferOfferExpirationTimestamp (datetime) --

        The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.

      • TransferOfferAcceptedTimestamp (datetime) --

        The timestamp when the Elastic IP address transfer was accepted.

      • AddressTransferStatus (string) --

        The Elastic IP address transfer status.

AcceptAddressTransfer (new) Link ¶

Accepts an Elastic IP address transfer. For more information, see Accept a transferred Elastic IP address in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

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

string

param Address

[REQUIRED]

The Elastic IP address you are accepting for transfer.

type TagSpecifications

list

param TagSpecifications

tag :<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA , specify tag:Owner for the filter name and TeamA for the filter value.

  • (dict) --

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

    Note

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

    • ResourceType (string) --

      The type of resource to tag on creation.

    • Tags (list) --

      The tags to apply to the resource.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

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

{
    'AddressTransfer': {
        'PublicIp': 'string',
        'AllocationId': 'string',
        'TransferAccountId': 'string',
        'TransferOfferExpirationTimestamp': datetime(2015, 1, 1),
        'TransferOfferAcceptedTimestamp': datetime(2015, 1, 1),
        'AddressTransferStatus': 'pending'|'disabled'|'accepted'
    }
}

Response Structure

  • (dict) --

    • AddressTransfer (dict) --

      An Elastic IP address transfer.

      • PublicIp (string) --

        The Elastic IP address being transferred.

      • AllocationId (string) --

        The allocation ID of an Elastic IP address.

      • TransferAccountId (string) --

        The ID of the account that you want to transfer the Elastic IP address to.

      • TransferOfferExpirationTimestamp (datetime) --

        The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.

      • TransferOfferAcceptedTimestamp (datetime) --

        The timestamp when the Elastic IP address transfer was accepted.

      • AddressTransferStatus (string) --

        The Elastic IP address transfer status.

EnableAddressTransfer (new) Link ¶

Enables Elastic IP address transfer. For more information, see Transfer Elastic IP addresses in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

client.enable_address_transfer(
    AllocationId='string',
    TransferAccountId='string',
    DryRun=True|False
)
type AllocationId

string

param AllocationId

[REQUIRED]

The allocation ID of an Elastic IP address.

type TransferAccountId

string

param TransferAccountId

[REQUIRED]

The ID of the account that you want to transfer the Elastic IP address to.

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

{
    'AddressTransfer': {
        'PublicIp': 'string',
        'AllocationId': 'string',
        'TransferAccountId': 'string',
        'TransferOfferExpirationTimestamp': datetime(2015, 1, 1),
        'TransferOfferAcceptedTimestamp': datetime(2015, 1, 1),
        'AddressTransferStatus': 'pending'|'disabled'|'accepted'
    }
}

Response Structure

  • (dict) --

    • AddressTransfer (dict) --

      An Elastic IP address transfer.

      • PublicIp (string) --

        The Elastic IP address being transferred.

      • AllocationId (string) --

        The allocation ID of an Elastic IP address.

      • TransferAccountId (string) --

        The ID of the account that you want to transfer the Elastic IP address to.

      • TransferOfferExpirationTimestamp (datetime) --

        The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.

      • TransferOfferAcceptedTimestamp (datetime) --

        The timestamp when the Elastic IP address transfer was accepted.

      • AddressTransferStatus (string) --

        The Elastic IP address transfer status.

DescribeAddressTransfers (new) Link ¶

Describes an Elastic IP address transfer. For more information, see Transfer Elastic IP addresses in the Amazon Virtual Private Cloud User Guide .

See also: AWS API Documentation

Request Syntax

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

list

param AllocationIds

The allocation IDs of Elastic IP addresses.

  • (string) --

type NextToken

string

param NextToken

Specify the pagination token from a previous request to retrieve the next page of results.

type MaxResults

integer

param MaxResults

The maximum number of address transfers to return in one page of results.

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

{
    'AddressTransfers': [
        {
            'PublicIp': 'string',
            'AllocationId': 'string',
            'TransferAccountId': 'string',
            'TransferOfferExpirationTimestamp': datetime(2015, 1, 1),
            'TransferOfferAcceptedTimestamp': datetime(2015, 1, 1),
            'AddressTransferStatus': 'pending'|'disabled'|'accepted'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AddressTransfers (list) --

      The Elastic IP address transfer.

      • (dict) --

        Details on the Elastic IP address transfer. For more information, see Transfer Elastic IP addresses in the Amazon Virtual Private Cloud User Guide .

        • PublicIp (string) --

          The Elastic IP address being transferred.

        • AllocationId (string) --

          The allocation ID of an Elastic IP address.

        • TransferAccountId (string) --

          The ID of the account that you want to transfer the Elastic IP address to.

        • TransferOfferExpirationTimestamp (datetime) --

          The timestamp when the Elastic IP address transfer expired. When the source account starts the transfer, the transfer account has seven hours to allocate the Elastic IP address to complete the transfer, or the Elastic IP address will return to its original owner.

        • TransferOfferAcceptedTimestamp (datetime) --

          The timestamp when the Elastic IP address transfer was accepted.

        • AddressTransferStatus (string) --

          The Elastic IP address transfer status.

    • NextToken (string) --

      Specify the pagination token from a previous request to retrieve the next page of results.