updateSecurity method
Updates the security settings for the cluster. You can use this operation to specify encryption and authentication on existing clusters.
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter clusterArn :
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
Parameter currentVersion :
The version of the MSK cluster to update. Cluster versions aren't simple
numbers. You can describe an MSK cluster to find its version. When this
update operation is successful, it generates a new cluster version.
Parameter clientAuthentication :
Includes all client authentication related information.
Parameter encryptionInfo :
Includes all encryption-related information.
Implementation
Future<UpdateSecurityResponse> updateSecurity({
required String clusterArn,
required String currentVersion,
ClientAuthentication? clientAuthentication,
EncryptionInfo? encryptionInfo,
}) async {
final $payload = <String, dynamic>{
'currentVersion': currentVersion,
if (clientAuthentication != null)
'clientAuthentication': clientAuthentication,
if (encryptionInfo != null) 'encryptionInfo': encryptionInfo,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri: '/v1/clusters/${Uri.encodeComponent(clusterArn)}/security',
exceptionFnMap: _exceptionFns,
);
return UpdateSecurityResponse.fromJson(response);
}