All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.awsconnector.outputs.AwsSnsTopicPropertiesResponse Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.awsconnector.outputs;

import com.pulumi.azurenative.awsconnector.outputs.LoggingConfigResponse;
import com.pulumi.azurenative.awsconnector.outputs.SubscriptionResponse;
import com.pulumi.azurenative.awsconnector.outputs.TagResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class AwsSnsTopicPropertiesResponse {
    /**
     * @return The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.
     * 
     */
    private @Nullable Object archivePolicy;
    /**
     * @return Enables content-based deduplication for FIFO topics.  +  By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.   +  When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action.
     * 
     */
    private @Nullable Boolean contentBasedDeduplication;
    /**
     * @return The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.
     * 
     */
    private @Nullable Object dataProtectionPolicy;
    /**
     * @return Property deliveryStatusLogging
     * 
     */
    private @Nullable List deliveryStatusLogging;
    /**
     * @return The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
     * 
     */
    private @Nullable String displayName;
    /**
     * @return Set to true to create a FIFO topic.
     * 
     */
    private @Nullable Boolean fifoTopic;
    /**
     * @return The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*. This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html).
     * 
     */
    private @Nullable String kmsMasterKeyId;
    /**
     * @return The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``.
     * 
     */
    private @Nullable String signatureVersion;
    /**
     * @return The SNS subscriptions (endpoints) for this topic.  If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted.
     * 
     */
    private @Nullable List subscription;
    /**
     * @return The list of tags to add to a new topic.  To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions.
     * 
     */
    private @Nullable List tags;
    /**
     * @return Property topicArn
     * 
     */
    private @Nullable String topicArn;
    /**
     * @return The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).  If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
     * 
     */
    private @Nullable String topicName;
    /**
     * @return Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
     * 
     */
    private @Nullable String tracingConfig;

    private AwsSnsTopicPropertiesResponse() {}
    /**
     * @return The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.
     * 
     */
    public Optional archivePolicy() {
        return Optional.ofNullable(this.archivePolicy);
    }
    /**
     * @return Enables content-based deduplication for FIFO topics.  +  By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action.   +  When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message). (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action.
     * 
     */
    public Optional contentBasedDeduplication() {
        return Optional.ofNullable(this.contentBasedDeduplication);
    }
    /**
     * @return The body of the policy document you want to use for this topic. You can only add one policy per topic. The policy must be in JSON string format. Length Constraints: Maximum length of 30,720.
     * 
     */
    public Optional dataProtectionPolicy() {
        return Optional.ofNullable(this.dataProtectionPolicy);
    }
    /**
     * @return Property deliveryStatusLogging
     * 
     */
    public List deliveryStatusLogging() {
        return this.deliveryStatusLogging == null ? List.of() : this.deliveryStatusLogging;
    }
    /**
     * @return The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.
     * 
     */
    public Optional displayName() {
        return Optional.ofNullable(this.displayName);
    }
    /**
     * @return Set to true to create a FIFO topic.
     * 
     */
    public Optional fifoTopic() {
        return Optional.ofNullable(this.fifoTopic);
    }
    /**
     * @return The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*. This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html).
     * 
     */
    public Optional kmsMasterKeyId() {
        return Optional.ofNullable(this.kmsMasterKeyId);
    }
    /**
     * @return The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``.
     * 
     */
    public Optional signatureVersion() {
        return Optional.ofNullable(this.signatureVersion);
    }
    /**
     * @return The SNS subscriptions (endpoints) for this topic.  If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted.
     * 
     */
    public List subscription() {
        return this.subscription == null ? List.of() : this.subscription;
    }
    /**
     * @return The list of tags to add to a new topic.  To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions.
     * 
     */
    public List tags() {
        return this.tags == null ? List.of() : this.tags;
    }
    /**
     * @return Property topicArn
     * 
     */
    public Optional topicArn() {
        return Optional.ofNullable(this.topicArn);
    }
    /**
     * @return The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).  If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
     * 
     */
    public Optional topicName() {
        return Optional.ofNullable(this.topicName);
    }
    /**
     * @return Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.
     * 
     */
    public Optional tracingConfig() {
        return Optional.ofNullable(this.tracingConfig);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(AwsSnsTopicPropertiesResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Object archivePolicy;
        private @Nullable Boolean contentBasedDeduplication;
        private @Nullable Object dataProtectionPolicy;
        private @Nullable List deliveryStatusLogging;
        private @Nullable String displayName;
        private @Nullable Boolean fifoTopic;
        private @Nullable String kmsMasterKeyId;
        private @Nullable String signatureVersion;
        private @Nullable List subscription;
        private @Nullable List tags;
        private @Nullable String topicArn;
        private @Nullable String topicName;
        private @Nullable String tracingConfig;
        public Builder() {}
        public Builder(AwsSnsTopicPropertiesResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.archivePolicy = defaults.archivePolicy;
    	      this.contentBasedDeduplication = defaults.contentBasedDeduplication;
    	      this.dataProtectionPolicy = defaults.dataProtectionPolicy;
    	      this.deliveryStatusLogging = defaults.deliveryStatusLogging;
    	      this.displayName = defaults.displayName;
    	      this.fifoTopic = defaults.fifoTopic;
    	      this.kmsMasterKeyId = defaults.kmsMasterKeyId;
    	      this.signatureVersion = defaults.signatureVersion;
    	      this.subscription = defaults.subscription;
    	      this.tags = defaults.tags;
    	      this.topicArn = defaults.topicArn;
    	      this.topicName = defaults.topicName;
    	      this.tracingConfig = defaults.tracingConfig;
        }

        @CustomType.Setter
        public Builder archivePolicy(@Nullable Object archivePolicy) {

            this.archivePolicy = archivePolicy;
            return this;
        }
        @CustomType.Setter
        public Builder contentBasedDeduplication(@Nullable Boolean contentBasedDeduplication) {

            this.contentBasedDeduplication = contentBasedDeduplication;
            return this;
        }
        @CustomType.Setter
        public Builder dataProtectionPolicy(@Nullable Object dataProtectionPolicy) {

            this.dataProtectionPolicy = dataProtectionPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder deliveryStatusLogging(@Nullable List deliveryStatusLogging) {

            this.deliveryStatusLogging = deliveryStatusLogging;
            return this;
        }
        public Builder deliveryStatusLogging(LoggingConfigResponse... deliveryStatusLogging) {
            return deliveryStatusLogging(List.of(deliveryStatusLogging));
        }
        @CustomType.Setter
        public Builder displayName(@Nullable String displayName) {

            this.displayName = displayName;
            return this;
        }
        @CustomType.Setter
        public Builder fifoTopic(@Nullable Boolean fifoTopic) {

            this.fifoTopic = fifoTopic;
            return this;
        }
        @CustomType.Setter
        public Builder kmsMasterKeyId(@Nullable String kmsMasterKeyId) {

            this.kmsMasterKeyId = kmsMasterKeyId;
            return this;
        }
        @CustomType.Setter
        public Builder signatureVersion(@Nullable String signatureVersion) {

            this.signatureVersion = signatureVersion;
            return this;
        }
        @CustomType.Setter
        public Builder subscription(@Nullable List subscription) {

            this.subscription = subscription;
            return this;
        }
        public Builder subscription(SubscriptionResponse... subscription) {
            return subscription(List.of(subscription));
        }
        @CustomType.Setter
        public Builder tags(@Nullable List tags) {

            this.tags = tags;
            return this;
        }
        public Builder tags(TagResponse... tags) {
            return tags(List.of(tags));
        }
        @CustomType.Setter
        public Builder topicArn(@Nullable String topicArn) {

            this.topicArn = topicArn;
            return this;
        }
        @CustomType.Setter
        public Builder topicName(@Nullable String topicName) {

            this.topicName = topicName;
            return this;
        }
        @CustomType.Setter
        public Builder tracingConfig(@Nullable String tracingConfig) {

            this.tracingConfig = tracingConfig;
            return this;
        }
        public AwsSnsTopicPropertiesResponse build() {
            final var _resultValue = new AwsSnsTopicPropertiesResponse();
            _resultValue.archivePolicy = archivePolicy;
            _resultValue.contentBasedDeduplication = contentBasedDeduplication;
            _resultValue.dataProtectionPolicy = dataProtectionPolicy;
            _resultValue.deliveryStatusLogging = deliveryStatusLogging;
            _resultValue.displayName = displayName;
            _resultValue.fifoTopic = fifoTopic;
            _resultValue.kmsMasterKeyId = kmsMasterKeyId;
            _resultValue.signatureVersion = signatureVersion;
            _resultValue.subscription = subscription;
            _resultValue.tags = tags;
            _resultValue.topicArn = topicArn;
            _resultValue.topicName = topicName;
            _resultValue.tracingConfig = tracingConfig;
            return _resultValue;
        }
    }
}