createHsmClientCertificate method

Future<CreateHsmClientCertificateResult> createHsmClientCertificate({
  1. required String hsmClientCertificateIdentifier,
  2. List<Tag>? tags,
})

Creates an HSM client certificate that an Amazon Redshift cluster will use to connect to the client's HSM in order to store and retrieve the keys used to encrypt the cluster databases.

The command returns a public key, which you must store in the HSM. In addition to creating the HSM certificate, you must create an Amazon Redshift HSM configuration that provides a cluster the information needed to store and use encryption keys in the HSM. For more information, go to Hardware Security Modules in the Amazon Redshift Cluster Management Guide.

May throw HsmClientCertificateAlreadyExistsFault. May throw HsmClientCertificateQuotaExceededFault. May throw TagLimitExceededFault. May throw InvalidTagFault.

Parameter hsmClientCertificateIdentifier : The identifier to be assigned to the new HSM client certificate that the cluster will use to connect to the HSM to use the database encryption keys.

Parameter tags : A list of tag instances.

Implementation

Future<CreateHsmClientCertificateResult> createHsmClientCertificate({
  required String hsmClientCertificateIdentifier,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(
      hsmClientCertificateIdentifier, 'hsmClientCertificateIdentifier');
  _s.validateStringLength(
    'hsmClientCertificateIdentifier',
    hsmClientCertificateIdentifier,
    0,
    2147483647,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['HsmClientCertificateIdentifier'] = hsmClientCertificateIdentifier;
  tags?.also((arg) => $request['Tags'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'CreateHsmClientCertificate',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateHsmClientCertificateMessage'],
    shapes: shapes,
    resultWrapper: 'CreateHsmClientCertificateResult',
  );
  return CreateHsmClientCertificateResult.fromXml($result);
}