Skip to content

delete_permission_policy

delete_permission_policy(
    resource_arn: ResourceArn, *, config_overrides: Optional[WAFClientConfig] = None
) -> DeletePermissionPolicyResponse

This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.

For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

Permanently deletes an IAM policy from the specified RuleGroup.

The user making the request must be the owner of the RuleGroup.

Parameters:

  • resource_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the RuleGroup from which you want to delete the policy.

    The user making the request must be the owner of the RuleGroup.

Raises:

  • WAFInternalErrorException –

    The operation failed because of a system problem, even though the request was valid. Retry your request.

  • WAFNonexistentItemException –

    The operation failed because the referenced object doesn't exist.

  • WAFStaleDataException –

    The operation failed because you tried to create, update, or delete an object by using a change token that has already been used.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_waf/_services/waf.py
def delete_permission_policy(
    self,
    resource_arn: "capo_waf.types.resource_arn.ResourceArn",
    *,
    config_overrides: Optional[WAFClientConfig] = None,
) -> "capo_waf.types.delete_permission_policy_response.DeletePermissionPolicyResponse":
    """<note> <p>This is <b>AWS WAF Classic</b> documentation. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html">AWS WAF Classic</a> in the developer guide.</p> <p> <b>For the latest version of AWS WAF</b>, use the AWS WAFV2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a>. With the latest version, AWS WAF has a single set of endpoints for regional and global use. </p> </note> <p>Permanently deletes an IAM policy from the specified RuleGroup.</p> <p>The user making the request must be the owner of the RuleGroup.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the RuleGroup from which you want to delete the policy.</p> <p>The user making the request must be the owner of the RuleGroup.</p>

    Raises:
        capo_waf.errors.waf_internal_error_exception.WAFInternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_waf.errors.waf_nonexistent_item_exception.WAFNonexistentItemException: <p>The operation failed because the referenced object doesn't exist.</p>
        capo_waf.errors.waf_stale_data_exception.WAFStaleDataException: <p>The operation failed because you tried to create, update, or delete an object by using a change token that has already been used.</p>
        capo_waf.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_waf.types.delete_permission_policy_request.DeletePermissionPolicyRequest]",
    ) -> OperationResponse[
        "capo_waf.types.delete_permission_policy_response.DeletePermissionPolicyResponse"
    ]:
        import capo_waf._operations.awswaf_20150824.delete_permission_policy

        output, http_response = (
            capo_waf._operations.awswaf_20150824.delete_permission_policy.delete_permission_policy(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeletePermissionPolicy")
    )
    input_: capo_waf.types.delete_permission_policy_request.DeletePermissionPolicyRequest = {
        "resource_arn": resource_arn
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output