public abstract static class SnsIO.Write
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<com.amazonaws.services.sns.model.PublishRequest>,org.apache.beam.sdk.values.PCollectionTuple>
SnsIO.write().| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollectionTuple |
expand(org.apache.beam.sdk.values.PCollection<com.amazonaws.services.sns.model.PublishRequest> input) |
SnsIO.Write |
withAWSClientsProvider(AwsClientsProvider awsClientsProvider)
Allows to specify custom
AwsClientsProvider. |
SnsIO.Write |
withAWSClientsProvider(java.lang.String awsAccessKey,
java.lang.String awsSecretKey,
com.amazonaws.regions.Regions region)
Specify credential details and region to be used to write to SNS.
|
SnsIO.Write |
withAWSClientsProvider(java.lang.String awsAccessKey,
java.lang.String awsSecretKey,
com.amazonaws.regions.Regions region,
java.lang.String serviceEndpoint)
Specify credential details and region to be used to write to SNS.
|
SnsIO.Write |
withCoder(org.apache.beam.sdk.coders.Coder<com.amazonaws.services.sns.model.PublishResult> coder)
Encode the
PublishResult with the given coder. |
SnsIO.Write |
withFullPublishResult()
Encode the full
PublishResult object, including sdkResponseMetadata and
sdkHttpMetadata with the HTTP response headers. |
SnsIO.Write |
withFullPublishResultWithoutHeaders()
Encode the full
PublishResult object, including sdkResponseMetadata and
sdkHttpMetadata but excluding the HTTP response headers. |
SnsIO.Write |
withResultOutputTag(org.apache.beam.sdk.values.TupleTag<com.amazonaws.services.sns.model.PublishResult> results)
Tuple tag to store results.
|
SnsIO.Write |
withRetryConfiguration(SnsIO.RetryConfiguration retryConfiguration)
Provides configuration to retry a failed request to publish a message to SNS.
|
SnsIO.Write |
withTopicName(java.lang.String topicName)
Specify the SNS topic which will be used for writing, this name is mandatory.
|
public SnsIO.Write withTopicName(java.lang.String topicName)
topicName - topicNamepublic SnsIO.Write withAWSClientsProvider(AwsClientsProvider awsClientsProvider)
AwsClientsProvider. AwsClientsProvider creates new
AmazonSNS which is later used for writing to a SNS topic.public SnsIO.Write withAWSClientsProvider(java.lang.String awsAccessKey, java.lang.String awsSecretKey, com.amazonaws.regions.Regions region)
withAWSClientsProvider(AwsClientsProvider).public SnsIO.Write withAWSClientsProvider(java.lang.String awsAccessKey, java.lang.String awsSecretKey, com.amazonaws.regions.Regions region, java.lang.String serviceEndpoint)
withAWSClientsProvider(AwsClientsProvider).
The serviceEndpoint sets an alternative service host. This is useful to execute
the tests with Kinesis service emulator.
public SnsIO.Write withRetryConfiguration(SnsIO.RetryConfiguration retryConfiguration)
Example use:
SnsIO.write()
.withRetryConfiguration(SnsIO.RetryConfiguration.create(5, Duration.standardMinutes(1))
...
retryConfiguration - the rules which govern the retry behaviorSnsIO.Write with retrying configuredpublic SnsIO.Write withResultOutputTag(org.apache.beam.sdk.values.TupleTag<com.amazonaws.services.sns.model.PublishResult> results)
public SnsIO.Write withFullPublishResult()
PublishResult object, including sdkResponseMetadata and
sdkHttpMetadata with the HTTP response headers.public SnsIO.Write withFullPublishResultWithoutHeaders()
PublishResult object, including sdkResponseMetadata and
sdkHttpMetadata but excluding the HTTP response headers.public SnsIO.Write withCoder(org.apache.beam.sdk.coders.Coder<com.amazonaws.services.sns.model.PublishResult> coder)
PublishResult with the given coder.public org.apache.beam.sdk.values.PCollectionTuple expand(org.apache.beam.sdk.values.PCollection<com.amazonaws.services.sns.model.PublishRequest> input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<com.amazonaws.services.sns.model.PublishRequest>,org.apache.beam.sdk.values.PCollectionTuple>