Amazon Elastic Compute Cloud

2020/06/29 - Amazon Elastic Compute Cloud - 7 new 3 updated api methods

Changes  Virtual Private Cloud (VPC) customers can now create and manage their own Prefix Lists to simplify VPC configurations.

DescribeManagedPrefixLists (new) Link ¶

Describes your managed prefix lists and any AWS-managed prefix lists.

To view the entries for your prefix list, use GetManagedPrefixListEntries .

See also: AWS API Documentation

Request Syntax

client.describe_managed_prefix_lists(
    DryRun=True|False,
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string',
    PrefixListIds=[
        '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.

  • owner-id - The ID of the prefix list owner.

  • prefix-list-id - The ID of the prefix list.

  • prefix-list-name - The name of the prefix list.

  • (dict) --

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

      The filter values. Filter values are case-sensitive.

      • (string) --

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.

type NextToken

string

param NextToken

The token for the next page of results.

type PrefixListIds

list

param PrefixListIds

One or more prefix list IDs.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'PrefixLists': [
        {
            'PrefixListId': 'string',
            'AddressFamily': 'string',
            'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
            'StateMessage': 'string',
            'PrefixListArn': 'string',
            'PrefixListName': 'string',
            'MaxEntries': 123,
            'Version': 123,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ],
            'OwnerId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

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

    • PrefixLists (list) --

      Information about the prefix lists.

      • (dict) --

        Describes a managed prefix list.

        • PrefixListId (string) --

          The ID of the prefix list.

        • AddressFamily (string) --

          The IP address version.

        • State (string) --

          The state of the prefix list.

        • StateMessage (string) --

          The state message.

        • PrefixListArn (string) --

          The Amazon Resource Name (ARN) for the prefix list.

        • PrefixListName (string) --

          The name of the prefix list.

        • MaxEntries (integer) --

          The maximum number of entries for the prefix list.

        • Version (integer) --

          The version of the prefix list.

        • Tags (list) --

          The tags for the prefix list.

          • (dict) --

            Describes a tag.

            • Key (string) --

              The key of the tag.

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

            • Value (string) --

              The value of the tag.

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

        • OwnerId (string) --

          The ID of the owner of the prefix list.

CreateManagedPrefixList (new) Link ¶

Creates a managed prefix list. You can specify one or more entries for the prefix list. Each entry consists of a CIDR block and an optional description.

You must specify the maximum number of entries for the prefix list. The maximum number of entries cannot be changed later.

See also: AWS API Documentation

Request Syntax

client.create_managed_prefix_list(
    DryRun=True|False,
    PrefixListName='string',
    Entries=[
        {
            'Cidr': 'string',
            'Description': 'string'
        },
    ],
    MaxEntries=123,
    TagSpecifications=[
        {
            'ResourceType': 'client-vpn-endpoint'|'customer-gateway'|'dedicated-host'|'dhcp-options'|'elastic-ip'|'elastic-gpu'|'export-image-task'|'export-instance-task'|'fleet'|'fpga-image'|'host-reservation'|'image'|'import-image-task'|'import-snapshot-task'|'instance'|'internet-gateway'|'key-pair'|'launch-template'|'local-gateway-route-table-vpc-association'|'natgateway'|'network-acl'|'network-interface'|'placement-group'|'reserved-instances'|'route-table'|'security-group'|'snapshot'|'spot-fleet-request'|'spot-instances-request'|'subnet'|'traffic-mirror-filter'|'traffic-mirror-session'|'traffic-mirror-target'|'transit-gateway'|'transit-gateway-attachment'|'transit-gateway-multicast-domain'|'transit-gateway-route-table'|'volume'|'vpc'|'vpc-peering-connection'|'vpn-connection'|'vpn-gateway'|'vpc-flow-log',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    AddressFamily='string',
    ClientToken='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 PrefixListName

string

param PrefixListName

[REQUIRED]

A name for the prefix list.

Constraints: Up to 255 characters in length. The name cannot start with com.amazonaws .

type Entries

list

param Entries

One or more entries for the prefix list.

  • (dict) --

    An entry for a prefix list.

    • Cidr (string) -- [REQUIRED]

      The CIDR block.

    • Description (string) --

      A description for the entry.

      Constraints: Up to 255 characters in length.

type MaxEntries

integer

param MaxEntries

[REQUIRED]

The maximum number of entries for the prefix list.

type TagSpecifications

list

param TagSpecifications

The tags to apply to the prefix list during creation.

  • (dict) --

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

    • ResourceType (string) --

      The type of resource to tag. Currently, the resource types that support tagging on creation are: capacity-reservation | client-vpn-endpoint | dedicated-host | fleet | fpga-image | host-reservation | instance | ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template | natgateway | spot-fleet-request | placement-group | prefix-list | snapshot | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target | transit-gateway | transit-gateway-attachment | transit-gateway-route-table | vpc-endpoint (for interface and gateway endpoints) | vpc-endpoint-service (for AWS PrivateLink) | volume | vpc-flow-log .

      To tag a resource after it has been created, see CreateTags .

    • Tags (list) --

      The tags to apply to the resource.

      • (dict) --

        Describes a tag.

        • Key (string) --

          The key of the tag.

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

        • Value (string) --

          The value of the tag.

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

type AddressFamily

string

param AddressFamily

[REQUIRED]

The IP address type.

Valid Values: IPv4 | IPv6

type ClientToken

string

param ClientToken

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

Constraints: Up to 255 UTF-8 characters in length.

This field is autopopulated if not provided.

rtype

dict

returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OwnerId (string) --

        The ID of the owner of the prefix list.

ModifyManagedPrefixList (new) Link ¶

Modifies the specified managed prefix list.

Adding or removing entries in a prefix list creates a new version of the prefix list. Changing the name of the prefix list does not affect the version.

If you specify a current version number that does not match the true current version number, the request fails.

See also: AWS API Documentation

Request Syntax

client.modify_managed_prefix_list(
    DryRun=True|False,
    PrefixListId='string',
    CurrentVersion=123,
    PrefixListName='string',
    AddEntries=[
        {
            'Cidr': 'string',
            'Description': 'string'
        },
    ],
    RemoveEntries=[
        {
            'Cidr': '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 PrefixListId

string

param PrefixListId

[REQUIRED]

The ID of the prefix list.

type CurrentVersion

integer

param CurrentVersion

The current version of the prefix list.

type PrefixListName

string

param PrefixListName

A name for the prefix list.

type AddEntries

list

param AddEntries

One or more entries to add to the prefix list.

  • (dict) --

    An entry for a prefix list.

    • Cidr (string) -- [REQUIRED]

      The CIDR block.

    • Description (string) --

      A description for the entry.

      Constraints: Up to 255 characters in length.

type RemoveEntries

list

param RemoveEntries

One or more entries to remove from the prefix list.

  • (dict) --

    An entry for a prefix list.

    • Cidr (string) -- [REQUIRED]

      The CIDR block.

rtype

dict

returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OwnerId (string) --

        The ID of the owner of the prefix list.

RestoreManagedPrefixListVersion (new) Link ¶

Restores the entries from a previous version of a managed prefix list to a new version of the prefix list.

See also: AWS API Documentation

Request Syntax

client.restore_managed_prefix_list_version(
    DryRun=True|False,
    PrefixListId='string',
    PreviousVersion=123,
    CurrentVersion=123
)
type DryRun

boolean

param DryRun

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

type PrefixListId

string

param PrefixListId

[REQUIRED]

The ID of the prefix list.

type PreviousVersion

integer

param PreviousVersion

[REQUIRED]

The version to restore.

type CurrentVersion

integer

param CurrentVersion

[REQUIRED]

The current version number for the prefix list.

rtype

dict

returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OwnerId (string) --

        The ID of the owner of the prefix list.

GetManagedPrefixListEntries (new) Link ¶

Gets information about the entries for a specified managed prefix list.

See also: AWS API Documentation

Request Syntax

client.get_managed_prefix_list_entries(
    DryRun=True|False,
    PrefixListId='string',
    TargetVersion=123,
    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 PrefixListId

string

param PrefixListId

[REQUIRED]

The ID of the prefix list.

type TargetVersion

integer

param TargetVersion

The version of the prefix list for which to return the entries. The default is the current version.

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.

type NextToken

string

param NextToken

The token for the next page of results.

rtype

dict

returns

Response Syntax

{
    'Entries': [
        {
            'Cidr': 'string',
            'Description': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Entries (list) --

      Information about the prefix list entries.

      • (dict) --

        Describes a prefix list entry.

        • Cidr (string) --

          The CIDR block.

        • Description (string) --

          The description.

    • NextToken (string) --

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

GetManagedPrefixListAssociations (new) Link ¶

Gets information about the resources that are associated with the specified managed prefix list.

See also: AWS API Documentation

Request Syntax

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

boolean

param DryRun

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

type PrefixListId

string

param PrefixListId

[REQUIRED]

The ID of the prefix list.

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.

type NextToken

string

param NextToken

The token for the next page of results.

rtype

dict

returns

Response Syntax

{
    'PrefixListAssociations': [
        {
            'ResourceId': 'string',
            'ResourceOwner': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PrefixListAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes the resource with which a prefix list is associated.

        • ResourceId (string) --

          The ID of the resource.

        • ResourceOwner (string) --

          The owner of the resource.

    • NextToken (string) --

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

DeleteManagedPrefixList (new) Link ¶

Deletes the specified managed prefix list. You must first remove all references to the prefix list in your resources.

See also: AWS API Documentation

Request Syntax

client.delete_managed_prefix_list(
    DryRun=True|False,
    PrefixListId='string'
)
type DryRun

boolean

param DryRun

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

type PrefixListId

string

param PrefixListId

[REQUIRED]

The ID of the prefix list.

rtype

dict

returns

Response Syntax

{
    'PrefixList': {
        'PrefixListId': 'string',
        'AddressFamily': 'string',
        'State': 'create-in-progress'|'create-complete'|'create-failed'|'modify-in-progress'|'modify-complete'|'modify-failed'|'restore-in-progress'|'restore-complete'|'restore-failed'|'delete-in-progress'|'delete-complete'|'delete-failed',
        'StateMessage': 'string',
        'PrefixListArn': 'string',
        'PrefixListName': 'string',
        'MaxEntries': 123,
        'Version': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        'OwnerId': 'string'
    }
}

Response Structure

  • (dict) --

    • PrefixList (dict) --

      Information about the prefix list.

      • PrefixListId (string) --

        The ID of the prefix list.

      • AddressFamily (string) --

        The IP address version.

      • State (string) --

        The state of the prefix list.

      • StateMessage (string) --

        The state message.

      • PrefixListArn (string) --

        The Amazon Resource Name (ARN) for the prefix list.

      • PrefixListName (string) --

        The name of the prefix list.

      • MaxEntries (integer) --

        The maximum number of entries for the prefix list.

      • Version (integer) --

        The version of the prefix list.

      • Tags (list) --

        The tags for the prefix list.

        • (dict) --

          Describes a tag.

          • Key (string) --

            The key of the tag.

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

          • Value (string) --

            The value of the tag.

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

      • OwnerId (string) --

        The ID of the owner of the prefix list.

CreateRoute (updated) Link ¶
Changes (request)
{'DestinationPrefixListId': 'string'}

Creates a route in a route table within a VPC.

You must specify one of the following targets: internet gateway or virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.

When determining how to route traffic, we use the route with the most specific match. For example, traffic is destined for the IPv4 address 192.0.2.3 , and the route table includes the following two IPv4 routes:

  • 192.0.2.0/24 (goes to some target A)

  • 192.0.2.0/28 (goes to some target B)

Both routes apply to the traffic destined for 192.0.2.3 . However, the second route in the list covers a smaller number of IP addresses and is therefore more specific, so we use that route to determine where to target the traffic.

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

See also: AWS API Documentation

Request Syntax

client.create_route(
    DestinationCidrBlock='string',
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    EgressOnlyInternetGatewayId='string',
    GatewayId='string',
    InstanceId='string',
    NatGatewayId='string',
    TransitGatewayId='string',
    LocalGatewayId='string',
    NetworkInterfaceId='string',
    RouteTableId='string',
    VpcPeeringConnectionId='string'
)
type DestinationCidrBlock

string

param DestinationCidrBlock

The IPv4 CIDR address block used for the destination match. Routing decisions are based on the most specific match. We modify the specified CIDR block to its canonical form; for example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 .

type DestinationIpv6CidrBlock

string

param DestinationIpv6CidrBlock

The IPv6 CIDR block used for the destination match. Routing decisions are based on the most specific match.

type DestinationPrefixListId

string

param DestinationPrefixListId

The ID of a prefix list used for the destination match.

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 EgressOnlyInternetGatewayId

string

param EgressOnlyInternetGatewayId

[IPv6 traffic only] The ID of an egress-only internet gateway.

type GatewayId

string

param GatewayId

The ID of an internet gateway or virtual private gateway attached to your VPC.

type InstanceId

string

param InstanceId

The ID of a NAT instance in your VPC. The operation fails if you specify an instance ID unless exactly one network interface is attached.

type NatGatewayId

string

param NatGatewayId

[IPv4 traffic only] The ID of a NAT gateway.

type TransitGatewayId

string

param TransitGatewayId

The ID of a transit gateway.

type LocalGatewayId

string

param LocalGatewayId

The ID of the local gateway.

type NetworkInterfaceId

string

param NetworkInterfaceId

The ID of a network interface.

type RouteTableId

string

param RouteTableId

[REQUIRED]

The ID of the route table for the route.

type VpcPeeringConnectionId

string

param VpcPeeringConnectionId

The ID of a VPC peering connection.

rtype

dict

returns

Response Syntax

{
    'Return': True|False
}

Response Structure

  • (dict) --

    • Return (boolean) --

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

DeleteRoute (updated) Link ¶
Changes (request)
{'DestinationPrefixListId': 'string'}

Deletes the specified route from the specified route table.

See also: AWS API Documentation

Request Syntax

client.delete_route(
    DestinationCidrBlock='string',
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    RouteTableId='string'
)
type DestinationCidrBlock

string

param DestinationCidrBlock

The IPv4 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

type DestinationIpv6CidrBlock

string

param DestinationIpv6CidrBlock

The IPv6 CIDR range for the route. The value you specify must match the CIDR for the route exactly.

type DestinationPrefixListId

string

param DestinationPrefixListId

The ID of the prefix list for the route.

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 RouteTableId

string

param RouteTableId

[REQUIRED]

The ID of the route table.

returns

None

ReplaceRoute (updated) Link ¶
Changes (request)
{'DestinationPrefixListId': 'string'}

Replaces an existing route within a route table in a VPC. You must provide only one of the following: internet gateway, virtual private gateway, NAT instance, NAT gateway, VPC peering connection, network interface, egress-only internet gateway, or transit gateway.

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

See also: AWS API Documentation

Request Syntax

client.replace_route(
    DestinationCidrBlock='string',
    DestinationIpv6CidrBlock='string',
    DestinationPrefixListId='string',
    DryRun=True|False,
    EgressOnlyInternetGatewayId='string',
    GatewayId='string',
    InstanceId='string',
    LocalTarget=True|False,
    NatGatewayId='string',
    TransitGatewayId='string',
    LocalGatewayId='string',
    NetworkInterfaceId='string',
    RouteTableId='string',
    VpcPeeringConnectionId='string'
)
type DestinationCidrBlock

string

param DestinationCidrBlock

The IPv4 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.

type DestinationIpv6CidrBlock

string

param DestinationIpv6CidrBlock

The IPv6 CIDR address block used for the destination match. The value that you provide must match the CIDR of an existing route in the table.

type DestinationPrefixListId

string

param DestinationPrefixListId

The ID of the prefix list for the route.

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 EgressOnlyInternetGatewayId

string

param EgressOnlyInternetGatewayId

[IPv6 traffic only] The ID of an egress-only internet gateway.

type GatewayId

string

param GatewayId

The ID of an internet gateway or virtual private gateway.

type InstanceId

string

param InstanceId

The ID of a NAT instance in your VPC.

type LocalTarget

boolean

param LocalTarget

Specifies whether to reset the local route to its default target (local ).

type NatGatewayId

string

param NatGatewayId

[IPv4 traffic only] The ID of a NAT gateway.

type TransitGatewayId

string

param TransitGatewayId

The ID of a transit gateway.

type LocalGatewayId

string

param LocalGatewayId

The ID of the local gateway.

type NetworkInterfaceId

string

param NetworkInterfaceId

The ID of a network interface.

type RouteTableId

string

param RouteTableId

[REQUIRED]

The ID of the route table.

type VpcPeeringConnectionId

string

param VpcPeeringConnectionId

The ID of a VPC peering connection.

returns

None