use of org.apache.beam.sdk.io.kinesis.KinesisIO.Write in project beam by apache.
the class KinesisIOWriteTest method testReadWithCredentialsProvider.
@Test
public void testReadWithCredentialsProvider() {
Regions region = Regions.US_EAST_1;
AWSCredentialsProvider credentialsProvider = DefaultAWSCredentialsProviderChain.getInstance();
Write write = KinesisIO.write().withAWSClientsProvider(credentialsProvider, region);
assertEquals(write.getAWSClientsProvider(), new BasicKinesisProvider(credentialsProvider, region, null, true));
}
use of org.apache.beam.sdk.io.kinesis.KinesisIO.Write in project beam by apache.
the class KinesisIOWriteTest method testReadWithBasicCredentialsAndCustomEndpoint.
@Test
public void testReadWithBasicCredentialsAndCustomEndpoint() {
String customEndpoint = "localhost:9999";
Regions region = Regions.US_WEST_1;
BasicAWSCredentials credentials = new BasicAWSCredentials(ACCESS_KEY_ID, SECRET_KEY);
Write write = KinesisIO.write().withAWSClientsProvider(ACCESS_KEY_ID, SECRET_KEY, region, customEndpoint);
assertEquals(write.getAWSClientsProvider(), new BasicKinesisProvider(new AWSStaticCredentialsProvider(credentials), region, customEndpoint, true));
}
use of org.apache.beam.sdk.io.kinesis.KinesisIO.Write in project beam by apache.
the class KinesisIOWriteTest method testReadWithBasicCredentialsAndVerificationDisabled.
@Test
public void testReadWithBasicCredentialsAndVerificationDisabled() {
String customEndpoint = "localhost:9999";
Regions region = Regions.US_WEST_1;
BasicAWSCredentials credentials = new BasicAWSCredentials(ACCESS_KEY_ID, SECRET_KEY);
Write write = KinesisIO.write().withAWSClientsProvider(ACCESS_KEY_ID, SECRET_KEY, region, customEndpoint, VERIFICATION_DISABLED);
assertEquals(write.getAWSClientsProvider(), new BasicKinesisProvider(new AWSStaticCredentialsProvider(credentials), region, customEndpoint, VERIFICATION_DISABLED));
}
use of org.apache.beam.sdk.io.kinesis.KinesisIO.Write in project beam by apache.
the class KinesisIOWriteTest method testReadWithCredentialsProviderAndVerificationDisabled.
@Test
public void testReadWithCredentialsProviderAndVerificationDisabled() {
String customEndpoint = "localhost:9999";
Regions region = Regions.US_WEST_1;
AWSCredentialsProvider credentialsProvider = DefaultAWSCredentialsProviderChain.getInstance();
Write write = KinesisIO.write().withAWSClientsProvider(credentialsProvider, region, customEndpoint, VERIFICATION_DISABLED);
assertEquals(write.getAWSClientsProvider(), new BasicKinesisProvider(credentialsProvider, region, customEndpoint, VERIFICATION_DISABLED));
}
use of org.apache.beam.sdk.io.kinesis.KinesisIO.Write in project beam by apache.
the class KinesisIOWriteTest method testReadWithBasicCredentials.
@Test
public void testReadWithBasicCredentials() {
Regions region = Regions.US_EAST_1;
Write write = KinesisIO.write().withAWSClientsProvider(ACCESS_KEY_ID, SECRET_KEY, region);
assertEquals(write.getAWSClientsProvider(), new BasicKinesisProvider(new AWSStaticCredentialsProvider(new BasicAWSCredentials(ACCESS_KEY_ID, SECRET_KEY)), region, null, true));
}
Aggregations