createHapg method

Future<CreateHapgResponse> createHapg({
  1. required String label,
})

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.

Creates a high-availability partition group. A high-availability partition group is a group of partitions that spans multiple physical HSMs.

May throw CloudHsmServiceException. May throw CloudHsmInternalException. May throw InvalidRequestException.

Parameter label : The label of the new high-availability partition group.

Implementation

Future<CreateHapgResponse> createHapg({
  required String label,
}) async {
  ArgumentError.checkNotNull(label, 'label');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CloudHsmFrontendService.CreateHapg'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Label': label,
    },
  );

  return CreateHapgResponse.fromJson(jsonResponse.body);
}