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#
.
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.