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

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

Introduction

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

Prototype


public String getNamespace() 

Source Link

Document

The namespace of the metric associated with the alarm.

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);
}