createConnection method
Initiates the process to create a Connection across the specified Environment.
The Environment dictates the specified partner and location to which the other end of the connection should attach. You can see a list of the available Environments by calling ListEnvironments
The Attach Point specifies where within the AWS Network your connection will logically connect.
After a successful call to this method, the resulting Connection will return an Activation Key which will need to be brought to the specific partner's portal to confirm the Connection on both sides. (See Environment$activationPageUrl for a direct link to the partner portal).
Parameter attachPoint :
The Attach Point to which the connection should be associated."
Parameter bandwidth :
The desired bandwidth of the requested Connection
Parameter environmentId :
The identifier of the Environment across which this
Connection should be created.
The available Environment objects can be determined using ListEnvironments.
Parameter clientToken :
Idempotency token used for the request.
Parameter description :
A description to distinguish this Connection.
Parameter remoteAccount :
Account and/or principal identifying information that can be verified by
the partner of this specific Environment.
Parameter tags :
The tag to associate with the resulting Connection.
Implementation
Future<CreateConnectionResponse> createConnection({
required AttachPoint attachPoint,
required String bandwidth,
required String environmentId,
String? clientToken,
String? description,
RemoteAccountIdentifier? remoteAccount,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'Interconnect.CreateConnection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'attachPoint': attachPoint,
'bandwidth': bandwidth,
'environmentId': environmentId,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (remoteAccount != null) 'remoteAccount': remoteAccount,
if (tags != null) 'tags': tags,
},
);
return CreateConnectionResponse.fromJson(jsonResponse.body);
}