updateConnection method
Updates settings for a connection.
May throw AccessDeniedException.
May throw ConcurrentModificationException.
May throw InternalException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
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.
Parameter invocationConnectivityParameters :
For connections to private APIs, the parameters to use for invoking the
API.
For more information, see Connecting to private APIs in the Amazon EventBridge User Guide .
Parameter kmsKeyIdentifier :
The identifier of the KMS customer managed key for EventBridge to use, if
you choose to use a customer managed key to encrypt this connection. The
identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or
key alias ARN.
If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection.
For more information, see Identify and view keys in the Key Management Service Developer Guide.
Implementation
Future<UpdateConnectionResponse> updateConnection({
required String name,
UpdateConnectionAuthRequestParameters? authParameters,
ConnectionAuthorizationType? authorizationType,
String? description,
ConnectivityResourceParameters? invocationConnectivityParameters,
String? kmsKeyIdentifier,
}) 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,
if (invocationConnectivityParameters != null)
'InvocationConnectivityParameters': invocationConnectivityParameters,
if (kmsKeyIdentifier != null) 'KmsKeyIdentifier': kmsKeyIdentifier,
},
);
return UpdateConnectionResponse.fromJson(jsonResponse.body);
}