Disassociates a distribution from the WAF web ACL.
Parameters:
-
id
(string)
–
The ID of the distribution.
-
if_match
(Optional[string], default:
None
)
–
The value of the ETag header that you received when retrieving the distribution that you're disassociating from the WAF web ACL.
Raises:
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
| async def disassociate_distribution_web_acl(
self,
id: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
if_match: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.disassociate_distribution_web_acl_result.DisassociateDistributionWebACLResult":
"""<p>Disassociates a distribution from the WAF web ACL.</p>
Args:
id: <p>The ID of the distribution.</p>
if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the distribution that you're disassociating from the WAF web ACL.</p>
Raises:
capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
capo_cloudfront.errors.invalid_if_match_version.InvalidIfMatchVersion: <p>The <code>If-Match</code> version is missing or not valid.</p>
capo_cloudfront.errors.precondition_failed.PreconditionFailed: <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudfront.types.disassociate_distribution_web_acl_request.DisassociateDistributionWebACLRequest]",
) -> AsyncOperationResponse[
"capo_cloudfront.types.disassociate_distribution_web_acl_result.DisassociateDistributionWebACLResult"
]:
import capo_cloudfront._operations.cloudfront2020_05_31.disassociate_distribution_web_acl
(
output,
http_response,
) = await capo_cloudfront._operations.cloudfront2020_05_31.disassociate_distribution_web_acl.async_disassociate_distribution_web_acl(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DisassociateDistributionWebACL")
)
input_: capo_cloudfront.types.disassociate_distribution_web_acl_request.DisassociateDistributionWebACLRequest = {
"id": id
}
if if_match is not None:
input_["if_match"] = if_match
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|