updateConnection method
Modifies an existing connection. Currently we support modifications to the connection's description and/or bandwidth.
Parameter identifier :
The identifier of the Connection that should be updated.
Parameter bandwidth :
Request a new bandwidth size on the given Connection.
Note that changes to the size may be subject to additional policy, and does require the remote partner provider to acknowledge and permit this new bandwidth size.
Parameter clientToken :
Idempotency token used for the request.
Parameter description :
An updated description to apply to the Connection
Implementation
Future<UpdateConnectionResponse> updateConnection({
required String identifier,
String? bandwidth,
String? clientToken,
String? description,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'Interconnect.UpdateConnection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'identifier': identifier,
if (bandwidth != null) 'bandwidth': bandwidth,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
},
);
return UpdateConnectionResponse.fromJson(jsonResponse.body);
}