Amazon CloudFront

2020/08/28 - Amazon CloudFront - 3 new api methods

Changes  Update cloudfront client to latest version

CreateMonitoringSubscription (new) Link ¶

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

client.create_monitoring_subscription(
    DistributionId='string',
    MonitoringSubscription={
        'RealtimeMetricsSubscriptionConfig': {
            'RealtimeMetricsSubscriptionStatus': 'Enabled'|'Disabled'
        }
    }
)
type DistributionId:

string

param DistributionId:

[REQUIRED]

The ID of the distribution that you are enabling metrics for.

type MonitoringSubscription:

dict

param MonitoringSubscription:

[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.

rtype:

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.

GetMonitoringSubscription (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.get_monitoring_subscription(
    DistributionId='string'
)
type DistributionId:

string

param DistributionId:

[REQUIRED]

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

rtype:

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.

DeleteMonitoringSubscription (new) Link ¶

Disables additional CloudWatch metrics for the specified CloudFront distribution.

See also: AWS API Documentation

Request Syntax

client.delete_monitoring_subscription(
    DistributionId='string'
)
type DistributionId:

string

param DistributionId:

[REQUIRED]

The ID of the distribution that you are disabling metrics for.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --