com.amazonaws.services.cloudwatch.AmazonCloudWatchAsyncClientBuilder Java Examples

The following examples show how to use com.amazonaws.services.cloudwatch.AmazonCloudWatchAsyncClientBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AmazonAsyncDockerClientsHolder.java    From spring-localstack with Apache License 2.0 5 votes vote down vote up
@Override
public AmazonCloudWatchAsync amazonCloudWatch() {
    return decorateWithConfigsAndBuild(
        AmazonCloudWatchAsyncClientBuilder.standard(),
        LocalstackDocker::getEndpointCloudWatch
    );
}
 
Example #2
Source File: KinesisBinderConfiguration.java    From spring-cloud-stream-binder-aws-kinesis with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(name = "spring.cloud.stream.kinesis.binder.kpl-kcl-enabled")
public AmazonCloudWatchAsync cloudWatch() {
	if (this.hasInputs) {
		return AmazonCloudWatchAsyncClientBuilder.standard()
				.withCredentials(this.awsCredentialsProvider)
				.withRegion(this.region)
				.build();
	}
	else {
		return null;
	}
}
 
Example #3
Source File: CloudWatchClient.java    From titus-control-plane with Apache License 2.0 5 votes vote down vote up
@Inject
public CloudWatchClient(AWSCredentialsProvider awsCredentialsProvider,
                        AwsConfiguration awsConfiguration,
                        Registry registry) {

    awsCloudWatch = AmazonCloudWatchAsyncClientBuilder.standard().withCredentials(awsCredentialsProvider)
            .withRegion(awsConfiguration.getRegion()).build();

    createAlarmCounter = registry.counter(METRIC_CLOUD_WATCH_CREATE_ALARM);
    deleteAlarmCounter = registry.counter(METRIC_CLOUD_WATCH_DELETE_ALARM);
    deleteErrorCounter = registry.counter(METRIC_CLOUD_WATCH_DELETE_ERROR);
    createErrorCounter = registry.counter(METRIC_CLOUD_WATCH_CREATE_ERROR);
}
 
Example #4
Source File: CloudWatchReporterProvider.java    From graylog-plugin-metrics-reporter with GNU General Public License v3.0 5 votes vote down vote up
@Override
public CloudWatchReporter get() {
	final AmazonCloudWatchAsyncClientBuilder amazonCloudWatchAsyncBuilder = AmazonCloudWatchAsyncClientBuilder.standard();
	return new CloudWatchReporterBuilder()
    			.withClient(amazonCloudWatchAsyncBuilder.withRegion(configuration.getRegion()).build())
                .withNamespace(configuration.getNamespace())
                .withTimestampLocal(configuration.getTimestampLocal())
                .withDimensions(configuration.getDimensions())
                .withFilter(new RegexMetricFilter(configuration.getIncludeMetrics()))
                .withRegistry(metricRegistry)
                .build();
}