Package org.apache.beam.sdk.io.aws2.sns
Class SnsIO.Write<T>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<T>,PCollection<PublishResponse>>
org.apache.beam.sdk.io.aws2.sns.SnsIO.Write<T>
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
SnsIO
public abstract static class SnsIO.Write<T>
extends PTransform<PCollection<T>,PCollection<PublishResponse>>
Implementation of
SnsIO.write()
.- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand
(PCollection<T> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.Configuration of SNS client.withPublishRequestBuilder
(SerializableFunction<T, PublishRequest.Builder> requestBuilder) Function to convert a message into aPublishRequest.Builder
(mandatory).withPublishRequestFn
(SerializableFunction<T, PublishRequest> publishRequestFn) Deprecated.withTopicArn
(String topicArn) SNS topic ARN used for publishing to SNS.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
Write
public Write()
-
-
Method Details
-
withTopicArn
SNS topic ARN used for publishing to SNS.The topic ARN is optional. If set, its existence will be validated and the SNS publish request will be configured accordingly.
-
withPublishRequestBuilder
public SnsIO.Write<T> withPublishRequestBuilder(SerializableFunction<T, PublishRequest.Builder> requestBuilder) Function to convert a message into aPublishRequest.Builder
(mandatory).If an SNS topic arn is set, it will be automatically set on the
PublishRequest.Builder
. -
withPublishRequestFn
@Deprecated public SnsIO.Write<T> withPublishRequestFn(SerializableFunction<T, PublishRequest> publishRequestFn) Deprecated.UsewithPublishRequestBuilder(SerializableFunction)
instead.Specify a function for converting a message into PublishRequest object. -
withClientConfiguration
Configuration of SNS client. -
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
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).
- Specified by:
expand
in classPTransform<PCollection<T>,
PCollection<PublishResponse>>
-
withPublishRequestBuilder(SerializableFunction)
instead.