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'
}
}
)
[REQUIRED]
The ID of the distribution that you are enabling metrics for.
[REQUIRED]
A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
A subscription configuration for additional CloudWatch metrics.
A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
dict
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