use of software.amazon.awssdk.auth.credentials.AwsCredentialsProvider in project beam by apache.
the class DynamoDBIOReadTest method testBuildWithCredentialsProviderAndRegionAndEndpoint.
@Test
public void testBuildWithCredentialsProviderAndRegionAndEndpoint() {
Region region = Region.US_EAST_1;
AwsCredentialsProvider credentialsProvider = DefaultCredentialsProvider.create();
URI endpoint = URI.create("localhost:9999");
Read<Object> read = DynamoDBIO.read().withDynamoDbClientProvider(credentialsProvider, region.id(), endpoint);
assertThat(read.getClientConfiguration()).isEqualTo(ClientConfiguration.create(credentialsProvider, region, endpoint));
}
use of software.amazon.awssdk.auth.credentials.AwsCredentialsProvider in project beam by apache.
the class DynamoDBIOWriteTest method testBuildWithCredentialsProviderAndRegion.
@Test
public void testBuildWithCredentialsProviderAndRegion() {
Region region = Region.US_EAST_1;
AwsCredentialsProvider credentialsProvider = DefaultCredentialsProvider.create();
Write<Object> write = DynamoDBIO.write().withDynamoDbClientProvider(credentialsProvider, region.id());
assertThat(write.getClientConfiguration()).isEqualTo(ClientConfiguration.create(credentialsProvider, region, null));
}
use of software.amazon.awssdk.auth.credentials.AwsCredentialsProvider in project beam by apache.
the class KinesisIOReadTest method testBuildWithCredentialsProviderAndCustomEndpoint.
@Test
public void testBuildWithCredentialsProviderAndCustomEndpoint() {
String customEndpoint = "localhost:9999";
Region region = Region.US_WEST_1;
AwsCredentialsProvider credentialsProvider = DefaultCredentialsProvider.create();
Read read = KinesisIO.read().withAWSClientsProvider(credentialsProvider, region, customEndpoint);
assertThat(read.getClientConfiguration()).isEqualTo(ClientConfiguration.create(credentialsProvider, region, URI.create(customEndpoint)));
}
use of software.amazon.awssdk.auth.credentials.AwsCredentialsProvider in project flink by apache.
the class GlueSchemaRegistryInputStreamDeserializerTest method testDefaultAwsCredentialsProvider.
@Test
public void testDefaultAwsCredentialsProvider() throws Exception {
GlueSchemaRegistryInputStreamDeserializer glueSchemaRegistryInputStreamDeserializer = new GlueSchemaRegistryInputStreamDeserializer(configs);
GlueSchemaRegistryDeserializationFacade facade = getField("glueSchemaRegistryDeserializationFacade", glueSchemaRegistryInputStreamDeserializer);
AwsCredentialsProvider credentialsProvider = facade.getCredentialsProvider();
assertThat(credentialsProvider).isInstanceOf(DefaultCredentialsProvider.class);
}
use of software.amazon.awssdk.auth.credentials.AwsCredentialsProvider in project flink by apache.
the class GlueSchemaRegistryJsonSchemaCoderTest method testDefaultAwsCredentialsProvider.
@Test
public void testDefaultAwsCredentialsProvider() throws Exception {
GlueSchemaRegistryJsonSchemaCoder coder = new GlueSchemaRegistryJsonSchemaCoder("test", getBaseConfig());
GlueSchemaRegistryDeserializationFacade facade = getField("glueSchemaRegistryDeserializationFacade", coder);
AwsCredentialsProvider credentialsProvider = facade.getCredentialsProvider();
assertThat(credentialsProvider).isInstanceOf(DefaultCredentialsProvider.class);
}
Aggregations