Search in sources :

Example 1 with AWSSimpleSystemsManagementClientBuilder

use of com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClientBuilder in project spring-cloud-config by spring-cloud.

the class AwsParameterStoreEnvironmentRepositoryFactory method build.

@Override
public AwsParameterStoreEnvironmentRepository build(AwsParameterStoreEnvironmentProperties environmentProperties) {
    AWSSimpleSystemsManagementClientBuilder clientBuilder = AWSSimpleSystemsManagementClientBuilder.standard();
    configureClientBuilder(clientBuilder, environmentProperties.getRegion(), environmentProperties.getEndpoint());
    AWSSimpleSystemsManagement client = clientBuilder.build();
    return new AwsParameterStoreEnvironmentRepository(client, configServerProperties, environmentProperties);
}
Also used : AWSSimpleSystemsManagementClientBuilder(com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClientBuilder) AWSSimpleSystemsManagement(com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement)

Example 2 with AWSSimpleSystemsManagementClientBuilder

use of com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClientBuilder in project spring-cloud-aws by awspring.

the class AwsParamStoreBootstrapConfiguration method createSimpleSystemManagementClient.

public static AWSSimpleSystemsManagement createSimpleSystemManagementClient(AwsParamStoreProperties properties) {
    AWSSimpleSystemsManagementClientBuilder builder = AWSSimpleSystemsManagementClientBuilder.standard().withClientConfiguration(SpringCloudClientConfiguration.getClientConfiguration());
    if (!StringUtils.isNullOrEmpty(properties.getRegion())) {
        builder.withRegion(properties.getRegion());
    }
    if (properties.getEndpoint() != null) {
        AwsClientBuilder.EndpointConfiguration endpointConfiguration = new AwsClientBuilder.EndpointConfiguration(properties.getEndpoint().toString(), null);
        builder.withEndpointConfiguration(endpointConfiguration);
    }
    return builder.build();
}
Also used : AwsClientBuilder(com.amazonaws.client.builder.AwsClientBuilder) AWSSimpleSystemsManagementClientBuilder(com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClientBuilder)

Aggregations

AWSSimpleSystemsManagementClientBuilder (com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClientBuilder)2 AwsClientBuilder (com.amazonaws.client.builder.AwsClientBuilder)1 AWSSimpleSystemsManagement (com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement)1