allocateHostedConnection method
Creates a hosted connection on the specified interconnect or a link aggregation group (LAG) of interconnects.
Allocates a VLAN number and a specified amount of capacity (bandwidth) for use by a hosted connection on the specified interconnect or LAG of interconnects. Amazon Web Services polices the hosted connection for the specified capacity and the Direct Connect Partner must also police the hosted connection for the specified capacity.
May throw DirectConnectClientException.
May throw DirectConnectServerException.
May throw DuplicateTagKeysException.
May throw TooManyTagsException.
Parameter bandwidth :
The bandwidth of the connection. The possible values are 50Mbps, 100Mbps,
200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, 10Gbps, and
25Gbps. Note that only those Direct Connect Partners who have met specific
requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps, 10Gbps, or
25Gbps hosted connection.
Parameter connectionId :
The ID of the interconnect or LAG.
Parameter connectionName :
The name of the hosted connection.
Parameter ownerAccount :
The ID of the Amazon Web Services account ID of the customer for the
connection.
Parameter vlan :
The dedicated VLAN provisioned to the hosted connection.
Parameter tags :
The tags associated with the connection.
Implementation
Future<Connection> allocateHostedConnection({
required String bandwidth,
required String connectionId,
required String connectionName,
required String ownerAccount,
required int vlan,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'OvertureService.AllocateHostedConnection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'bandwidth': bandwidth,
'connectionId': connectionId,
'connectionName': connectionName,
'ownerAccount': ownerAccount,
'vlan': vlan,
if (tags != null) 'tags': tags,
},
);
return Connection.fromJson(jsonResponse.body);
}