DirectConnectClient#
Index > DirectConnect > DirectConnectClient
Auto-generated documentation for DirectConnect type annotations stubs module mypy-boto3-directconnect.
DirectConnectClient#
Type annotations and code completion for boto3.client("directconnect")
.
boto3 documentation
# DirectConnectClient usage example
from boto3.session import Session
from mypy_boto3_directconnect.client import DirectConnectClient
def get_directconnect_client() -> DirectConnectClient:
return Session().client("directconnect")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("directconnect").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("directconnect")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.DirectConnectClientException,
client.exceptions.DirectConnectServerException,
client.exceptions.DuplicateTagKeysException,
client.exceptions.TooManyTagsException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_directconnect.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
accept_direct_connect_gateway_association_proposal#
Accepts a proposal request to attach a virtual private gateway or transit gateway to a Direct Connect gateway.
Type annotations and code completion for boto3.client("directconnect").accept_direct_connect_gateway_association_proposal
method.
boto3 documentation
# accept_direct_connect_gateway_association_proposal method definition
def accept_direct_connect_gateway_association_proposal(
self,
*,
directConnectGatewayId: str,
proposalId: str,
associatedGatewayOwnerAccount: str,
overrideAllowedPrefixesToDirectConnectGateway: Sequence[RouteFilterPrefixTypeDef] = ..., # (1)
) -> AcceptDirectConnectGatewayAssociationProposalResultTypeDef: # (2)
...
# accept_direct_connect_gateway_association_proposal method usage example with argument unpacking
kwargs: AcceptDirectConnectGatewayAssociationProposalRequestRequestTypeDef = { # (1)
"directConnectGatewayId": ...,
"proposalId": ...,
"associatedGatewayOwnerAccount": ...,
}
parent.accept_direct_connect_gateway_association_proposal(**kwargs)
allocate_connection_on_interconnect#
Deprecated.
Type annotations and code completion for boto3.client("directconnect").allocate_connection_on_interconnect
method.
boto3 documentation
# allocate_connection_on_interconnect method definition
def allocate_connection_on_interconnect(
self,
*,
bandwidth: str,
connectionName: str,
ownerAccount: str,
interconnectId: str,
vlan: int,
) -> ConnectionResponseTypeDef: # (1)
...
# allocate_connection_on_interconnect method usage example with argument unpacking
kwargs: AllocateConnectionOnInterconnectRequestRequestTypeDef = { # (1)
"bandwidth": ...,
"connectionName": ...,
"ownerAccount": ...,
"interconnectId": ...,
"vlan": ...,
}
parent.allocate_connection_on_interconnect(**kwargs)
allocate_hosted_connection#
Creates a hosted connection on the specified interconnect or a link aggregation group (LAG) of interconnects.
Type annotations and code completion for boto3.client("directconnect").allocate_hosted_connection
method.
boto3 documentation
# allocate_hosted_connection method definition
def allocate_hosted_connection(
self,
*,
connectionId: str,
ownerAccount: str,
bandwidth: str,
connectionName: str,
vlan: int,
tags: Sequence[TagTypeDef] = ..., # (1)
) -> ConnectionResponseTypeDef: # (2)
...
- See TagTypeDef
- See ConnectionResponseTypeDef
# allocate_hosted_connection method usage example with argument unpacking
kwargs: AllocateHostedConnectionRequestRequestTypeDef = { # (1)
"connectionId": ...,
"ownerAccount": ...,
"bandwidth": ...,
"connectionName": ...,
"vlan": ...,
}
parent.allocate_hosted_connection(**kwargs)
allocate_private_virtual_interface#
Provisions a private virtual interface to be owned by the specified Amazon Web Services account.
Type annotations and code completion for boto3.client("directconnect").allocate_private_virtual_interface
method.
boto3 documentation
# allocate_private_virtual_interface method definition
def allocate_private_virtual_interface(
self,
*,
connectionId: str,
ownerAccount: str,
newPrivateVirtualInterfaceAllocation: NewPrivateVirtualInterfaceAllocationTypeDef, # (1)
) -> VirtualInterfaceResponseTypeDef: # (2)
...
# allocate_private_virtual_interface method usage example with argument unpacking
kwargs: AllocatePrivateVirtualInterfaceRequestRequestTypeDef = { # (1)
"connectionId": ...,
"ownerAccount": ...,
"newPrivateVirtualInterfaceAllocation": ...,
}
parent.allocate_private_virtual_interface(**kwargs)
allocate_public_virtual_interface#
Provisions a public virtual interface to be owned by the specified Amazon Web Services account.
Type annotations and code completion for boto3.client("directconnect").allocate_public_virtual_interface
method.
boto3 documentation
# allocate_public_virtual_interface method definition
def allocate_public_virtual_interface(
self,
*,
connectionId: str,
ownerAccount: str,
newPublicVirtualInterfaceAllocation: NewPublicVirtualInterfaceAllocationTypeDef, # (1)
) -> VirtualInterfaceResponseTypeDef: # (2)
...
# allocate_public_virtual_interface method usage example with argument unpacking
kwargs: AllocatePublicVirtualInterfaceRequestRequestTypeDef = { # (1)
"connectionId": ...,
"ownerAccount": ...,
"newPublicVirtualInterfaceAllocation": ...,
}
parent.allocate_public_virtual_interface(**kwargs)
allocate_transit_virtual_interface#
Provisions a transit virtual interface to be owned by the specified Amazon Web Services account.
Type annotations and code completion for boto3.client("directconnect").allocate_transit_virtual_interface
method.
boto3 documentation
# allocate_transit_virtual_interface method definition
def allocate_transit_virtual_interface(
self,
*,
connectionId: str,
ownerAccount: str,
newTransitVirtualInterfaceAllocation: NewTransitVirtualInterfaceAllocationTypeDef, # (1)
) -> AllocateTransitVirtualInterfaceResultTypeDef: # (2)
...
# allocate_transit_virtual_interface method usage example with argument unpacking
kwargs: AllocateTransitVirtualInterfaceRequestRequestTypeDef = { # (1)
"connectionId": ...,
"ownerAccount": ...,
"newTransitVirtualInterfaceAllocation": ...,
}
parent.allocate_transit_virtual_interface(**kwargs)
associate_connection_with_lag#
Associates an existing connection with a link aggregation group (LAG).
Type annotations and code completion for boto3.client("directconnect").associate_connection_with_lag
method.
boto3 documentation
# associate_connection_with_lag method definition
def associate_connection_with_lag(
self,
*,
connectionId: str,
lagId: str,
) -> ConnectionResponseTypeDef: # (1)
...
# associate_connection_with_lag method usage example with argument unpacking
kwargs: AssociateConnectionWithLagRequestRequestTypeDef = { # (1)
"connectionId": ...,
"lagId": ...,
}
parent.associate_connection_with_lag(**kwargs)
associate_hosted_connection#
Associates a hosted connection and its virtual interfaces with a link aggregation group (LAG) or interconnect.
Type annotations and code completion for boto3.client("directconnect").associate_hosted_connection
method.
boto3 documentation
# associate_hosted_connection method definition
def associate_hosted_connection(
self,
*,
connectionId: str,
parentConnectionId: str,
) -> ConnectionResponseTypeDef: # (1)
...
# associate_hosted_connection method usage example with argument unpacking
kwargs: AssociateHostedConnectionRequestRequestTypeDef = { # (1)
"connectionId": ...,
"parentConnectionId": ...,
}
parent.associate_hosted_connection(**kwargs)
associate_mac_sec_key#
Associates a MAC Security (MACsec) Connection Key Name (CKN)/ Connectivity Association Key (CAK) pair with an Direct Connect dedicated connection.
Type annotations and code completion for boto3.client("directconnect").associate_mac_sec_key
method.
boto3 documentation
# associate_mac_sec_key method definition
def associate_mac_sec_key(
self,
*,
connectionId: str,
secretARN: str = ...,
ckn: str = ...,
cak: str = ...,
) -> AssociateMacSecKeyResponseTypeDef: # (1)
...
# associate_mac_sec_key method usage example with argument unpacking
kwargs: AssociateMacSecKeyRequestRequestTypeDef = { # (1)
"connectionId": ...,
}
parent.associate_mac_sec_key(**kwargs)
associate_virtual_interface#
Associates a virtual interface with a specified link aggregation group (LAG) or connection.
Type annotations and code completion for boto3.client("directconnect").associate_virtual_interface
method.
boto3 documentation
# associate_virtual_interface method definition
def associate_virtual_interface(
self,
*,
virtualInterfaceId: str,
connectionId: str,
) -> VirtualInterfaceResponseTypeDef: # (1)
...
# associate_virtual_interface method usage example with argument unpacking
kwargs: AssociateVirtualInterfaceRequestRequestTypeDef = { # (1)
"virtualInterfaceId": ...,
"connectionId": ...,
}
parent.associate_virtual_interface(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("directconnect").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("directconnect").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
confirm_connection#
Confirms the creation of the specified hosted connection on an interconnect.
Type annotations and code completion for boto3.client("directconnect").confirm_connection
method.
boto3 documentation
# confirm_connection method definition
def confirm_connection(
self,
*,
connectionId: str,
) -> ConfirmConnectionResponseTypeDef: # (1)
...