modifyHapg method

Future<ModifyHapgResponse> modifyHapg({
  1. required String hapgArn,
  2. String? label,
  3. List<String>? partitionSerialList,
})

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 an existing high-availability partition group.

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

Parameter hapgArn : The ARN of the high-availability partition group to modify.

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

Parameter partitionSerialList : The list of partition serial numbers to make members of the high-availability partition group.

Implementation

Future<ModifyHapgResponse> modifyHapg({
  required String hapgArn,
  String? label,
  List<String>? partitionSerialList,
}) async {
  ArgumentError.checkNotNull(hapgArn, 'hapgArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CloudHsmFrontendService.ModifyHapg'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'HapgArn': hapgArn,
      if (label != null) 'Label': label,
      if (partitionSerialList != null)
        'PartitionSerialList': partitionSerialList,
    },
  );

  return ModifyHapgResponse.fromJson(jsonResponse.body);
}