Table of Contents
DirectConnect.
Client
¶A low-level client representing AWS Direct Connect:
client = session.create_client('directconnect')
These are the available methods:
allocate_connection_on_interconnect()
allocate_private_virtual_interface()
allocate_public_virtual_interface()
can_paginate()
confirm_connection()
confirm_private_virtual_interface()
confirm_public_virtual_interface()
create_connection()
create_interconnect()
create_private_virtual_interface()
create_public_virtual_interface()
delete_connection()
delete_interconnect()
delete_virtual_interface()
describe_connections()
describe_connections_on_interconnect()
describe_interconnects()
describe_locations()
describe_virtual_gateways()
describe_virtual_interfaces()
generate_presigned_url()
get_paginator()
get_waiter()
allocate_connection_on_interconnect
(**kwargs)¶Creates a hosted connection on an interconnect.
Allocates a VLAN number and a specified amount of bandwidth for use by a hosted connection on the given interconnect.
Request Syntax
response = client.allocate_connection_on_interconnect(
bandwidth='string',
connectionName='string',
ownerAccount='string',
interconnectId='string',
vlan=123
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ownerAccount': 'string',
'connectionId': 'string',
'connectionName': 'string',
'connectionState': 'ordering'|'requested'|'pending'|'available'|'down'|'deleting'|'deleted'|'rejected',
'region': 'string',
'location': 'string',
'bandwidth': 'string',
'vlan': 123,
'partnerName': 'string'
}
Response Structure
|
allocate_private_virtual_interface
(**kwargs)¶Provisions a private virtual interface to be owned by a different customer.
The owner of a connection calls this function to provision a private virtual interface which will be owned by another AWS customer.
Virtual interfaces created using this function must be confirmed by the virtual interface owner by calling ConfirmPrivateVirtualInterface. Until this step has been completed, the virtual interface will be in 'Confirming' state, and will not be available for handling traffic.
Request Syntax
response = client.allocate_private_virtual_interface(
connectionId='string',
ownerAccount='string',
newPrivateVirtualInterfaceAllocation={
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ownerAccount': 'string',
'virtualInterfaceId': 'string',
'location': 'string',
'connectionId': 'string',
'virtualInterfaceType': 'string',
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected',
'customerRouterConfig': 'string',
'virtualGatewayId': 'string',
'routeFilterPrefixes': [
{
'cidr': 'string'
},
]
}
Response Structure
|
allocate_public_virtual_interface
(**kwargs)¶Provisions a public virtual interface to be owned by a different customer.
The owner of a connection calls this function to provision a public virtual interface which will be owned by another AWS customer.
Virtual interfaces created using this function must be confirmed by the virtual interface owner by calling ConfirmPublicVirtualInterface. Until this step has been completed, the virtual interface will be in 'Confirming' state, and will not be available for handling traffic.
Request Syntax
response = client.allocate_public_virtual_interface(
connectionId='string',
ownerAccount='string',
newPublicVirtualInterfaceAllocation={
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'routeFilterPrefixes': [
{
'cidr': 'string'
},
]
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ownerAccount': 'string',
'virtualInterfaceId': 'string',
'location': 'string',
'connectionId': 'string',
'virtualInterfaceType': 'string',
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected',
'customerRouterConfig': 'string',
'virtualGatewayId': 'string',
'routeFilterPrefixes': [
{
'cidr': 'string'
},
]
}
Response Structure
|
can_paginate
(operation_name)¶Check if an operation can be paginated.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Returns: | True if the operation can be paginated,
False otherwise. |
confirm_connection
(**kwargs)¶Confirm the creation of a hosted connection on an interconnect.
Upon creation, the hosted connection is initially in the 'Ordering' state, and will remain in this state until the owner calls ConfirmConnection to confirm creation of the hosted connection.
Request Syntax
response = client.confirm_connection(
connectionId='string'
)
Parameters: | connectionId (string) -- [REQUIRED] ID of the connection. Example: dxcon-fg5678gh Default: None |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'connectionState': 'ordering'|'requested'|'pending'|'available'|'down'|'deleting'|'deleted'|'rejected'
}
Response Structure
|
confirm_private_virtual_interface
(**kwargs)¶Accept ownership of a private virtual interface created by another customer.
After the virtual interface owner calls this function, the virtual interface will be created and attached to the given virtual private gateway, and will be available for handling traffic.
Request Syntax
response = client.confirm_private_virtual_interface(
virtualInterfaceId='string',
virtualGatewayId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected'
}
Response Structure
|
confirm_public_virtual_interface
(**kwargs)¶Accept ownership of a public virtual interface created by another customer.
After the virtual interface owner calls this function, the specified virtual interface will be created and made available for handling traffic.
Request Syntax
response = client.confirm_public_virtual_interface(
virtualInterfaceId='string'
)
Parameters: | virtualInterfaceId (string) -- [REQUIRED] ID of the virtual interface. Example: dxvif-123dfg56 Default: None |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected'
}
Response Structure
|
create_connection
(**kwargs)¶Creates a new connection between the customer network and a specific AWS Direct Connect location.
A connection links your internal network to an AWS Direct Connect location over a standard 1 gigabit or 10 gigabit Ethernet fiber-optic cable. One end of the cable is connected to your router, the other to an AWS Direct Connect router. An AWS Direct Connect location provides access to Amazon Web Services in the region it is associated with. You can establish connections with AWS Direct Connect locations in multiple regions, but a connection in one region does not provide connectivity to other regions.
Request Syntax
response = client.create_connection(
location='string',
bandwidth='string',
connectionName='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ownerAccount': 'string',
'connectionId': 'string',
'connectionName': 'string',
'connectionState': 'ordering'|'requested'|'pending'|'available'|'down'|'deleting'|'deleted'|'rejected',
'region': 'string',
'location': 'string',
'bandwidth': 'string',
'vlan': 123,
'partnerName': 'string'
}
Response Structure
|
create_interconnect
(**kwargs)¶Creates a new interconnect between a AWS Direct Connect partner's network and a specific AWS Direct Connect location.
An interconnect is a connection which is capable of hosting other connections. The AWS Direct Connect partner can use an interconnect to provide sub-1Gbps AWS Direct Connect service to tier 2 customers who do not have their own connections. Like a standard connection, an interconnect links the AWS Direct Connect partner's network to an AWS Direct Connect location over a standard 1 Gbps or 10 Gbps Ethernet fiber-optic cable. One end is connected to the partner's router, the other to an AWS Direct Connect router.
For each end customer, the AWS Direct Connect partner provisions a connection on their interconnect by calling AllocateConnectionOnInterconnect. The end customer can then connect to AWS resources by creating a virtual interface on their connection, using the VLAN assigned to them by the AWS Direct Connect partner.
Request Syntax
response = client.create_interconnect(
interconnectName='string',
bandwidth='string',
location='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'interconnectId': 'string',
'interconnectName': 'string',
'interconnectState': 'requested'|'pending'|'available'|'down'|'deleting'|'deleted',
'region': 'string',
'location': 'string',
'bandwidth': 'string'
}
Response Structure
|
create_private_virtual_interface
(**kwargs)¶Creates a new private virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A private virtual interface supports sending traffic to a single virtual private cloud (VPC).
Request Syntax
response = client.create_private_virtual_interface(
connectionId='string',
newPrivateVirtualInterface={
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'virtualGatewayId': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ownerAccount': 'string',
'virtualInterfaceId': 'string',
'location': 'string',
'connectionId': 'string',
'virtualInterfaceType': 'string',
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected',
'customerRouterConfig': 'string',
'virtualGatewayId': 'string',
'routeFilterPrefixes': [
{
'cidr': 'string'
},
]
}
Response Structure
|
create_public_virtual_interface
(**kwargs)¶Creates a new public virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A public virtual interface supports sending traffic to public services of AWS such as Amazon Simple Storage Service (Amazon S3).
Request Syntax
response = client.create_public_virtual_interface(
connectionId='string',
newPublicVirtualInterface={
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'routeFilterPrefixes': [
{
'cidr': 'string'
},
]
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'ownerAccount': 'string',
'virtualInterfaceId': 'string',
'location': 'string',
'connectionId': 'string',
'virtualInterfaceType': 'string',
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected',
'customerRouterConfig': 'string',
'virtualGatewayId': 'string',
'routeFilterPrefixes': [
{
'cidr': 'string'
},
]
}
Response Structure
|
delete_connection
(**kwargs)¶Deletes the connection.
Deleting a connection only stops the AWS Direct Connect port hour and data transfer charges. You need to cancel separately with the providers any services or charges for cross-connects or network circuits that connect you to the AWS Direct Connect location.
Request Syntax
response = client.delete_connection(
connectionId='string'
)
Parameters: | connectionId (string) -- [REQUIRED] ID of the connection. Example: dxcon-fg5678gh Default: None |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'ownerAccount': 'string',
'connectionId': 'string',
'connectionName': 'string',
'connectionState': 'ordering'|'requested'|'pending'|'available'|'down'|'deleting'|'deleted'|'rejected',
'region': 'string',
'location': 'string',
'bandwidth': 'string',
'vlan': 123,
'partnerName': 'string'
}
Response Structure
|
delete_interconnect
(**kwargs)¶Deletes the specified interconnect.
Request Syntax
response = client.delete_interconnect(
interconnectId='string'
)
Parameters: | interconnectId (string) -- [REQUIRED] The ID of the interconnect. Example: dxcon-abc123 |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'interconnectState': 'requested'|'pending'|'available'|'down'|'deleting'|'deleted'
}
Response Structure
|
delete_virtual_interface
(**kwargs)¶Deletes a virtual interface.
Request Syntax
response = client.delete_virtual_interface(
virtualInterfaceId='string'
)
Parameters: | virtualInterfaceId (string) -- [REQUIRED] ID of the virtual interface. Example: dxvif-123dfg56 Default: None |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected'
}
Response Structure
|
describe_connections
(**kwargs)¶Displays all connections in this region.
If a connection ID is provided, the call returns only that particular connection.
Request Syntax
response = client.describe_connections(
connectionId='string'
)
Parameters: | connectionId (string) -- ID of the connection. Example: dxcon-fg5678gh Default: None |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'connections': [
{
'ownerAccount': 'string',
'connectionId': 'string',
'connectionName': 'string',
'connectionState': 'ordering'|'requested'|'pending'|'available'|'down'|'deleting'|'deleted'|'rejected',
'region': 'string',
'location': 'string',
'bandwidth': 'string',
'vlan': 123,
'partnerName': 'string'
},
]
}
Response Structure
|
describe_connections_on_interconnect
(**kwargs)¶Return a list of connections that have been provisioned on the given interconnect.
Request Syntax
response = client.describe_connections_on_interconnect(
interconnectId='string'
)
Parameters: | interconnectId (string) -- [REQUIRED] ID of the interconnect on which a list of connection is provisioned. Example: dxcon-abc123 Default: None |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'connections': [
{
'ownerAccount': 'string',
'connectionId': 'string',
'connectionName': 'string',
'connectionState': 'ordering'|'requested'|'pending'|'available'|'down'|'deleting'|'deleted'|'rejected',
'region': 'string',
'location': 'string',
'bandwidth': 'string',
'vlan': 123,
'partnerName': 'string'
},
]
}
Response Structure
|
describe_interconnects
(**kwargs)¶Returns a list of interconnects owned by the AWS account.
If an interconnect ID is provided, it will only return this particular interconnect.
Request Syntax
response = client.describe_interconnects(
interconnectId='string'
)
Parameters: | interconnectId (string) -- The ID of the interconnect. Example: dxcon-abc123 |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'interconnects': [
{
'interconnectId': 'string',
'interconnectName': 'string',
'interconnectState': 'requested'|'pending'|'available'|'down'|'deleting'|'deleted',
'region': 'string',
'location': 'string',
'bandwidth': 'string'
},
]
}
Response Structure
|
describe_locations
()¶Returns the list of AWS Direct Connect locations in the current AWS region. These are the locations that may be selected when calling CreateConnection or CreateInterconnect.
Request Syntax
response = client.describe_locations()
Return type: | dict |
---|---|
Returns: | Response Syntax{
'locations': [
{
'locationCode': 'string',
'locationName': 'string'
},
]
}
Response Structure
|
describe_virtual_gateways
()¶Returns a list of virtual private gateways owned by the AWS account.
You can create one or more AWS Direct Connect private virtual interfaces linking to a virtual private gateway. A virtual private gateway can be managed via Amazon Virtual Private Cloud (VPC) console or the EC2 CreateVpnGateway action.
Request Syntax
response = client.describe_virtual_gateways()
Return type: | dict |
---|---|
Returns: | Response Syntax{
'virtualGateways': [
{
'virtualGatewayId': 'string',
'virtualGatewayState': 'string'
},
]
}
Response Structure
|
describe_virtual_interfaces
(**kwargs)¶Displays all virtual interfaces for an AWS account. Virtual interfaces deleted fewer than 15 minutes before DescribeVirtualInterfaces is called are also returned. If a connection ID is included then only virtual interfaces associated with this connection will be returned. If a virtual interface ID is included then only a single virtual interface will be returned.
A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect location and the customer.
If a connection ID is provided, only virtual interfaces provisioned on the specified connection will be returned. If a virtual interface ID is provided, only this particular virtual interface will be returned.
Request Syntax
response = client.describe_virtual_interfaces(
connectionId='string',
virtualInterfaceId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'virtualInterfaces': [
{
'ownerAccount': 'string',
'virtualInterfaceId': 'string',
'location': 'string',
'connectionId': 'string',
'virtualInterfaceType': 'string',
'virtualInterfaceName': 'string',
'vlan': 123,
'asn': 123,
'authKey': 'string',
'amazonAddress': 'string',
'customerAddress': 'string',
'virtualInterfaceState': 'confirming'|'verifying'|'pending'|'available'|'deleting'|'deleted'|'rejected',
'customerRouterConfig': 'string',
'virtualGatewayId': 'string',
'routeFilterPrefixes': [
{
'cidr': 'string'
},
]
},
]
}
Response Structure
|
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
Parameters: |
|
---|---|
Returns: | The presigned url |
get_paginator
(operation_name)¶Create a paginator for an operation.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Raises OperationNotPageableError: | |
Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
|
Return type: | L{botocore.paginate.Paginator} |
Returns: | A paginator object. |
get_waiter
(waiter_name)¶