Class MetricAlarmArgs.Builder

  • Enclosing class:
    MetricAlarmArgs

    public static final class MetricAlarmArgs.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • actionsEnabled

        public MetricAlarmArgs.Builder actionsEnabled​(@Nullable
                                                      com.pulumi.core.Output<java.lang.Boolean> actionsEnabled)
        Parameters:
        actionsEnabled - Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
        Returns:
        builder
      • actionsEnabled

        public MetricAlarmArgs.Builder actionsEnabled​(java.lang.Boolean actionsEnabled)
        Parameters:
        actionsEnabled - Indicates whether or not actions should be executed during any changes to the alarm's state. Defaults to `true`.
        Returns:
        builder
      • alarmActions

        public MetricAlarmArgs.Builder alarmActions​(@Nullable
                                                    com.pulumi.core.Output<java.util.List<java.lang.String>> alarmActions)
        Parameters:
        alarmActions - List of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • alarmActions

        public MetricAlarmArgs.Builder alarmActions​(java.util.List<java.lang.String> alarmActions)
        Parameters:
        alarmActions - List of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • alarmActions

        public MetricAlarmArgs.Builder alarmActions​(java.lang.String... alarmActions)
        Parameters:
        alarmActions - List of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • alarmDescription

        public MetricAlarmArgs.Builder alarmDescription​(@Nullable
                                                        com.pulumi.core.Output<java.lang.String> alarmDescription)
        Parameters:
        alarmDescription - The description for the alarm.
        Returns:
        builder
      • alarmDescription

        public MetricAlarmArgs.Builder alarmDescription​(java.lang.String alarmDescription)
        Parameters:
        alarmDescription - The description for the alarm.
        Returns:
        builder
      • comparisonOperator

        public MetricAlarmArgs.Builder comparisonOperator​(@Nullable
                                                          com.pulumi.core.Output<java.lang.String> comparisonOperator)
        Parameters:
        comparisonOperator - 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.
        Returns:
        builder
      • comparisonOperator

        public MetricAlarmArgs.Builder comparisonOperator​(java.lang.String comparisonOperator)
        Parameters:
        comparisonOperator - 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.
        Returns:
        builder
      • datapointsToAlarm

        public MetricAlarmArgs.Builder datapointsToAlarm​(@Nullable
                                                         com.pulumi.core.Output<java.lang.Integer> datapointsToAlarm)
        Parameters:
        datapointsToAlarm - The number of data points that must be breaching to trigger the alarm.
        Returns:
        builder
      • datapointsToAlarm

        public MetricAlarmArgs.Builder datapointsToAlarm​(java.lang.Integer datapointsToAlarm)
        Parameters:
        datapointsToAlarm - The number of data points that must be breaching to trigger the alarm.
        Returns:
        builder
      • dimensions

        public MetricAlarmArgs.Builder dimensions​(@Nullable
                                                  com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> dimensions)
        Parameters:
        dimensions - 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).
        Returns:
        builder
      • dimensions

        public MetricAlarmArgs.Builder dimensions​(java.util.Map<java.lang.String,​java.lang.String> dimensions)
        Parameters:
        dimensions - 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).
        Returns:
        builder
      • evaluateLowSampleCountPercentiles

        public MetricAlarmArgs.Builder evaluateLowSampleCountPercentiles​(@Nullable
                                                                         com.pulumi.core.Output<java.lang.String> evaluateLowSampleCountPercentiles)
        Parameters:
        evaluateLowSampleCountPercentiles - Used only for alarms based on percentiles. If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant. 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. The following values are supported: `ignore`, and `evaluate`.
        Returns:
        builder
      • evaluateLowSampleCountPercentiles

        public MetricAlarmArgs.Builder evaluateLowSampleCountPercentiles​(java.lang.String evaluateLowSampleCountPercentiles)
        Parameters:
        evaluateLowSampleCountPercentiles - Used only for alarms based on percentiles. If you specify `ignore`, the alarm state will not change during periods with too few data points to be statistically significant. 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. The following values are supported: `ignore`, and `evaluate`.
        Returns:
        builder
      • evaluationCriteria

        public MetricAlarmArgs.Builder evaluationCriteria​(@Nullable
                                                          com.pulumi.core.Output<MetricAlarmEvaluationCriteriaArgs> evaluationCriteria)
        Parameters:
        evaluationCriteria - The evaluation criteria for PromQL alarms. Cannot be used with traditional metric alarm parameters.
        Returns:
        builder
      • evaluationCriteria

        public MetricAlarmArgs.Builder evaluationCriteria​(MetricAlarmEvaluationCriteriaArgs evaluationCriteria)
        Parameters:
        evaluationCriteria - The evaluation criteria for PromQL alarms. Cannot be used with traditional metric alarm parameters.
        Returns:
        builder
      • evaluationInterval

        public MetricAlarmArgs.Builder evaluationInterval​(@Nullable
                                                          com.pulumi.core.Output<java.lang.Integer> evaluationInterval)
        Parameters:
        evaluationInterval - The frequency, in seconds, at which the alarm is evaluated. Valid values are `10`, `20`, `30`, and any multiple of `60`. Required when using `evaluationCriteria`.
        Returns:
        builder
      • evaluationInterval

        public MetricAlarmArgs.Builder evaluationInterval​(java.lang.Integer evaluationInterval)
        Parameters:
        evaluationInterval - The frequency, in seconds, at which the alarm is evaluated. Valid values are `10`, `20`, `30`, and any multiple of `60`. Required when using `evaluationCriteria`.
        Returns:
        builder
      • evaluationPeriods

        public MetricAlarmArgs.Builder evaluationPeriods​(@Nullable
                                                         com.pulumi.core.Output<java.lang.Integer> evaluationPeriods)
        Parameters:
        evaluationPeriods - The number of periods over which data is compared to the specified threshold. Required for traditional metric alarms.
        Returns:
        builder
      • evaluationPeriods

        public MetricAlarmArgs.Builder evaluationPeriods​(java.lang.Integer evaluationPeriods)
        Parameters:
        evaluationPeriods - The number of periods over which data is compared to the specified threshold. Required for traditional metric alarms.
        Returns:
        builder
      • evaluationWindow

        public MetricAlarmArgs.Builder evaluationWindow​(@Nullable
                                                        com.pulumi.core.Output<MetricAlarmEvaluationWindowArgs> evaluationWindow)
        Parameters:
        evaluationWindow - Configures the alarm to use a wall clock evaluation window instead of the default sliding window. Not supported for alarms that use `evaluationCriteria`. See `evaluationWindow` below.
        Returns:
        builder
      • evaluationWindow

        public MetricAlarmArgs.Builder evaluationWindow​(MetricAlarmEvaluationWindowArgs evaluationWindow)
        Parameters:
        evaluationWindow - Configures the alarm to use a wall clock evaluation window instead of the default sliding window. Not supported for alarms that use `evaluationCriteria`. See `evaluationWindow` below.
        Returns:
        builder
      • extendedStatistic

        public MetricAlarmArgs.Builder extendedStatistic​(@Nullable
                                                         com.pulumi.core.Output<java.lang.String> extendedStatistic)
        Parameters:
        extendedStatistic - The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
        Returns:
        builder
      • extendedStatistic

        public MetricAlarmArgs.Builder extendedStatistic​(java.lang.String extendedStatistic)
        Parameters:
        extendedStatistic - The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
        Returns:
        builder
      • insufficientDataActions

        public MetricAlarmArgs.Builder insufficientDataActions​(@Nullable
                                                               com.pulumi.core.Output<java.util.List<java.lang.String>> insufficientDataActions)
        Parameters:
        insufficientDataActions - List of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • insufficientDataActions

        public MetricAlarmArgs.Builder insufficientDataActions​(java.util.List<java.lang.String> insufficientDataActions)
        Parameters:
        insufficientDataActions - List of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • insufficientDataActions

        public MetricAlarmArgs.Builder insufficientDataActions​(java.lang.String... insufficientDataActions)
        Parameters:
        insufficientDataActions - List of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • metricName

        public MetricAlarmArgs.Builder metricName​(@Nullable
                                                  com.pulumi.core.Output<java.lang.String> metricName)
        Parameters:
        metricName - The name for the alarm's associated metric. See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
        Returns:
        builder
      • metricName

        public MetricAlarmArgs.Builder metricName​(java.lang.String metricName)
        Parameters:
        metricName - The name for the alarm's associated metric. See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
        Returns:
        builder
      • metricQueries

        public MetricAlarmArgs.Builder metricQueries​(@Nullable
                                                     com.pulumi.core.Output<java.util.List<MetricAlarmMetricQueryArgs>> metricQueries)
        Parameters:
        metricQueries - Enables you to create an alarm based on a metric math expression. You may specify at most 20.
        Returns:
        builder
      • metricQueries

        public MetricAlarmArgs.Builder metricQueries​(java.util.List<MetricAlarmMetricQueryArgs> metricQueries)
        Parameters:
        metricQueries - Enables you to create an alarm based on a metric math expression. You may specify at most 20.
        Returns:
        builder
      • metricQueries

        public MetricAlarmArgs.Builder metricQueries​(MetricAlarmMetricQueryArgs... metricQueries)
        Parameters:
        metricQueries - Enables you to create an alarm based on a metric math expression. You may specify at most 20.
        Returns:
        builder
      • name

        public MetricAlarmArgs.Builder name​(@Nullable
                                            com.pulumi.core.Output<java.lang.String> name)
        Parameters:
        name - The descriptive name for the alarm. This name must be unique within the user's AWS account
        Returns:
        builder
      • name

        public MetricAlarmArgs.Builder name​(java.lang.String name)
        Parameters:
        name - The descriptive name for the alarm. This name must be unique within the user's AWS account
        Returns:
        builder
      • namespace

        public MetricAlarmArgs.Builder namespace​(@Nullable
                                                 com.pulumi.core.Output<java.lang.String> namespace)
        Parameters:
        namespace - 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). See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
        Returns:
        builder
      • namespace

        public MetricAlarmArgs.Builder namespace​(java.lang.String namespace)
        Parameters:
        namespace - 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). See docs for [supported metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
        Returns:
        builder
      • okActions

        public MetricAlarmArgs.Builder okActions​(@Nullable
                                                 com.pulumi.core.Output<java.util.List<java.lang.String>> okActions)
        Parameters:
        okActions - List of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • okActions

        public MetricAlarmArgs.Builder okActions​(java.util.List<java.lang.String> okActions)
        Parameters:
        okActions - List of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • okActions

        public MetricAlarmArgs.Builder okActions​(java.lang.String... okActions)
        Parameters:
        okActions - List of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an ARN.
        Returns:
        builder
      • period

        public MetricAlarmArgs.Builder period​(@Nullable
                                              com.pulumi.core.Output<java.lang.Integer> period)
        Parameters:
        period - The period in seconds over which the specified `statistic` is applied. Valid values are `10`, `20`, `30`, or any multiple of `60`.
        Returns:
        builder
      • period

        public MetricAlarmArgs.Builder period​(java.lang.Integer period)
        Parameters:
        period - The period in seconds over which the specified `statistic` is applied. Valid values are `10`, `20`, `30`, or any multiple of `60`.
        Returns:
        builder
      • region

        public MetricAlarmArgs.Builder region​(@Nullable
                                              com.pulumi.core.Output<java.lang.String> region)
        Parameters:
        region - Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
        Returns:
        builder
      • region

        public MetricAlarmArgs.Builder region​(java.lang.String region)
        Parameters:
        region - Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
        Returns:
        builder
      • statistic

        public MetricAlarmArgs.Builder statistic​(@Nullable
                                                 com.pulumi.core.Output<java.lang.String> statistic)
        Parameters:
        statistic - The statistic to apply to the alarm's associated metric. Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
        Returns:
        builder
      • statistic

        public MetricAlarmArgs.Builder statistic​(java.lang.String statistic)
        Parameters:
        statistic - The statistic to apply to the alarm's associated metric. Either of the following is supported: `SampleCount`, `Average`, `Sum`, `Minimum`, `Maximum`
        Returns:
        builder
      • tags

        public MetricAlarmArgs.Builder tags​(@Nullable
                                            com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tags)
        Parameters:
        tags - 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. See [related part of AWS Docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) for details about valid values. > **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`).
        Returns:
        builder
      • tags

        public MetricAlarmArgs.Builder tags​(java.util.Map<java.lang.String,​java.lang.String> tags)
        Parameters:
        tags - 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. See [related part of AWS Docs](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html) for details about valid values. > **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`).
        Returns:
        builder
      • threshold

        public MetricAlarmArgs.Builder threshold​(@Nullable
                                                 com.pulumi.core.Output<java.lang.Double> threshold)
        Parameters:
        threshold - 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.
        Returns:
        builder
      • threshold

        public MetricAlarmArgs.Builder threshold​(java.lang.Double threshold)
        Parameters:
        threshold - 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.
        Returns:
        builder
      • thresholdMetricId

        public MetricAlarmArgs.Builder thresholdMetricId​(@Nullable
                                                         com.pulumi.core.Output<java.lang.String> thresholdMetricId)
        Parameters:
        thresholdMetricId - If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
        Returns:
        builder
      • thresholdMetricId

        public MetricAlarmArgs.Builder thresholdMetricId​(java.lang.String thresholdMetricId)
        Parameters:
        thresholdMetricId - If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
        Returns:
        builder
      • treatMissingData

        public MetricAlarmArgs.Builder treatMissingData​(@Nullable
                                                        com.pulumi.core.Output<java.lang.String> treatMissingData)
        Parameters:
        treatMissingData - Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
        Returns:
        builder
      • treatMissingData

        public MetricAlarmArgs.Builder treatMissingData​(java.lang.String treatMissingData)
        Parameters:
        treatMissingData - Sets how this alarm is to handle missing data points. The following values are supported: `missing`, `ignore`, `breaching` and `notBreaching`. Defaults to `missing`.
        Returns:
        builder
      • unit

        public MetricAlarmArgs.Builder unit​(@Nullable
                                            com.pulumi.core.Output<java.lang.String> unit)
        Parameters:
        unit - The unit for the alarm's associated metric.
        Returns:
        builder
      • unit

        public MetricAlarmArgs.Builder unit​(java.lang.String unit)
        Parameters:
        unit - The unit for the alarm's associated metric.
        Returns:
        builder
      • warmUpConfiguration

        public MetricAlarmArgs.Builder warmUpConfiguration​(@Nullable
                                                           com.pulumi.core.Output<MetricAlarmWarmUpConfigurationArgs> warmUpConfiguration)
        Parameters:
        warmUpConfiguration - Warm-up period that delays alarm evaluation after the alarm is created. During the warm-up period the alarm stays in `INSUFFICIENT_DATA` and does not perform alarm actions. See `warmUpConfiguration` below.
        Returns:
        builder
      • warmUpConfiguration

        public MetricAlarmArgs.Builder warmUpConfiguration​(MetricAlarmWarmUpConfigurationArgs warmUpConfiguration)
        Parameters:
        warmUpConfiguration - Warm-up period that delays alarm evaluation after the alarm is created. During the warm-up period the alarm stays in `INSUFFICIENT_DATA` and does not perform alarm actions. See `warmUpConfiguration` below.
        Returns:
        builder