Example usage for com.amazonaws.services.cloudwatch AmazonCloudWatchAsyncClient describeAlarms

List of usage examples for com.amazonaws.services.cloudwatch AmazonCloudWatchAsyncClient describeAlarms

Introduction

In this page you can find the example usage for com.amazonaws.services.cloudwatch AmazonCloudWatchAsyncClient describeAlarms.

Prototype

DescribeAlarmsResult describeAlarms();

Source Link

Document

Simplified method form for invoking the DescribeAlarms operation.

Usage

From source file:com.vmware.photon.controller.model.adapters.awsadapter.AWSUtils.java

License:Open Source License

public static AmazonCloudWatchAsyncClient getStatsAsyncClient(AuthCredentialsServiceState credentials,
        String region, ExecutorService executorService, boolean isMockRequest) {
    AmazonCloudWatchAsyncClient client = new AmazonCloudWatchAsyncClient(
            new BasicAWSCredentials(credentials.privateKeyId, credentials.privateKey), executorService);

    client.setRegion(Region.getRegion(Regions.fromName(region)));
    // make a call to validate credentials
    if (!isMockRequest) {
        client.describeAlarms();
    }//from  www  . j a v a  2s .co  m
    return client;
}