deleteResourcePolicy method
Deletes a specified policy.
May throw EntityNotFoundException. May throw InternalServiceException. May throw OperationTimeoutException. May throw InvalidInputException. May throw ConditionCheckFailureException.
Parameter policyHashCondition
:
The hash value returned when this policy was set.
Parameter resourceArn
:
The ARN of the AWS Glue resource for the resource policy to be deleted.
Implementation
Future<void> deleteResourcePolicy({
String? policyHashCondition,
String? resourceArn,
}) async {
_s.validateStringLength(
'policyHashCondition',
policyHashCondition,
1,
255,
);
_s.validateStringLength(
'resourceArn',
resourceArn,
1,
10240,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSGlue.DeleteResourcePolicy'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (policyHashCondition != null)
'PolicyHashCondition': policyHashCondition,
if (resourceArn != null) 'ResourceArn': resourceArn,
},
);
}