Gets information about whether additional CloudWatch metrics are enabled for the specified CloudFront distribution.
Parameters:
-
distribution_id
(string)
–
The ID of the distribution that you are getting metrics information for.
Raises:
Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
| async def get_monitoring_subscription(
self,
distribution_id: "capo_cloudfront.types.string.string",
*,
config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
) -> "capo_cloudfront.types.get_monitoring_subscription_result.GetMonitoringSubscriptionResult":
"""<p>Gets information about whether additional CloudWatch metrics are enabled for the specified CloudFront distribution.</p>
Args:
distribution_id: <p>The ID of the distribution that you are getting metrics information for.</p>
Raises:
capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
capo_cloudfront.errors.no_such_distribution.NoSuchDistribution: <p>The specified distribution does not exist.</p>
capo_cloudfront.errors.no_such_monitoring_subscription.NoSuchMonitoringSubscription: <p>A monitoring subscription does not exist for the specified distribution.</p>
capo_cloudfront.errors.unsupported_operation.UnsupportedOperation: <p>This operation is not supported in this Amazon Web Services Region.</p>
capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudfront.types.get_monitoring_subscription_request.GetMonitoringSubscriptionRequest]",
) -> AsyncOperationResponse[
"capo_cloudfront.types.get_monitoring_subscription_result.GetMonitoringSubscriptionResult"
]:
import capo_cloudfront._operations.cloudfront2020_05_31.get_monitoring_subscription
(
output,
http_response,
) = await capo_cloudfront._operations.cloudfront2020_05_31.get_monitoring_subscription.async_get_monitoring_subscription(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetMonitoringSubscription")
)
input_: capo_cloudfront.types.get_monitoring_subscription_request.GetMonitoringSubscriptionRequest = {
"distribution_id": distribution_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|