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