use of org.apache.beam.sdk.io.aws2.kinesis.KinesisIO.Read 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 org.apache.beam.sdk.io.aws2.kinesis.KinesisIO.Read in project beam by apache.
the class KinesisIOReadTest method testBuildWithBasicCredentialsAndCustomEndpoint.
@Test
public void testBuildWithBasicCredentialsAndCustomEndpoint() {
String customEndpoint = "localhost:9999";
Region region = Region.US_WEST_1;
AwsBasicCredentials credentials = AwsBasicCredentials.create("key", "secret");
StaticCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(credentials);
Read read = KinesisIO.read().withAWSClientsProvider(KEY, SECRET, region, customEndpoint);
assertThat(read.getClientConfiguration()).isEqualTo(ClientConfiguration.create(credentialsProvider, region, URI.create(customEndpoint)));
}
Aggregations