public abstract static class SnsIO.Write extends PTransform<PCollection<com.amazonaws.services.sns.model.PublishRequest>,PCollectionTuple>
SnsIO.write()
.name
Constructor and Description |
---|
Write() |
Modifier and Type | Method and Description |
---|---|
PCollectionTuple |
expand(PCollection<com.amazonaws.services.sns.model.PublishRequest> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
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 |
withResultOutputTag(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.
|
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate
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(TupleTag<com.amazonaws.services.sns.model.PublishResult> results)
public PCollectionTuple expand(PCollection<com.amazonaws.services.sns.model.PublishRequest> input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PCollection<com.amazonaws.services.sns.model.PublishRequest>,PCollectionTuple>