EC2.Client.
associate_trunk_interface
(**kwargs)¶Note
This API action is currently in limited preview only . If you are interested in using this feature, contact your account manager.
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
)
[REQUIRED]
The ID of the branch network interface.
[REQUIRED]
The ID of the trunk network interface.
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.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.dict
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.