deleteResourcePolicy method
Deletes an CloudHSM resource policy. Deleting a resource policy will result in the resource being unshared and removed from any RAM resource shares. Deleting the resource policy attached to a backup will not impact any clusters created from that backup.
Cross-account use: No. You cannot perform this operation on an CloudHSM resource in a different Amazon Web Services account.
May throw CloudHsmAccessDeniedException.
May throw CloudHsmInternalFailureException.
May throw CloudHsmInvalidRequestException.
May throw CloudHsmResourceNotFoundException.
May throw CloudHsmServiceException.
Parameter resourceArn :
Amazon Resource Name (ARN) of the resource from which the policy will be
removed.
Implementation
Future<DeleteResourcePolicyResponse> deleteResourcePolicy({
String? resourceArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'BaldrApiService.DeleteResourcePolicy'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (resourceArn != null) 'ResourceArn': resourceArn,
},
);
return DeleteResourcePolicyResponse.fromJson(jsonResponse.body);
}