Class SnsIO.Write<T>

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData
    Enclosing class:
    SnsIO

    public abstract static class SnsIO.Write<T>
    extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,​org.apache.beam.sdk.values.PCollection<software.amazon.awssdk.services.sns.model.PublishResponse>>
    Implementation of SnsIO.write().
    See Also:
    Serialized Form
    • Constructor Detail

      • Write

        public Write()
    • Method Detail

      • withTopicArn

        public SnsIO.Write<T> withTopicArn​(java.lang.String topicArn)
        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​(org.apache.beam.sdk.transforms.SerializableFunction<T,​software.amazon.awssdk.services.sns.model.PublishRequest.Builder> requestBuilder)
        Function to convert a message into a PublishRequest.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​(org.apache.beam.sdk.transforms.SerializableFunction<T,​software.amazon.awssdk.services.sns.model.PublishRequest> publishRequestFn)
        Specify a function for converting a message into PublishRequest object.
      • withSnsClientProvider

        @Deprecated
        public SnsIO.Write<T> withSnsClientProvider​(software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentials,
                                                    java.lang.String region,
                                                    java.net.URI endpoint)
      • withFullPublishResponse

        @Deprecated
        public SnsIO.Write<T> withFullPublishResponse()
        Deprecated.
        Writes fail exceptionally in case of errors, there is no need to check headers.
        Encode the full PublishResponse object, including sdkResponseMetadata and sdkHttpMetadata with the HTTP response headers.
      • withFullPublishResponseWithoutHeaders

        @Deprecated
        public SnsIO.Write<T> withFullPublishResponseWithoutHeaders()
        Deprecated.
        Writes fail exceptionally in case of errors, there is no need to check headers.
        Encode the full PublishResponse object, including sdkResponseMetadata and sdkHttpMetadata but excluding the HTTP response headers.
      • withCoder

        @Deprecated
        public SnsIO.Write<T> withCoder​(org.apache.beam.sdk.coders.Coder<software.amazon.awssdk.services.sns.model.PublishResponse> coder)
        Deprecated.
        Explicit usage of coders is deprecated. Inferred schemas provided by AwsSchemaProvider will be used instead.
        Encode the PublishResponse with the given coder.
      • expand

        public org.apache.beam.sdk.values.PCollection<software.amazon.awssdk.services.sns.model.PublishResponse> expand​(org.apache.beam.sdk.values.PCollection<T> input)
        Specified by:
        expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,​org.apache.beam.sdk.values.PCollection<software.amazon.awssdk.services.sns.model.PublishResponse>>