Resource: awsCloudfrontMonitoringSubscription
Provides a CloudFront real-time log configuration resource.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.cloudfrontMonitoringSubscription.CloudfrontMonitoringSubscription(
this,
"example",
{
distributionId: "${aws_cloudfront_distribution.example.id}",
monitoringSubscription: {
realtimeMetricsSubscriptionConfig: {
realtimeMetricsSubscriptionStatus: "Enabled",
},
},
}
);
Argument Reference
The following arguments are supported:
distributionId
- (Required) The ID of the distribution that you are enabling metrics for.monitoringSubscription
- (Required) A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
monitoringSubscription
realtimeMetricsSubscriptionConfig
- (Required) A subscription configuration for additional CloudWatch metrics. See below.
realtimeMetricsSubscriptionConfig
realtimeMetricsSubscriptionStatus
- (Required) A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values areenabled
anddisabled
. See below.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of the CloudFront monitoring subscription, which corresponds to thedistributionId
.
Import
CloudFront monitoring subscription can be imported using the id, e.g.,