Gets a list of distributions that have a cache behavior that's associated with the specified real-time log configuration.
You can specify the real-time log configuration by its 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 list distributions for.
You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request.
Parameters:
-
marker
(Optional[string], default:
None
)
–
Use this field when paginating results to indicate where to begin in your list of distributions. The response includes distributions in the list that occur after the marker. To get the next page of the list, set this field's value to the value of NextMarker from the current page's response.
-
max_items
(Optional[integer], default:
None
)
–
The maximum number of distributions that you want in the response.
-
realtime_log_config_name
(Optional[string], default:
None
)
–
The name of the real-time log configuration whose associated distributions you want to list.
-
realtime_log_config_arn
(Optional[string], default:
None
)
–
The Amazon Resource Name (ARN) of the real-time log configuration whose associated distributions you want to list.
Raises:
Source code in docs_src/capo_cloudfront/_services/cloud_front.py
| def list_distributions_by_realtime_log_config(
self,
*,
config_overrides: Optional[CloudFrontClientConfig] = None,
marker: Optional["capo_cloudfront.types.string.string"] = None,
max_items: Optional["capo_cloudfront.types.integer.integer"] = None,
realtime_log_config_name: Optional[
"capo_cloudfront.types.string.string"
] = None,
realtime_log_config_arn: Optional["capo_cloudfront.types.string.string"] = None,
) -> "capo_cloudfront.types.list_distributions_by_realtime_log_config_result.ListDistributionsByRealtimeLogConfigResult":
"""<p>Gets a list of distributions that have a cache behavior that's associated with the specified real-time log configuration.</p> <p>You can specify the real-time log configuration by its 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 list distributions for.</p> <p>You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the <code>NextMarker</code> value from the current response as the <code>Marker</code> value in the subsequent request.</p>
Args:
marker: <p>Use this field when paginating results to indicate where to begin in your list of distributions. The response includes distributions in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
max_items: <p>The maximum number of distributions that you want in the response.</p>
realtime_log_config_name: <p>The name of the real-time log configuration whose associated distributions you want to list.</p>
realtime_log_config_arn: <p>The Amazon Resource Name (ARN) of the real-time log configuration whose associated distributions you want to list.</p>
Raises:
capo_cloudfront.errors.invalid_argument.InvalidArgument: <p>An argument is invalid.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudfront.types.list_distributions_by_realtime_log_config_request.ListDistributionsByRealtimeLogConfigRequest]",
) -> OperationResponse[
"capo_cloudfront.types.list_distributions_by_realtime_log_config_result.ListDistributionsByRealtimeLogConfigResult"
]:
import capo_cloudfront._operations.cloudfront2020_05_31.list_distributions_by_realtime_log_config
output, http_response = (
capo_cloudfront._operations.cloudfront2020_05_31.list_distributions_by_realtime_log_config.list_distributions_by_realtime_log_config(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_cloudfront.types.list_distributions_by_realtime_log_config_result.ListDistributionsByRealtimeLogConfigResult",
) -> dict[str, Any]:
import capo_cloudfront.types.list_distributions_by_realtime_log_config_result
return capo_cloudfront.types.list_distributions_by_realtime_log_config_result.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"ListDistributionsByRealtimeLogConfig", redact_output=_redact_output
),
)
input_: capo_cloudfront.types.list_distributions_by_realtime_log_config_request.ListDistributionsByRealtimeLogConfigRequest = {}
if marker is not None:
input_["marker"] = marker
if max_items is not None:
input_["max_items"] = max_items
if realtime_log_config_name is not None:
input_["realtime_log_config_name"] = realtime_log_config_name
if realtime_log_config_arn is not None:
input_["realtime_log_config_arn"] = realtime_log_config_arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|