EC2 / Client / create_transit_gateway_connect_peer

create_transit_gateway_connect_peer#

EC2.Client.create_transit_gateway_connect_peer(**kwargs)#

Creates a Connect peer for a specified transit gateway Connect attachment between a transit gateway and an appliance.

The peer address and transit gateway address must be the same IP address family (IPv4 or IPv6).

For more information, see Connect peers in the Transit Gateways Guide.

See also: AWS API Documentation

Request Syntax

response = client.create_transit_gateway_connect_peer(
    TransitGatewayAttachmentId='string',
    TransitGatewayAddress='string',
    PeerAddress='string',
    BgpOptions={
        'PeerAsn': 123
    },
    InsideCidrBlocks=[
        'string',
    ],
    TagSpecifications=[
        {
            'ResourceType': 'capacity-reservation'|'client-vpn-endpoint'|'customer-gateway'|'carrier-gateway'|'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'|'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'|'ipam-resource-discovery'|'ipam-resource-discovery-association'|'instance-connect-endpoint',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    DryRun=True|False
)
Parameters:
  • TransitGatewayAttachmentId (string) –

    [REQUIRED]

    The ID of the Connect attachment.

  • TransitGatewayAddress (string) – The peer IP address (GRE outer IP address) on the transit gateway side of the Connect peer, which must be specified from a transit gateway CIDR block. If not specified, Amazon automatically assigns the first available IP address from the transit gateway CIDR block.

  • PeerAddress (string) –

    [REQUIRED]

    The peer IP address (GRE outer IP address) on the appliance side of the Connect peer.

  • BgpOptions (dict) –

    The BGP options for the Connect peer.

    • PeerAsn (integer) –

      The peer Autonomous System Number (ASN).

  • InsideCidrBlocks (list) –

    [REQUIRED]

    The range of inside IP addresses that are used for BGP peering. You must specify a size /29 IPv4 CIDR block from the 169.254.0.0/16 range. The first address from the range must be configured on the appliance as the BGP IP address. You can also optionally specify a size /125 IPv6 CIDR block from the fd00::/8 range.

    • (string) –

  • TagSpecifications (list) –

    The tags to apply to the Connect peer.

    • (dict) –

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

      Note

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

      • ResourceType (string) –

        The type of resource to tag on creation.

      • Tags (list) –

        The tags to apply to the resource.

        • (dict) –

          Describes a tag.

          • Key (string) –

            The key of the tag.

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

          • Value (string) –

            The value of the tag.

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

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

Return type:

dict

Returns:

Response Syntax

{
    'TransitGatewayConnectPeer': {
        'TransitGatewayAttachmentId': 'string',
        'TransitGatewayConnectPeerId': 'string',
        'State': 'pending'|'available'|'deleting'|'deleted',
        'CreationTime': datetime(2015, 1, 1),
        'ConnectPeerConfiguration': {
            'TransitGatewayAddress': 'string',
            'PeerAddress': 'string',
            'InsideCidrBlocks': [
                'string',
            ],
            'Protocol': 'gre',
            'BgpConfigurations': [
                {
                    'TransitGatewayAsn': 123,
                    'PeerAsn': 123,
                    'TransitGatewayAddress': 'string',
                    'PeerAddress': 'string',
                    'BgpStatus': 'up'|'down'
                },
            ]
        },
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • TransitGatewayConnectPeer (dict) –

      Information about the Connect peer.

      • TransitGatewayAttachmentId (string) –

        The ID of the Connect attachment.

      • TransitGatewayConnectPeerId (string) –

        The ID of the Connect peer.

      • State (string) –

        The state of the Connect peer.

      • CreationTime (datetime) –

        The creation time.

      • ConnectPeerConfiguration (dict) –

        The Connect peer details.

        • TransitGatewayAddress (string) –

          The Connect peer IP address on the transit gateway side of the tunnel.

        • PeerAddress (string) –

          The Connect peer IP address on the appliance side of the tunnel.

        • InsideCidrBlocks (list) –

          The range of interior BGP peer IP addresses.

          • (string) –

        • Protocol (string) –

          The tunnel protocol.

        • BgpConfigurations (list) –

          The BGP configuration details.

          • (dict) –

            The BGP configuration information.

            • TransitGatewayAsn (integer) –

              The transit gateway Autonomous System Number (ASN).

            • PeerAsn (integer) –

              The peer Autonomous System Number (ASN).

            • TransitGatewayAddress (string) –

              The interior BGP peer IP address for the transit gateway.

            • PeerAddress (string) –

              The interior BGP peer IP address for the appliance.

            • BgpStatus (string) –

              The BGP status.

      • Tags (list) –

        The tags for the Connect peer.

        • (dict) –

          Describes a tag.

          • Key (string) –

            The key of the tag.

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

          • Value (string) –

            The value of the tag.

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