aws.cloudfront.MonitoringSubscription
Provides a CloudFront real-time log configuration resource.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudFront.MonitoringSubscription("example", new()
{
DistributionId = aws_cloudfront_distribution.Example.Id,
MonitoringSubscriptionDetails = new Aws.CloudFront.Inputs.MonitoringSubscriptionMonitoringSubscriptionArgs
{
RealtimeMetricsSubscriptionConfig = new Aws.CloudFront.Inputs.MonitoringSubscriptionMonitoringSubscriptionRealtimeMetricsSubscriptionConfigArgs
{
RealtimeMetricsSubscriptionStatus = "Enabled",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/cloudfront"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfront.NewMonitoringSubscription(ctx, "example", &cloudfront.MonitoringSubscriptionArgs{
DistributionId: pulumi.Any(aws_cloudfront_distribution.Example.Id),
MonitoringSubscription: &cloudfront.MonitoringSubscriptionMonitoringSubscriptionArgs{
RealtimeMetricsSubscriptionConfig: &cloudfront.MonitoringSubscriptionMonitoringSubscriptionRealtimeMetricsSubscriptionConfigArgs{
RealtimeMetricsSubscriptionStatus: pulumi.String("Enabled"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudfront.MonitoringSubscription;
import com.pulumi.aws.cloudfront.MonitoringSubscriptionArgs;
import com.pulumi.aws.cloudfront.inputs.MonitoringSubscriptionMonitoringSubscriptionArgs;
import com.pulumi.aws.cloudfront.inputs.MonitoringSubscriptionMonitoringSubscriptionRealtimeMetricsSubscriptionConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new MonitoringSubscription("example", MonitoringSubscriptionArgs.builder()
.distributionId(aws_cloudfront_distribution.example().id())
.monitoringSubscription(MonitoringSubscriptionMonitoringSubscriptionArgs.builder()
.realtimeMetricsSubscriptionConfig(MonitoringSubscriptionMonitoringSubscriptionRealtimeMetricsSubscriptionConfigArgs.builder()
.realtimeMetricsSubscriptionStatus("Enabled")
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.cloudfront.MonitoringSubscription("example",
distribution_id=aws_cloudfront_distribution["example"]["id"],
monitoring_subscription=aws.cloudfront.MonitoringSubscriptionMonitoringSubscriptionArgs(
realtime_metrics_subscription_config=aws.cloudfront.MonitoringSubscriptionMonitoringSubscriptionRealtimeMetricsSubscriptionConfigArgs(
realtime_metrics_subscription_status="Enabled",
),
))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudfront.MonitoringSubscription("example", {
distributionId: aws_cloudfront_distribution.example.id,
monitoringSubscription: {
realtimeMetricsSubscriptionConfig: {
realtimeMetricsSubscriptionStatus: "Enabled",
},
},
});
resources:
example:
type: aws:cloudfront:MonitoringSubscription
properties:
distributionId: ${aws_cloudfront_distribution.example.id}
monitoringSubscription:
realtimeMetricsSubscriptionConfig:
realtimeMetricsSubscriptionStatus: Enabled
Create MonitoringSubscription Resource
new MonitoringSubscription(name: string, args: MonitoringSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def MonitoringSubscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
distribution_id: Optional[str] = None,
monitoring_subscription: Optional[MonitoringSubscriptionMonitoringSubscriptionArgs] = None)
@overload
def MonitoringSubscription(resource_name: str,
args: MonitoringSubscriptionArgs,
opts: Optional[ResourceOptions] = None)
func NewMonitoringSubscription(ctx *Context, name string, args MonitoringSubscriptionArgs, opts ...ResourceOption) (*MonitoringSubscription, error)
public MonitoringSubscription(string name, MonitoringSubscriptionArgs args, CustomResourceOptions? opts = null)
public MonitoringSubscription(String name, MonitoringSubscriptionArgs args)
public MonitoringSubscription(String name, MonitoringSubscriptionArgs args, CustomResourceOptions options)
type: aws:cloudfront:MonitoringSubscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitoringSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MonitoringSubscriptionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MonitoringSubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitoringSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitoringSubscriptionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MonitoringSubscription Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The MonitoringSubscription resource accepts the following input properties:
- Distribution
Id string The ID of the distribution that you are enabling metrics for.
- Monitoring
Subscription MonitoringDetails Subscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- Distribution
Id string The ID of the distribution that you are enabling metrics for.
- Monitoring
Subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution
Id String The ID of the distribution that you are enabling metrics for.
- monitoring
Subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution
Id string The ID of the distribution that you are enabling metrics for.
- monitoring
Subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution_
id str The ID of the distribution that you are enabling metrics for.
- monitoring_
subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution
Id String The ID of the distribution that you are enabling metrics for.
- monitoring
Subscription Property Map A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
Outputs
All input properties are implicitly available as output properties. Additionally, the MonitoringSubscription resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing MonitoringSubscription Resource
Get an existing MonitoringSubscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MonitoringSubscriptionState, opts?: CustomResourceOptions): MonitoringSubscription
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
distribution_id: Optional[str] = None,
monitoring_subscription: Optional[MonitoringSubscriptionMonitoringSubscriptionArgs] = None) -> MonitoringSubscription
func GetMonitoringSubscription(ctx *Context, name string, id IDInput, state *MonitoringSubscriptionState, opts ...ResourceOption) (*MonitoringSubscription, error)
public static MonitoringSubscription Get(string name, Input<string> id, MonitoringSubscriptionState? state, CustomResourceOptions? opts = null)
public static MonitoringSubscription get(String name, Output<String> id, MonitoringSubscriptionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Distribution
Id string The ID of the distribution that you are enabling metrics for.
- Monitoring
Subscription MonitoringDetails Subscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- Distribution
Id string The ID of the distribution that you are enabling metrics for.
- Monitoring
Subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution
Id String The ID of the distribution that you are enabling metrics for.
- monitoring
Subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution
Id string The ID of the distribution that you are enabling metrics for.
- monitoring
Subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution_
id str The ID of the distribution that you are enabling metrics for.
- monitoring_
subscription MonitoringSubscription Monitoring Subscription Args A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
- distribution
Id String The ID of the distribution that you are enabling metrics for.
- monitoring
Subscription Property Map A monitoring subscription. This structure contains information about whether additional CloudWatch metrics are enabled for a given CloudFront distribution.
Supporting Types
MonitoringSubscriptionMonitoringSubscription
- Realtime
Metrics MonitoringSubscription Config Subscription Monitoring Subscription Realtime Metrics Subscription Config A subscription configuration for additional CloudWatch metrics. See below.
- Realtime
Metrics MonitoringSubscription Config Subscription Monitoring Subscription Realtime Metrics Subscription Config A subscription configuration for additional CloudWatch metrics. See below.
- realtime
Metrics MonitoringSubscription Config Subscription Monitoring Subscription Realtime Metrics Subscription Config A subscription configuration for additional CloudWatch metrics. See below.
- realtime
Metrics MonitoringSubscription Config Subscription Monitoring Subscription Realtime Metrics Subscription Config A subscription configuration for additional CloudWatch metrics. See below.
- realtime_
metrics_ Monitoringsubscription_ config Subscription Monitoring Subscription Realtime Metrics Subscription Config A subscription configuration for additional CloudWatch metrics. See below.
- realtime
Metrics Property MapSubscription Config A subscription configuration for additional CloudWatch metrics. See below.
MonitoringSubscriptionMonitoringSubscriptionRealtimeMetricsSubscriptionConfig
- Realtime
Metrics stringSubscription Status A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are
Enabled
andDisabled
. See below.
- Realtime
Metrics stringSubscription Status A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are
Enabled
andDisabled
. See below.
- realtime
Metrics StringSubscription Status A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are
Enabled
andDisabled
. See below.
- realtime
Metrics stringSubscription Status A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are
Enabled
andDisabled
. See below.
- realtime_
metrics_ strsubscription_ status A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are
Enabled
andDisabled
. See below.
- realtime
Metrics StringSubscription Status A flag that indicates whether additional CloudWatch metrics are enabled for a given CloudFront distribution. Valid values are
Enabled
andDisabled
. See below.
Import
CloudFront monitoring subscription can be imported using the id, e.g.,
$ pulumi import aws:cloudfront/monitoringSubscription:MonitoringSubscription example E3QYSUHO4VYRGB
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.