github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/cloudwatch/metricAlarm.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package cloudwatch
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides a CloudWatch Metric Alarm resource.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
    26  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
    27  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    28  //
    29  // )
    30  //
    31  //	func main() {
    32  //		pulumi.Run(func(ctx *pulumi.Context) error {
    33  //			_, err := cloudwatch.NewMetricAlarm(ctx, "foobar", &cloudwatch.MetricAlarmArgs{
    34  //				Name:                    pulumi.String("test-foobar5"),
    35  //				ComparisonOperator:      pulumi.String("GreaterThanOrEqualToThreshold"),
    36  //				EvaluationPeriods:       pulumi.Int(2),
    37  //				MetricName:              pulumi.String("CPUUtilization"),
    38  //				Namespace:               pulumi.String("AWS/EC2"),
    39  //				Period:                  pulumi.Int(120),
    40  //				Statistic:               pulumi.String("Average"),
    41  //				Threshold:               pulumi.Float64(80),
    42  //				AlarmDescription:        pulumi.String("This metric monitors ec2 cpu utilization"),
    43  //				InsufficientDataActions: pulumi.Array{},
    44  //			})
    45  //			if err != nil {
    46  //				return err
    47  //			}
    48  //			return nil
    49  //		})
    50  //	}
    51  //
    52  // ```
    53  // <!--End PulumiCodeChooser -->
    54  //
    55  // ## Example in Conjunction with Scaling Policies
    56  //
    57  // <!--Start PulumiCodeChooser -->
    58  // ```go
    59  // package main
    60  //
    61  // import (
    62  //
    63  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling"
    64  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
    65  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
    66  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    67  //
    68  // )
    69  //
    70  //	func main() {
    71  //		pulumi.Run(func(ctx *pulumi.Context) error {
    72  //			bat, err := autoscaling.NewPolicy(ctx, "bat", &autoscaling.PolicyArgs{
    73  //				Name:                 pulumi.String("foobar3-test"),
    74  //				ScalingAdjustment:    pulumi.Int(4),
    75  //				AdjustmentType:       pulumi.String("ChangeInCapacity"),
    76  //				Cooldown:             pulumi.Int(300),
    77  //				AutoscalingGroupName: pulumi.Any(bar.Name),
    78  //			})
    79  //			if err != nil {
    80  //				return err
    81  //			}
    82  //			_, err = cloudwatch.NewMetricAlarm(ctx, "bat", &cloudwatch.MetricAlarmArgs{
    83  //				Name:               pulumi.String("test-foobar5"),
    84  //				ComparisonOperator: pulumi.String("GreaterThanOrEqualToThreshold"),
    85  //				EvaluationPeriods:  pulumi.Int(2),
    86  //				MetricName:         pulumi.String("CPUUtilization"),
    87  //				Namespace:          pulumi.String("AWS/EC2"),
    88  //				Period:             pulumi.Int(120),
    89  //				Statistic:          pulumi.String("Average"),
    90  //				Threshold:          pulumi.Float64(80),
    91  //				Dimensions: pulumi.StringMap{
    92  //					"AutoScalingGroupName": pulumi.Any(bar.Name),
    93  //				},
    94  //				AlarmDescription: pulumi.String("This metric monitors ec2 cpu utilization"),
    95  //				AlarmActions: pulumi.Array{
    96  //					bat.Arn,
    97  //				},
    98  //			})
    99  //			if err != nil {
   100  //				return err
   101  //			}
   102  //			return nil
   103  //		})
   104  //	}
   105  //
   106  // ```
   107  // <!--End PulumiCodeChooser -->
   108  //
   109  // ## Example with an Expression
   110  //
   111  // <!--Start PulumiCodeChooser -->
   112  // ```go
   113  // package main
   114  //
   115  // import (
   116  //
   117  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
   118  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
   119  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   120  //
   121  // )
   122  //
   123  //	func main() {
   124  //		pulumi.Run(func(ctx *pulumi.Context) error {
   125  //			_, err := cloudwatch.NewMetricAlarm(ctx, "foobar", &cloudwatch.MetricAlarmArgs{
   126  //				Name:                    pulumi.String("test-foobar"),
   127  //				ComparisonOperator:      pulumi.String("GreaterThanOrEqualToThreshold"),
   128  //				EvaluationPeriods:       pulumi.Int(2),
   129  //				Threshold:               pulumi.Float64(10),
   130  //				AlarmDescription:        pulumi.String("Request error rate has exceeded 10%"),
   131  //				InsufficientDataActions: pulumi.Array{},
   132  //				MetricQueries: cloudwatch.MetricAlarmMetricQueryArray{
   133  //					&cloudwatch.MetricAlarmMetricQueryArgs{
   134  //						Id:         pulumi.String("e1"),
   135  //						Expression: pulumi.String("m2/m1*100"),
   136  //						Label:      pulumi.String("Error Rate"),
   137  //						ReturnData: pulumi.Bool(true),
   138  //					},
   139  //					&cloudwatch.MetricAlarmMetricQueryArgs{
   140  //						Id: pulumi.String("m1"),
   141  //						Metric: &cloudwatch.MetricAlarmMetricQueryMetricArgs{
   142  //							MetricName: pulumi.String("RequestCount"),
   143  //							Namespace:  pulumi.String("AWS/ApplicationELB"),
   144  //							Period:     pulumi.Int(120),
   145  //							Stat:       pulumi.String("Sum"),
   146  //							Unit:       pulumi.String("Count"),
   147  //							Dimensions: pulumi.StringMap{
   148  //								"LoadBalancer": pulumi.String("app/web"),
   149  //							},
   150  //						},
   151  //					},
   152  //					&cloudwatch.MetricAlarmMetricQueryArgs{
   153  //						Id: pulumi.String("m2"),
   154  //						Metric: &cloudwatch.MetricAlarmMetricQueryMetricArgs{
   155  //							MetricName: pulumi.String("HTTPCode_ELB_5XX_Count"),
   156  //							Namespace:  pulumi.String("AWS/ApplicationELB"),
   157  //							Period:     pulumi.Int(120),
   158  //							Stat:       pulumi.String("Sum"),
   159  //							Unit:       pulumi.String("Count"),
   160  //							Dimensions: pulumi.StringMap{
   161  //								"LoadBalancer": pulumi.String("app/web"),
   162  //							},
   163  //						},
   164  //					},
   165  //				},
   166  //			})
   167  //			if err != nil {
   168  //				return err
   169  //			}
   170  //			return nil
   171  //		})
   172  //	}
   173  //
   174  // ```
   175  // <!--End PulumiCodeChooser -->
   176  //
   177  // <!--Start PulumiCodeChooser -->
   178  // ```go
   179  // package main
   180  //
   181  // import (
   182  //
   183  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
   184  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
   185  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   186  //
   187  // )
   188  //
   189  //	func main() {
   190  //		pulumi.Run(func(ctx *pulumi.Context) error {
   191  //			_, err := cloudwatch.NewMetricAlarm(ctx, "xx_anomaly_detection", &cloudwatch.MetricAlarmArgs{
   192  //				Name:                    pulumi.String("test-foobar"),
   193  //				ComparisonOperator:      pulumi.String("GreaterThanUpperThreshold"),
   194  //				EvaluationPeriods:       pulumi.Int(2),
   195  //				ThresholdMetricId:       pulumi.String("e1"),
   196  //				AlarmDescription:        pulumi.String("This metric monitors ec2 cpu utilization"),
   197  //				InsufficientDataActions: pulumi.Array{},
   198  //				MetricQueries: cloudwatch.MetricAlarmMetricQueryArray{
   199  //					&cloudwatch.MetricAlarmMetricQueryArgs{
   200  //						Id:         pulumi.String("e1"),
   201  //						Expression: pulumi.String("ANOMALY_DETECTION_BAND(m1)"),
   202  //						Label:      pulumi.String("CPUUtilization (Expected)"),
   203  //						ReturnData: pulumi.Bool(true),
   204  //					},
   205  //					&cloudwatch.MetricAlarmMetricQueryArgs{
   206  //						Id:         pulumi.String("m1"),
   207  //						ReturnData: pulumi.Bool(true),
   208  //						Metric: &cloudwatch.MetricAlarmMetricQueryMetricArgs{
   209  //							MetricName: pulumi.String("CPUUtilization"),
   210  //							Namespace:  pulumi.String("AWS/EC2"),
   211  //							Period:     pulumi.Int(120),
   212  //							Stat:       pulumi.String("Average"),
   213  //							Unit:       pulumi.String("Count"),
   214  //							Dimensions: pulumi.StringMap{
   215  //								"InstanceId": pulumi.String("i-abc123"),
   216  //							},
   217  //						},
   218  //					},
   219  //				},
   220  //			})
   221  //			if err != nil {
   222  //				return err
   223  //			}
   224  //			return nil
   225  //		})
   226  //	}
   227  //
   228  // ```
   229  // <!--End PulumiCodeChooser -->
   230  //
   231  // ## Example of monitoring Healthy Hosts on NLB using Target Group and NLB
   232  //
   233  // <!--Start PulumiCodeChooser -->
   234  // ```go
   235  // package main
   236  //
   237  // import (
   238  //
   239  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
   240  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
   241  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   242  //
   243  // )
   244  //
   245  //	func main() {
   246  //		pulumi.Run(func(ctx *pulumi.Context) error {
   247  //			_, err := cloudwatch.NewMetricAlarm(ctx, "nlb_healthyhosts", &cloudwatch.MetricAlarmArgs{
   248  //				Name:               pulumi.String("alarmname"),
   249  //				ComparisonOperator: pulumi.String("LessThanThreshold"),
   250  //				EvaluationPeriods:  pulumi.Int(1),
   251  //				MetricName:         pulumi.String("HealthyHostCount"),
   252  //				Namespace:          pulumi.String("AWS/NetworkELB"),
   253  //				Period:             pulumi.Int(60),
   254  //				Statistic:          pulumi.String("Average"),
   255  //				Threshold:          pulumi.Any(logstashServersCount),
   256  //				AlarmDescription:   pulumi.String("Number of healthy nodes in Target Group"),
   257  //				ActionsEnabled:     pulumi.Bool(true),
   258  //				AlarmActions: pulumi.Array{
   259  //					sns.Arn,
   260  //				},
   261  //				OkActions: pulumi.Array{
   262  //					sns.Arn,
   263  //				},
   264  //				Dimensions: pulumi.StringMap{
   265  //					"TargetGroup":  pulumi.Any(lb_tg.ArnSuffix),
   266  //					"LoadBalancer": pulumi.Any(lb.ArnSuffix),
   267  //				},
   268  //			})
   269  //			if err != nil {
   270  //				return err
   271  //			}
   272  //			return nil
   273  //		})
   274  //	}
   275  //
   276  // ```
   277  // <!--End PulumiCodeChooser -->
   278  //
   279  // > **NOTE:**  You cannot create a metric alarm consisting of both `statistic` and `extendedStatistic` parameters.
   280  // You must choose one or the other
   281  //
   282  // ## Import
   283  //
   284  // Using `pulumi import`, import CloudWatch Metric Alarm using the `alarm_name`. For example:
   285  //
   286  // ```sh
   287  // $ pulumi import aws:cloudwatch/metricAlarm:MetricAlarm test alarm-12345
   288  // ```
   289  type MetricAlarm struct {
   290  	pulumi.CustomResourceState
   291  
   292  	// Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
   293  	ActionsEnabled pulumi.BoolPtrOutput `pulumi:"actionsEnabled"`
   294  	// The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   295  	AlarmActions pulumi.StringArrayOutput `pulumi:"alarmActions"`
   296  	// The description for the alarm.
   297  	AlarmDescription pulumi.StringPtrOutput `pulumi:"alarmDescription"`
   298  	// The ARN of the CloudWatch Metric Alarm.
   299  	Arn pulumi.StringOutput `pulumi:"arn"`
   300  	// The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand. Either of the following is supported: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanThreshold`, `LessThanOrEqualToThreshold`. Additionally, the values  `LessThanLowerOrGreaterThanUpperThreshold`, `LessThanLowerThreshold`, and `GreaterThanUpperThreshold` are used only for alarms based on anomaly detection models.
   301  	ComparisonOperator pulumi.StringOutput `pulumi:"comparisonOperator"`
   302  	// The number of datapoints that must be breaching to trigger the alarm.
   303  	DatapointsToAlarm pulumi.IntPtrOutput `pulumi:"datapointsToAlarm"`
   304  	// The dimensions for the alarm's associated metric.  For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   305  	Dimensions pulumi.StringMapOutput `pulumi:"dimensions"`
   306  	// Used only for alarms based on percentiles.
   307  	// If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant.
   308  	// If you specify `evaluate` or omit this parameter, the alarm will always be evaluated and possibly change state no matter how many data points are available.
   309  	// The following values are supported: `ignore`, and `evaluate`.
   310  	EvaluateLowSampleCountPercentiles pulumi.StringOutput `pulumi:"evaluateLowSampleCountPercentiles"`
   311  	// The number of periods over which data is compared to the specified threshold.
   312  	EvaluationPeriods pulumi.IntOutput `pulumi:"evaluationPeriods"`
   313  	// The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
   314  	ExtendedStatistic pulumi.StringPtrOutput `pulumi:"extendedStatistic"`
   315  	// The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   316  	InsufficientDataActions pulumi.StringArrayOutput `pulumi:"insufficientDataActions"`
   317  	// The name for the alarm's associated metric.
   318  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   319  	MetricName pulumi.StringPtrOutput `pulumi:"metricName"`
   320  	// Enables you to create an alarm based on a metric math expression. You may specify at most 20.
   321  	MetricQueries MetricAlarmMetricQueryArrayOutput `pulumi:"metricQueries"`
   322  	// The descriptive name for the alarm. This name must be unique within the user's AWS account
   323  	Name pulumi.StringOutput `pulumi:"name"`
   324  	// The namespace for the alarm's associated metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
   325  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   326  	Namespace pulumi.StringPtrOutput `pulumi:"namespace"`
   327  	// The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   328  	OkActions pulumi.StringArrayOutput `pulumi:"okActions"`
   329  	// The period in seconds over which the specified `statistic` is applied.
   330  	// Valid values are `10`, `30`, or any multiple of `60`.
   331  	Period pulumi.IntPtrOutput `pulumi:"period"`
   332  	// The statistic to apply to the alarm's associated metric.
   333  	// Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
   334  	Statistic pulumi.StringPtrOutput `pulumi:"statistic"`
   335  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   336  	//
   337  	// > **NOTE:**  If you specify at least one `metricQuery`, you may not specify a `metricName`, `namespace`, `period` or `statistic`. If you do not specify a `metricQuery`, you must specify each of these (although you may use `extendedStatistic` instead of `statistic`).
   338  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   339  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   340  	//
   341  	// Deprecated: Please use `tags` instead.
   342  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   343  	// The value against which the specified statistic is compared. This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.
   344  	Threshold pulumi.Float64PtrOutput `pulumi:"threshold"`
   345  	// If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
   346  	ThresholdMetricId pulumi.StringPtrOutput `pulumi:"thresholdMetricId"`
   347  	// Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
   348  	TreatMissingData pulumi.StringPtrOutput `pulumi:"treatMissingData"`
   349  	// The unit for the alarm's associated metric.
   350  	Unit pulumi.StringPtrOutput `pulumi:"unit"`
   351  }
   352  
   353  // NewMetricAlarm registers a new resource with the given unique name, arguments, and options.
   354  func NewMetricAlarm(ctx *pulumi.Context,
   355  	name string, args *MetricAlarmArgs, opts ...pulumi.ResourceOption) (*MetricAlarm, error) {
   356  	if args == nil {
   357  		return nil, errors.New("missing one or more required arguments")
   358  	}
   359  
   360  	if args.ComparisonOperator == nil {
   361  		return nil, errors.New("invalid value for required argument 'ComparisonOperator'")
   362  	}
   363  	if args.EvaluationPeriods == nil {
   364  		return nil, errors.New("invalid value for required argument 'EvaluationPeriods'")
   365  	}
   366  	opts = internal.PkgResourceDefaultOpts(opts)
   367  	var resource MetricAlarm
   368  	err := ctx.RegisterResource("aws:cloudwatch/metricAlarm:MetricAlarm", name, args, &resource, opts...)
   369  	if err != nil {
   370  		return nil, err
   371  	}
   372  	return &resource, nil
   373  }
   374  
   375  // GetMetricAlarm gets an existing MetricAlarm resource's state with the given name, ID, and optional
   376  // state properties that are used to uniquely qualify the lookup (nil if not required).
   377  func GetMetricAlarm(ctx *pulumi.Context,
   378  	name string, id pulumi.IDInput, state *MetricAlarmState, opts ...pulumi.ResourceOption) (*MetricAlarm, error) {
   379  	var resource MetricAlarm
   380  	err := ctx.ReadResource("aws:cloudwatch/metricAlarm:MetricAlarm", name, id, state, &resource, opts...)
   381  	if err != nil {
   382  		return nil, err
   383  	}
   384  	return &resource, nil
   385  }
   386  
   387  // Input properties used for looking up and filtering MetricAlarm resources.
   388  type metricAlarmState struct {
   389  	// Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
   390  	ActionsEnabled *bool `pulumi:"actionsEnabled"`
   391  	// The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   392  	AlarmActions []interface{} `pulumi:"alarmActions"`
   393  	// The description for the alarm.
   394  	AlarmDescription *string `pulumi:"alarmDescription"`
   395  	// The ARN of the CloudWatch Metric Alarm.
   396  	Arn *string `pulumi:"arn"`
   397  	// The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand. Either of the following is supported: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanThreshold`, `LessThanOrEqualToThreshold`. Additionally, the values  `LessThanLowerOrGreaterThanUpperThreshold`, `LessThanLowerThreshold`, and `GreaterThanUpperThreshold` are used only for alarms based on anomaly detection models.
   398  	ComparisonOperator *string `pulumi:"comparisonOperator"`
   399  	// The number of datapoints that must be breaching to trigger the alarm.
   400  	DatapointsToAlarm *int `pulumi:"datapointsToAlarm"`
   401  	// The dimensions for the alarm's associated metric.  For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   402  	Dimensions map[string]string `pulumi:"dimensions"`
   403  	// Used only for alarms based on percentiles.
   404  	// If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant.
   405  	// If you specify `evaluate` or omit this parameter, the alarm will always be evaluated and possibly change state no matter how many data points are available.
   406  	// The following values are supported: `ignore`, and `evaluate`.
   407  	EvaluateLowSampleCountPercentiles *string `pulumi:"evaluateLowSampleCountPercentiles"`
   408  	// The number of periods over which data is compared to the specified threshold.
   409  	EvaluationPeriods *int `pulumi:"evaluationPeriods"`
   410  	// The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
   411  	ExtendedStatistic *string `pulumi:"extendedStatistic"`
   412  	// The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   413  	InsufficientDataActions []interface{} `pulumi:"insufficientDataActions"`
   414  	// The name for the alarm's associated metric.
   415  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   416  	MetricName *string `pulumi:"metricName"`
   417  	// Enables you to create an alarm based on a metric math expression. You may specify at most 20.
   418  	MetricQueries []MetricAlarmMetricQuery `pulumi:"metricQueries"`
   419  	// The descriptive name for the alarm. This name must be unique within the user's AWS account
   420  	Name *string `pulumi:"name"`
   421  	// The namespace for the alarm's associated metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
   422  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   423  	Namespace *string `pulumi:"namespace"`
   424  	// The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   425  	OkActions []interface{} `pulumi:"okActions"`
   426  	// The period in seconds over which the specified `statistic` is applied.
   427  	// Valid values are `10`, `30`, or any multiple of `60`.
   428  	Period *int `pulumi:"period"`
   429  	// The statistic to apply to the alarm's associated metric.
   430  	// Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
   431  	Statistic *string `pulumi:"statistic"`
   432  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   433  	//
   434  	// > **NOTE:**  If you specify at least one `metricQuery`, you may not specify a `metricName`, `namespace`, `period` or `statistic`. If you do not specify a `metricQuery`, you must specify each of these (although you may use `extendedStatistic` instead of `statistic`).
   435  	Tags map[string]string `pulumi:"tags"`
   436  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   437  	//
   438  	// Deprecated: Please use `tags` instead.
   439  	TagsAll map[string]string `pulumi:"tagsAll"`
   440  	// The value against which the specified statistic is compared. This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.
   441  	Threshold *float64 `pulumi:"threshold"`
   442  	// If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
   443  	ThresholdMetricId *string `pulumi:"thresholdMetricId"`
   444  	// Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
   445  	TreatMissingData *string `pulumi:"treatMissingData"`
   446  	// The unit for the alarm's associated metric.
   447  	Unit *string `pulumi:"unit"`
   448  }
   449  
   450  type MetricAlarmState struct {
   451  	// Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
   452  	ActionsEnabled pulumi.BoolPtrInput
   453  	// The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   454  	AlarmActions pulumi.ArrayInput
   455  	// The description for the alarm.
   456  	AlarmDescription pulumi.StringPtrInput
   457  	// The ARN of the CloudWatch Metric Alarm.
   458  	Arn pulumi.StringPtrInput
   459  	// The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand. Either of the following is supported: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanThreshold`, `LessThanOrEqualToThreshold`. Additionally, the values  `LessThanLowerOrGreaterThanUpperThreshold`, `LessThanLowerThreshold`, and `GreaterThanUpperThreshold` are used only for alarms based on anomaly detection models.
   460  	ComparisonOperator pulumi.StringPtrInput
   461  	// The number of datapoints that must be breaching to trigger the alarm.
   462  	DatapointsToAlarm pulumi.IntPtrInput
   463  	// The dimensions for the alarm's associated metric.  For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   464  	Dimensions pulumi.StringMapInput
   465  	// Used only for alarms based on percentiles.
   466  	// If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant.
   467  	// If you specify `evaluate` or omit this parameter, the alarm will always be evaluated and possibly change state no matter how many data points are available.
   468  	// The following values are supported: `ignore`, and `evaluate`.
   469  	EvaluateLowSampleCountPercentiles pulumi.StringPtrInput
   470  	// The number of periods over which data is compared to the specified threshold.
   471  	EvaluationPeriods pulumi.IntPtrInput
   472  	// The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
   473  	ExtendedStatistic pulumi.StringPtrInput
   474  	// The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   475  	InsufficientDataActions pulumi.ArrayInput
   476  	// The name for the alarm's associated metric.
   477  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   478  	MetricName pulumi.StringPtrInput
   479  	// Enables you to create an alarm based on a metric math expression. You may specify at most 20.
   480  	MetricQueries MetricAlarmMetricQueryArrayInput
   481  	// The descriptive name for the alarm. This name must be unique within the user's AWS account
   482  	Name pulumi.StringPtrInput
   483  	// The namespace for the alarm's associated metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
   484  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   485  	Namespace pulumi.StringPtrInput
   486  	// The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   487  	OkActions pulumi.ArrayInput
   488  	// The period in seconds over which the specified `statistic` is applied.
   489  	// Valid values are `10`, `30`, or any multiple of `60`.
   490  	Period pulumi.IntPtrInput
   491  	// The statistic to apply to the alarm's associated metric.
   492  	// Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
   493  	Statistic pulumi.StringPtrInput
   494  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   495  	//
   496  	// > **NOTE:**  If you specify at least one `metricQuery`, you may not specify a `metricName`, `namespace`, `period` or `statistic`. If you do not specify a `metricQuery`, you must specify each of these (although you may use `extendedStatistic` instead of `statistic`).
   497  	Tags pulumi.StringMapInput
   498  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   499  	//
   500  	// Deprecated: Please use `tags` instead.
   501  	TagsAll pulumi.StringMapInput
   502  	// The value against which the specified statistic is compared. This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.
   503  	Threshold pulumi.Float64PtrInput
   504  	// If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
   505  	ThresholdMetricId pulumi.StringPtrInput
   506  	// Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
   507  	TreatMissingData pulumi.StringPtrInput
   508  	// The unit for the alarm's associated metric.
   509  	Unit pulumi.StringPtrInput
   510  }
   511  
   512  func (MetricAlarmState) ElementType() reflect.Type {
   513  	return reflect.TypeOf((*metricAlarmState)(nil)).Elem()
   514  }
   515  
   516  type metricAlarmArgs struct {
   517  	// Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
   518  	ActionsEnabled *bool `pulumi:"actionsEnabled"`
   519  	// The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   520  	AlarmActions []interface{} `pulumi:"alarmActions"`
   521  	// The description for the alarm.
   522  	AlarmDescription *string `pulumi:"alarmDescription"`
   523  	// The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand. Either of the following is supported: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanThreshold`, `LessThanOrEqualToThreshold`. Additionally, the values  `LessThanLowerOrGreaterThanUpperThreshold`, `LessThanLowerThreshold`, and `GreaterThanUpperThreshold` are used only for alarms based on anomaly detection models.
   524  	ComparisonOperator string `pulumi:"comparisonOperator"`
   525  	// The number of datapoints that must be breaching to trigger the alarm.
   526  	DatapointsToAlarm *int `pulumi:"datapointsToAlarm"`
   527  	// The dimensions for the alarm's associated metric.  For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   528  	Dimensions map[string]string `pulumi:"dimensions"`
   529  	// Used only for alarms based on percentiles.
   530  	// If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant.
   531  	// If you specify `evaluate` or omit this parameter, the alarm will always be evaluated and possibly change state no matter how many data points are available.
   532  	// The following values are supported: `ignore`, and `evaluate`.
   533  	EvaluateLowSampleCountPercentiles *string `pulumi:"evaluateLowSampleCountPercentiles"`
   534  	// The number of periods over which data is compared to the specified threshold.
   535  	EvaluationPeriods int `pulumi:"evaluationPeriods"`
   536  	// The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
   537  	ExtendedStatistic *string `pulumi:"extendedStatistic"`
   538  	// The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   539  	InsufficientDataActions []interface{} `pulumi:"insufficientDataActions"`
   540  	// The name for the alarm's associated metric.
   541  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   542  	MetricName *string `pulumi:"metricName"`
   543  	// Enables you to create an alarm based on a metric math expression. You may specify at most 20.
   544  	MetricQueries []MetricAlarmMetricQuery `pulumi:"metricQueries"`
   545  	// The descriptive name for the alarm. This name must be unique within the user's AWS account
   546  	Name *string `pulumi:"name"`
   547  	// The namespace for the alarm's associated metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
   548  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   549  	Namespace *string `pulumi:"namespace"`
   550  	// The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   551  	OkActions []interface{} `pulumi:"okActions"`
   552  	// The period in seconds over which the specified `statistic` is applied.
   553  	// Valid values are `10`, `30`, or any multiple of `60`.
   554  	Period *int `pulumi:"period"`
   555  	// The statistic to apply to the alarm's associated metric.
   556  	// Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
   557  	Statistic *string `pulumi:"statistic"`
   558  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   559  	//
   560  	// > **NOTE:**  If you specify at least one `metricQuery`, you may not specify a `metricName`, `namespace`, `period` or `statistic`. If you do not specify a `metricQuery`, you must specify each of these (although you may use `extendedStatistic` instead of `statistic`).
   561  	Tags map[string]string `pulumi:"tags"`
   562  	// The value against which the specified statistic is compared. This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.
   563  	Threshold *float64 `pulumi:"threshold"`
   564  	// If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
   565  	ThresholdMetricId *string `pulumi:"thresholdMetricId"`
   566  	// Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
   567  	TreatMissingData *string `pulumi:"treatMissingData"`
   568  	// The unit for the alarm's associated metric.
   569  	Unit *string `pulumi:"unit"`
   570  }
   571  
   572  // The set of arguments for constructing a MetricAlarm resource.
   573  type MetricAlarmArgs struct {
   574  	// Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
   575  	ActionsEnabled pulumi.BoolPtrInput
   576  	// The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   577  	AlarmActions pulumi.ArrayInput
   578  	// The description for the alarm.
   579  	AlarmDescription pulumi.StringPtrInput
   580  	// The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand. Either of the following is supported: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanThreshold`, `LessThanOrEqualToThreshold`. Additionally, the values  `LessThanLowerOrGreaterThanUpperThreshold`, `LessThanLowerThreshold`, and `GreaterThanUpperThreshold` are used only for alarms based on anomaly detection models.
   581  	ComparisonOperator pulumi.StringInput
   582  	// The number of datapoints that must be breaching to trigger the alarm.
   583  	DatapointsToAlarm pulumi.IntPtrInput
   584  	// The dimensions for the alarm's associated metric.  For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   585  	Dimensions pulumi.StringMapInput
   586  	// Used only for alarms based on percentiles.
   587  	// If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant.
   588  	// If you specify `evaluate` or omit this parameter, the alarm will always be evaluated and possibly change state no matter how many data points are available.
   589  	// The following values are supported: `ignore`, and `evaluate`.
   590  	EvaluateLowSampleCountPercentiles pulumi.StringPtrInput
   591  	// The number of periods over which data is compared to the specified threshold.
   592  	EvaluationPeriods pulumi.IntInput
   593  	// The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
   594  	ExtendedStatistic pulumi.StringPtrInput
   595  	// The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   596  	InsufficientDataActions pulumi.ArrayInput
   597  	// The name for the alarm's associated metric.
   598  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   599  	MetricName pulumi.StringPtrInput
   600  	// Enables you to create an alarm based on a metric math expression. You may specify at most 20.
   601  	MetricQueries MetricAlarmMetricQueryArrayInput
   602  	// The descriptive name for the alarm. This name must be unique within the user's AWS account
   603  	Name pulumi.StringPtrInput
   604  	// The namespace for the alarm's associated metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
   605  	// See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   606  	Namespace pulumi.StringPtrInput
   607  	// The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   608  	OkActions pulumi.ArrayInput
   609  	// The period in seconds over which the specified `statistic` is applied.
   610  	// Valid values are `10`, `30`, or any multiple of `60`.
   611  	Period pulumi.IntPtrInput
   612  	// The statistic to apply to the alarm's associated metric.
   613  	// Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
   614  	Statistic pulumi.StringPtrInput
   615  	// A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   616  	//
   617  	// > **NOTE:**  If you specify at least one `metricQuery`, you may not specify a `metricName`, `namespace`, `period` or `statistic`. If you do not specify a `metricQuery`, you must specify each of these (although you may use `extendedStatistic` instead of `statistic`).
   618  	Tags pulumi.StringMapInput
   619  	// The value against which the specified statistic is compared. This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.
   620  	Threshold pulumi.Float64PtrInput
   621  	// If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
   622  	ThresholdMetricId pulumi.StringPtrInput
   623  	// Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
   624  	TreatMissingData pulumi.StringPtrInput
   625  	// The unit for the alarm's associated metric.
   626  	Unit pulumi.StringPtrInput
   627  }
   628  
   629  func (MetricAlarmArgs) ElementType() reflect.Type {
   630  	return reflect.TypeOf((*metricAlarmArgs)(nil)).Elem()
   631  }
   632  
   633  type MetricAlarmInput interface {
   634  	pulumi.Input
   635  
   636  	ToMetricAlarmOutput() MetricAlarmOutput
   637  	ToMetricAlarmOutputWithContext(ctx context.Context) MetricAlarmOutput
   638  }
   639  
   640  func (*MetricAlarm) ElementType() reflect.Type {
   641  	return reflect.TypeOf((**MetricAlarm)(nil)).Elem()
   642  }
   643  
   644  func (i *MetricAlarm) ToMetricAlarmOutput() MetricAlarmOutput {
   645  	return i.ToMetricAlarmOutputWithContext(context.Background())
   646  }
   647  
   648  func (i *MetricAlarm) ToMetricAlarmOutputWithContext(ctx context.Context) MetricAlarmOutput {
   649  	return pulumi.ToOutputWithContext(ctx, i).(MetricAlarmOutput)
   650  }
   651  
   652  // MetricAlarmArrayInput is an input type that accepts MetricAlarmArray and MetricAlarmArrayOutput values.
   653  // You can construct a concrete instance of `MetricAlarmArrayInput` via:
   654  //
   655  //	MetricAlarmArray{ MetricAlarmArgs{...} }
   656  type MetricAlarmArrayInput interface {
   657  	pulumi.Input
   658  
   659  	ToMetricAlarmArrayOutput() MetricAlarmArrayOutput
   660  	ToMetricAlarmArrayOutputWithContext(context.Context) MetricAlarmArrayOutput
   661  }
   662  
   663  type MetricAlarmArray []MetricAlarmInput
   664  
   665  func (MetricAlarmArray) ElementType() reflect.Type {
   666  	return reflect.TypeOf((*[]*MetricAlarm)(nil)).Elem()
   667  }
   668  
   669  func (i MetricAlarmArray) ToMetricAlarmArrayOutput() MetricAlarmArrayOutput {
   670  	return i.ToMetricAlarmArrayOutputWithContext(context.Background())
   671  }
   672  
   673  func (i MetricAlarmArray) ToMetricAlarmArrayOutputWithContext(ctx context.Context) MetricAlarmArrayOutput {
   674  	return pulumi.ToOutputWithContext(ctx, i).(MetricAlarmArrayOutput)
   675  }
   676  
   677  // MetricAlarmMapInput is an input type that accepts MetricAlarmMap and MetricAlarmMapOutput values.
   678  // You can construct a concrete instance of `MetricAlarmMapInput` via:
   679  //
   680  //	MetricAlarmMap{ "key": MetricAlarmArgs{...} }
   681  type MetricAlarmMapInput interface {
   682  	pulumi.Input
   683  
   684  	ToMetricAlarmMapOutput() MetricAlarmMapOutput
   685  	ToMetricAlarmMapOutputWithContext(context.Context) MetricAlarmMapOutput
   686  }
   687  
   688  type MetricAlarmMap map[string]MetricAlarmInput
   689  
   690  func (MetricAlarmMap) ElementType() reflect.Type {
   691  	return reflect.TypeOf((*map[string]*MetricAlarm)(nil)).Elem()
   692  }
   693  
   694  func (i MetricAlarmMap) ToMetricAlarmMapOutput() MetricAlarmMapOutput {
   695  	return i.ToMetricAlarmMapOutputWithContext(context.Background())
   696  }
   697  
   698  func (i MetricAlarmMap) ToMetricAlarmMapOutputWithContext(ctx context.Context) MetricAlarmMapOutput {
   699  	return pulumi.ToOutputWithContext(ctx, i).(MetricAlarmMapOutput)
   700  }
   701  
   702  type MetricAlarmOutput struct{ *pulumi.OutputState }
   703  
   704  func (MetricAlarmOutput) ElementType() reflect.Type {
   705  	return reflect.TypeOf((**MetricAlarm)(nil)).Elem()
   706  }
   707  
   708  func (o MetricAlarmOutput) ToMetricAlarmOutput() MetricAlarmOutput {
   709  	return o
   710  }
   711  
   712  func (o MetricAlarmOutput) ToMetricAlarmOutputWithContext(ctx context.Context) MetricAlarmOutput {
   713  	return o
   714  }
   715  
   716  // Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
   717  func (o MetricAlarmOutput) ActionsEnabled() pulumi.BoolPtrOutput {
   718  	return o.ApplyT(func(v *MetricAlarm) pulumi.BoolPtrOutput { return v.ActionsEnabled }).(pulumi.BoolPtrOutput)
   719  }
   720  
   721  // The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   722  func (o MetricAlarmOutput) AlarmActions() pulumi.StringArrayOutput {
   723  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringArrayOutput { return v.AlarmActions }).(pulumi.StringArrayOutput)
   724  }
   725  
   726  // The description for the alarm.
   727  func (o MetricAlarmOutput) AlarmDescription() pulumi.StringPtrOutput {
   728  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.AlarmDescription }).(pulumi.StringPtrOutput)
   729  }
   730  
   731  // The ARN of the CloudWatch Metric Alarm.
   732  func (o MetricAlarmOutput) Arn() pulumi.StringOutput {
   733  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   734  }
   735  
   736  // The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand. Either of the following is supported: `GreaterThanOrEqualToThreshold`, `GreaterThanThreshold`, `LessThanThreshold`, `LessThanOrEqualToThreshold`. Additionally, the values  `LessThanLowerOrGreaterThanUpperThreshold`, `LessThanLowerThreshold`, and `GreaterThanUpperThreshold` are used only for alarms based on anomaly detection models.
   737  func (o MetricAlarmOutput) ComparisonOperator() pulumi.StringOutput {
   738  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringOutput { return v.ComparisonOperator }).(pulumi.StringOutput)
   739  }
   740  
   741  // The number of datapoints that must be breaching to trigger the alarm.
   742  func (o MetricAlarmOutput) DatapointsToAlarm() pulumi.IntPtrOutput {
   743  	return o.ApplyT(func(v *MetricAlarm) pulumi.IntPtrOutput { return v.DatapointsToAlarm }).(pulumi.IntPtrOutput)
   744  }
   745  
   746  // The dimensions for the alarm's associated metric.  For the list of available dimensions see the AWS documentation [here](http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   747  func (o MetricAlarmOutput) Dimensions() pulumi.StringMapOutput {
   748  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringMapOutput { return v.Dimensions }).(pulumi.StringMapOutput)
   749  }
   750  
   751  // Used only for alarms based on percentiles.
   752  // If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant.
   753  // If you specify `evaluate` or omit this parameter, the alarm will always be evaluated and possibly change state no matter how many data points are available.
   754  // The following values are supported: `ignore`, and `evaluate`.
   755  func (o MetricAlarmOutput) EvaluateLowSampleCountPercentiles() pulumi.StringOutput {
   756  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringOutput { return v.EvaluateLowSampleCountPercentiles }).(pulumi.StringOutput)
   757  }
   758  
   759  // The number of periods over which data is compared to the specified threshold.
   760  func (o MetricAlarmOutput) EvaluationPeriods() pulumi.IntOutput {
   761  	return o.ApplyT(func(v *MetricAlarm) pulumi.IntOutput { return v.EvaluationPeriods }).(pulumi.IntOutput)
   762  }
   763  
   764  // The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
   765  func (o MetricAlarmOutput) ExtendedStatistic() pulumi.StringPtrOutput {
   766  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.ExtendedStatistic }).(pulumi.StringPtrOutput)
   767  }
   768  
   769  // The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   770  func (o MetricAlarmOutput) InsufficientDataActions() pulumi.StringArrayOutput {
   771  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringArrayOutput { return v.InsufficientDataActions }).(pulumi.StringArrayOutput)
   772  }
   773  
   774  // The name for the alarm's associated metric.
   775  // See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   776  func (o MetricAlarmOutput) MetricName() pulumi.StringPtrOutput {
   777  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.MetricName }).(pulumi.StringPtrOutput)
   778  }
   779  
   780  // Enables you to create an alarm based on a metric math expression. You may specify at most 20.
   781  func (o MetricAlarmOutput) MetricQueries() MetricAlarmMetricQueryArrayOutput {
   782  	return o.ApplyT(func(v *MetricAlarm) MetricAlarmMetricQueryArrayOutput { return v.MetricQueries }).(MetricAlarmMetricQueryArrayOutput)
   783  }
   784  
   785  // The descriptive name for the alarm. This name must be unique within the user's AWS account
   786  func (o MetricAlarmOutput) Name() pulumi.StringOutput {
   787  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
   788  }
   789  
   790  // The namespace for the alarm's associated metric. See docs for the [list of namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/aws-namespaces.html).
   791  // See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
   792  func (o MetricAlarmOutput) Namespace() pulumi.StringPtrOutput {
   793  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.Namespace }).(pulumi.StringPtrOutput)
   794  }
   795  
   796  // The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).
   797  func (o MetricAlarmOutput) OkActions() pulumi.StringArrayOutput {
   798  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringArrayOutput { return v.OkActions }).(pulumi.StringArrayOutput)
   799  }
   800  
   801  // The period in seconds over which the specified `statistic` is applied.
   802  // Valid values are `10`, `30`, or any multiple of `60`.
   803  func (o MetricAlarmOutput) Period() pulumi.IntPtrOutput {
   804  	return o.ApplyT(func(v *MetricAlarm) pulumi.IntPtrOutput { return v.Period }).(pulumi.IntPtrOutput)
   805  }
   806  
   807  // The statistic to apply to the alarm's associated metric.
   808  // Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
   809  func (o MetricAlarmOutput) Statistic() pulumi.StringPtrOutput {
   810  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.Statistic }).(pulumi.StringPtrOutput)
   811  }
   812  
   813  // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   814  //
   815  // > **NOTE:**  If you specify at least one `metricQuery`, you may not specify a `metricName`, `namespace`, `period` or `statistic`. If you do not specify a `metricQuery`, you must specify each of these (although you may use `extendedStatistic` instead of `statistic`).
   816  func (o MetricAlarmOutput) Tags() pulumi.StringMapOutput {
   817  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   818  }
   819  
   820  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   821  //
   822  // Deprecated: Please use `tags` instead.
   823  func (o MetricAlarmOutput) TagsAll() pulumi.StringMapOutput {
   824  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   825  }
   826  
   827  // The value against which the specified statistic is compared. This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.
   828  func (o MetricAlarmOutput) Threshold() pulumi.Float64PtrOutput {
   829  	return o.ApplyT(func(v *MetricAlarm) pulumi.Float64PtrOutput { return v.Threshold }).(pulumi.Float64PtrOutput)
   830  }
   831  
   832  // If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
   833  func (o MetricAlarmOutput) ThresholdMetricId() pulumi.StringPtrOutput {
   834  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.ThresholdMetricId }).(pulumi.StringPtrOutput)
   835  }
   836  
   837  // Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
   838  func (o MetricAlarmOutput) TreatMissingData() pulumi.StringPtrOutput {
   839  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.TreatMissingData }).(pulumi.StringPtrOutput)
   840  }
   841  
   842  // The unit for the alarm's associated metric.
   843  func (o MetricAlarmOutput) Unit() pulumi.StringPtrOutput {
   844  	return o.ApplyT(func(v *MetricAlarm) pulumi.StringPtrOutput { return v.Unit }).(pulumi.StringPtrOutput)
   845  }
   846  
   847  type MetricAlarmArrayOutput struct{ *pulumi.OutputState }
   848  
   849  func (MetricAlarmArrayOutput) ElementType() reflect.Type {
   850  	return reflect.TypeOf((*[]*MetricAlarm)(nil)).Elem()
   851  }
   852  
   853  func (o MetricAlarmArrayOutput) ToMetricAlarmArrayOutput() MetricAlarmArrayOutput {
   854  	return o
   855  }
   856  
   857  func (o MetricAlarmArrayOutput) ToMetricAlarmArrayOutputWithContext(ctx context.Context) MetricAlarmArrayOutput {
   858  	return o
   859  }
   860  
   861  func (o MetricAlarmArrayOutput) Index(i pulumi.IntInput) MetricAlarmOutput {
   862  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MetricAlarm {
   863  		return vs[0].([]*MetricAlarm)[vs[1].(int)]
   864  	}).(MetricAlarmOutput)
   865  }
   866  
   867  type MetricAlarmMapOutput struct{ *pulumi.OutputState }
   868  
   869  func (MetricAlarmMapOutput) ElementType() reflect.Type {
   870  	return reflect.TypeOf((*map[string]*MetricAlarm)(nil)).Elem()
   871  }
   872  
   873  func (o MetricAlarmMapOutput) ToMetricAlarmMapOutput() MetricAlarmMapOutput {
   874  	return o
   875  }
   876  
   877  func (o MetricAlarmMapOutput) ToMetricAlarmMapOutputWithContext(ctx context.Context) MetricAlarmMapOutput {
   878  	return o
   879  }
   880  
   881  func (o MetricAlarmMapOutput) MapIndex(k pulumi.StringInput) MetricAlarmOutput {
   882  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MetricAlarm {
   883  		return vs[0].(map[string]*MetricAlarm)[vs[1].(string)]
   884  	}).(MetricAlarmOutput)
   885  }
   886  
   887  func init() {
   888  	pulumi.RegisterInputType(reflect.TypeOf((*MetricAlarmInput)(nil)).Elem(), &MetricAlarm{})
   889  	pulumi.RegisterInputType(reflect.TypeOf((*MetricAlarmArrayInput)(nil)).Elem(), MetricAlarmArray{})
   890  	pulumi.RegisterInputType(reflect.TypeOf((*MetricAlarmMapInput)(nil)).Elem(), MetricAlarmMap{})
   891  	pulumi.RegisterOutputType(MetricAlarmOutput{})
   892  	pulumi.RegisterOutputType(MetricAlarmArrayOutput{})
   893  	pulumi.RegisterOutputType(MetricAlarmMapOutput{})
   894  }