Deletes a real-time log configuration.
You cannot delete a real-time log configuration if it's attached to a cache behavior. First update your distributions to remove the real-time log configuration from all cache behaviors, then delete the real-time log configuration.
To delete a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to delete.
Parameters:
-
name
(Optional[string], default:
None
)
–
The name of the real-time log configuration to delete.
-
arn
(Optional[string], default:
None
)
–
The Amazon Resource Name (ARN) of the real-time log configuration to delete.
Raises:
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
| async def delete_realtime_log_config(
self,
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
name: Optional["capo_cloudfront.types.string.string"] = None,
arn: Optional["capo_cloudfront.types.string.string"] = None,
) -> None:
"""<p>Deletes a real-time log configuration.</p> <p>You cannot delete a real-time log configuration if it's attached to a cache behavior. First update your distributions to remove the real-time log configuration from all cache behaviors, then delete the real-time log configuration.</p> <p>To delete a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to delete.</p>
Args:
name: <p>The name of the real-time log configuration to delete.</p>
arn: <p>The Amazon Resource Name (ARN) of the real-time log configuration to delete.</p>
Raises:
capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
capo_cloudfront.errors.no_such_realtime_log_config.NoSuchRealtimeLogConfig: <p>The real-time log configuration does not exist.</p>
capo_cloudfront.errors.realtime_log_config_in_use.RealtimeLogConfigInUse: <p>Cannot delete the real-time log configuration because it is attached to one or more cache behaviors.</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_realtime_log_config_request.DeleteRealtimeLogConfigRequest]",
) -> AsyncOperationResponse[None]:
import capo_cloudfront._operations.cloudfront2020_05_31.delete_realtime_log_config
(
output,
http_response,
) = await capo_cloudfront._operations.cloudfront2020_05_31.delete_realtime_log_config.async_delete_realtime_log_config(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteRealtimeLogConfig")
)
input_: capo_cloudfront.types.delete_realtime_log_config_request.DeleteRealtimeLogConfigRequest = {}
if name is not None:
input_["name"] = name
if arn is not None:
input_["arn"] = arn
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|