List of usage examples for com.amazonaws.services.cloudwatch AmazonCloudWatchClient builder
public static AmazonCloudWatchClientBuilder builder()
From source file:com.netflix.edda.AwsClientFactory.java
License:Apache License
public static AmazonCloudWatch newCloudWatchClient(AwsConfiguration config, AWSCredentialsProvider provider, String vip, String region) { if (config.useMock()) throw new UnsupportedOperationException("CloudWatch mock not yet supported"); EddaCloudWatchClient edda = new EddaCloudWatchClient(config, vip, region); if (config.useEdda() && !config.wrapAwsClient()) return edda.readOnly(); AmazonCloudWatch client = AmazonCloudWatchClient.builder().withCredentials(provider) .withClientConfiguration(clientConfig(config)).withRegion(region).build(); if (config.useEdda()) client = edda.wrapAwsClient(client); return client; }