Example usage for com.amazonaws.services.cloudwatch.model MetricAlarm getThreshold

List of usage examples for com.amazonaws.services.cloudwatch.model MetricAlarm getThreshold

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudwatch.model MetricAlarm getThreshold.

Prototype


public Double getThreshold() 

Source Link

Document

The value to compare with the specified statistic.

Usage

From source file:com.netflix.spinnaker.clouddriver.ecs.services.EcsCloudMetricService.java

License:Apache License

private PutMetricAlarmRequest buildPutMetricAlarmRequest(MetricAlarm metricAlarm, String serviceName,
        Set<String> insufficientActionPolicyArns, Set<String> okActionPolicyArns,
        Set<String> alarmActionPolicyArns) {
    return new PutMetricAlarmRequest().withAlarmName(metricAlarm.getAlarmName() + "-" + serviceName)
            .withEvaluationPeriods(metricAlarm.getEvaluationPeriods()).withThreshold(metricAlarm.getThreshold())
            .withActionsEnabled(metricAlarm.getActionsEnabled())
            .withAlarmDescription(metricAlarm.getAlarmDescription())
            .withComparisonOperator(metricAlarm.getComparisonOperator())
            .withDimensions(metricAlarm.getDimensions()).withMetricName(metricAlarm.getMetricName())
            .withUnit(metricAlarm.getUnit()).withPeriod(metricAlarm.getPeriod())
            .withNamespace(metricAlarm.getNamespace()).withStatistic(metricAlarm.getStatistic())
            .withEvaluateLowSampleCountPercentile(metricAlarm.getEvaluateLowSampleCountPercentile())
            .withTreatMissingData(metricAlarm.getTreatMissingData())
            .withExtendedStatistic(metricAlarm.getExtendedStatistic())
            .withInsufficientDataActions(insufficientActionPolicyArns).withOKActions(okActionPolicyArns)
            .withAlarmActions(alarmActionPolicyArns);
}