Deletes a specified policy.
Parameters:
-
policy_hash_condition
(Optional[HashString], default:
None
)
–
The hash value returned when this policy was set.
-
resource_arn
(Optional[GlueResourceArn], default:
None
)
–
The ARN of the Glue resource for the resource policy to be deleted.
Raises:
Source code in docs_src/capo_glue/_services/glue.py
| def delete_resource_policy(
self,
*,
config_overrides: Optional[GlueClientConfig] = None,
policy_hash_condition: Optional[
"capo_glue.types.hash_string.HashString"
] = None,
resource_arn: Optional[
"capo_glue.types.glue_resource_arn.GlueResourceArn"
] = None,
) -> "capo_glue.types.delete_resource_policy_response.DeleteResourcePolicyResponse":
"""<p>Deletes a specified policy.</p>
Args:
policy_hash_condition: <p>The hash value returned when this policy was set.</p>
resource_arn: <p>The ARN of the Glue resource for the resource policy to be deleted.</p>
Raises:
capo_glue.errors.condition_check_failure_exception.ConditionCheckFailureException: <p>A specified condition was not satisfied.</p>
capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_glue.types.delete_resource_policy_request.DeleteResourcePolicyRequest]",
) -> OperationResponse[
"capo_glue.types.delete_resource_policy_response.DeleteResourcePolicyResponse"
]:
import capo_glue._operations.aws_glue.delete_resource_policy
output, http_response = (
capo_glue._operations.aws_glue.delete_resource_policy.delete_resource_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteResourcePolicy")
)
input_: capo_glue.types.delete_resource_policy_request.DeleteResourcePolicyRequest = {}
if policy_hash_condition is not None:
input_["policy_hash_condition"] = policy_hash_condition
if resource_arn is not None:
input_["resource_arn"] = resource_arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|