get_monitoring_subscription

CloudFront.Client.get_monitoring_subscription(**kwargs)

Gets information about whether additional CloudWatch metrics are enabled for the specified CloudFront distribution.

See also: AWS API Documentation

Request Syntax

response = client.get_monitoring_subscription(
    DistributionId='string'
)
Parameters
DistributionId (string) --

[REQUIRED]

The ID of the distribution that you are getting metrics information for.

Return type
dict
Returns
Response Syntax
{
    'MonitoringSubscription': {
        'RealtimeMetricsSubscriptionConfig': {
            'RealtimeMetricsSubscriptionStatus': 'Enabled'|'Disabled'
        }
    }
}

Response Structure

  • (dict) --
    • MonitoringSubscription (dict) --

      A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.

      • RealtimeMetricsSubscriptionConfig (dict) --

        A subscription configuration for additional CloudWatch metrics.

        • RealtimeMetricsSubscriptionStatus (string) --

          A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution.

Exceptions

  • CloudFront.Client.exceptions.AccessDenied
  • CloudFront.Client.exceptions.NoSuchDistribution
  • CloudFront.Client.exceptions.NoSuchMonitoringSubscription
  • CloudFront.Client.exceptions.UnsupportedOperation