delete_distribution_tenant(
id: string,
if_match: string,
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
) -> None
Deletes a distribution tenant. If you use this API operation to delete a distribution tenant that is currently enabled, the request will fail.
To delete a distribution tenant, you must first disable the distribution tenant by using the UpdateDistributionTenant API operation.
Parameters:
-
id
(string)
–
The ID of the distribution tenant to delete.
-
if_match
(string)
–
The value of the ETag header that you received when retrieving the distribution tenant. This value is returned in the response of the GetDistributionTenant API operation.
Raises:
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
| async def delete_distribution_tenant(
self,
id: "capo_cloudfront.types.string.string",
if_match: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
) -> None:
"""<p>Deletes a distribution tenant. If you use this API operation to delete a distribution tenant that is currently enabled, the request will fail.</p> <p>To delete a distribution tenant, you must first disable the distribution tenant by using the <code>UpdateDistributionTenant</code> API operation.</p>
Args:
id: <p>The ID of the distribution tenant to delete.</p>
if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the distribution tenant. This value is returned in the response of the <code>GetDistributionTenant</code> API operation.</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_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.resource_not_disabled.ResourceNotDisabled: <p>The specified CloudFront resource hasn't been disabled yet.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudfront.types.delete_distribution_tenant_request.DeleteDistributionTenantRequest]",
) -> AsyncOperationResponse[None]:
import capo_cloudfront._operations.cloudfront2020_05_31.delete_distribution_tenant
(
output,
http_response,
) = await capo_cloudfront._operations.cloudfront2020_05_31.delete_distribution_tenant.async_delete_distribution_tenant(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDistributionTenant")
)
input_: capo_cloudfront.types.delete_distribution_tenant_request.DeleteDistributionTenantRequest = {
"id": id,
"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
|