modifyLunaClient method

Future<ModifyLunaClientResponse> modifyLunaClient({
  1. required String certificate,
  2. required String clientArn,
})

This is documentation for AWS CloudHSM Classic. For more information, see AWS CloudHSM Classic FAQs, the AWS CloudHSM Classic User Guide, and the AWS CloudHSM Classic API Reference.

For information about the current version of AWS CloudHSM, see AWS CloudHSM, the AWS CloudHSM User Guide, and the AWS CloudHSM API Reference.

Modifies the certificate used by the client.

This action can potentially start a workflow to install the new certificate on the client's HSMs.

May throw CloudHsmServiceException.

Parameter certificate : The new certificate for the client.

Parameter clientArn : The ARN of the client.

Implementation

Future<ModifyLunaClientResponse> modifyLunaClient({
  required String certificate,
  required String clientArn,
}) async {
  ArgumentError.checkNotNull(certificate, 'certificate');
  _s.validateStringLength(
    'certificate',
    certificate,
    600,
    2400,
    isRequired: true,
  );
  ArgumentError.checkNotNull(clientArn, 'clientArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CloudHsmFrontendService.ModifyLunaClient'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Certificate': certificate,
      'ClientArn': clientArn,
    },
  );

  return ModifyLunaClientResponse.fromJson(jsonResponse.body);
}