EC2 / Client / associate_trunk_interface

associate_trunk_interface#

EC2.Client.associate_trunk_interface(**kwargs)#

Associates a branch network interface with a trunk network interface.

Before you create the association, run the create-network-interface command and set --interface-type to trunk. You must also create a network interface for each branch network interface that you want to associate with the trunk network interface.

See also: AWS API Documentation

Request Syntax

response = client.associate_trunk_interface(
    BranchInterfaceId='string',
    TrunkInterfaceId='string',
    VlanId=123,
    GreKey=123,
    ClientToken='string',
    DryRun=True|False
)
Parameters:
  • BranchInterfaceId (string) –

    [REQUIRED]

    The ID of the branch network interface.

  • TrunkInterfaceId (string) –

    [REQUIRED]

    The ID of the trunk network interface.

  • VlanId (integer) – The ID of the VLAN. This applies to the VLAN protocol.

  • GreKey (integer) – The application key. This applies to the GRE protocol.

  • ClientToken (string) –

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

    This field is autopopulated if not provided.

  • 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

{
    'InterfaceAssociation': {
        'AssociationId': 'string',
        'BranchInterfaceId': 'string',
        'TrunkInterfaceId': 'string',
        'InterfaceProtocol': 'VLAN'|'GRE',
        'VlanId': 123,
        'GreKey': 123,
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    },
    'ClientToken': 'string'
}

Response Structure

  • (dict) –

    • InterfaceAssociation (dict) –

      Information about the association between the trunk network interface and branch network interface.

      • AssociationId (string) –

        The ID of the association.

      • BranchInterfaceId (string) –

        The ID of the branch network interface.

      • TrunkInterfaceId (string) –

        The ID of the trunk network interface.

      • InterfaceProtocol (string) –

        The interface protocol. Valid values are VLAN and GRE.

      • VlanId (integer) –

        The ID of the VLAN when you use the VLAN protocol.

      • GreKey (integer) –

        The application key when you use the GRE protocol.

      • Tags (list) –

        The tags for the trunk interface association.

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

    • ClientToken (string) –

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