updateConnection method
Updates settings for a connection.
May throw ConcurrentModificationException.
May throw InternalException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
Parameter name :
The name of the connection to update.
Parameter authParameters :
The authorization parameters to use for the connection.
Parameter authorizationType :
The type of authorization to use for the connection.
Parameter description :
A description for the connection.
Implementation
Future<UpdateConnectionResponse> updateConnection({
required String name,
UpdateConnectionAuthRequestParameters? authParameters,
ConnectionAuthorizationType? authorizationType,
String? description,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSEvents.UpdateConnection'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
if (authParameters != null) 'AuthParameters': authParameters,
if (authorizationType != null)
'AuthorizationType': authorizationType.value,
if (description != null) 'Description': description,
},
);
return UpdateConnectionResponse.fromJson(jsonResponse.body);
}