CloudFront / Client / create_monitoring_subscription
create_monitoring_subscription#
- CloudFront.Client.create_monitoring_subscription(**kwargs)#
Enables additional CloudWatch metrics for the specified CloudFront distribution. The additional metrics incur an additional cost.
For more information, see Viewing additional CloudFront distribution metrics in the Amazon CloudFront Developer Guide.
See also: AWS API Documentation
Request Syntax
response = client.create_monitoring_subscription( DistributionId='string', MonitoringSubscription={ 'RealtimeMetricsSubscriptionConfig': { 'RealtimeMetricsSubscriptionStatus': 'Enabled'|'Disabled' } } )
- Parameters:
DistributionId (string) –
[REQUIRED]
The ID of the distribution that you are enabling metrics for.
MonitoringSubscription (dict) –
[REQUIRED]
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) – [REQUIRED]
A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- 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.MonitoringSubscriptionAlreadyExists
CloudFront.Client.exceptions.UnsupportedOperation