public abstract static class SnsIO.Write<T> extends PTransform<PCollection<T>,PCollection<PublishResponse>>
SnsIO.write().name, resourceHints| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
PCollection<PublishResponse> |
expand(PCollection<T> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT. |
SnsIO.Write<T> |
withClientConfiguration(ClientConfiguration config)
Configuration of SNS client.
|
SnsIO.Write<T> |
withPublishRequestBuilder(SerializableFunction<T,PublishRequest.Builder> requestBuilder)
Function to convert a message into a
PublishRequest.Builder (mandatory). |
SnsIO.Write<T> |
withPublishRequestFn(SerializableFunction<T,PublishRequest> publishRequestFn)
Deprecated.
Use
withPublishRequestBuilder(SerializableFunction) instead. |
SnsIO.Write<T> |
withTopicArn(java.lang.String topicArn)
SNS topic ARN used for publishing to SNS.
|
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validatepublic SnsIO.Write<T> withTopicArn(java.lang.String topicArn)
The topic ARN is optional. If set, its existence will be validated and the SNS publish request will be configured accordingly.
public SnsIO.Write<T> withPublishRequestBuilder(SerializableFunction<T,PublishRequest.Builder> requestBuilder)
PublishRequest.Builder (mandatory).
If an SNS topic arn is set, it will be automatically set on the PublishRequest.Builder.
@Deprecated public SnsIO.Write<T> withPublishRequestFn(SerializableFunction<T,PublishRequest> publishRequestFn)
withPublishRequestBuilder(SerializableFunction) instead.public SnsIO.Write<T> withClientConfiguration(ClientConfiguration config)
public PCollection<PublishResponse> expand(PCollection<T> input)
PTransformPTransform 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<T>,PCollection<PublishResponse>>