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

com.pulumi.alicloud.message.ServiceSubscriptionArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.message;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ServiceSubscriptionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServiceSubscriptionArgs Empty = new ServiceSubscriptionArgs();

    /**
     * The endpoint has three format. Available values format:
     * - `HTTP Format`: http://xxx.com/xxx
     * - `Queue Format`: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
     * - `Email Format`: mail:directmail:{MailAddress}
     * 
     */
    @Import(name="endpoint", required=true)
    private Output endpoint;

    /**
     * @return The endpoint has three format. Available values format:
     * - `HTTP Format`: http://xxx.com/xxx
     * - `Queue Format`: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
     * - `Email Format`: mail:directmail:{MailAddress}
     * 
     */
    public Output endpoint() {
        return this.endpoint;
    }

    /**
     * The tag that is used to filter messages. Only the messages that have the same tag can be pushed. A tag is a string that can be up to 16 characters in length. By default, no tag is specified to filter messages.
     * 
     */
    @Import(name="filterTag")
    private @Nullable Output filterTag;

    /**
     * @return The tag that is used to filter messages. Only the messages that have the same tag can be pushed. A tag is a string that can be up to 16 characters in length. By default, no tag is specified to filter messages.
     * 
     */
    public Optional> filterTag() {
        return Optional.ofNullable(this.filterTag);
    }

    /**
     * The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users. Valid values: `XML`, `JSON` and `SIMPLIFIED`. Default value: `XML`.
     * 
     */
    @Import(name="notifyContentFormat")
    private @Nullable Output notifyContentFormat;

    /**
     * @return The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users. Valid values: `XML`, `JSON` and `SIMPLIFIED`. Default value: `XML`.
     * 
     */
    public Optional> notifyContentFormat() {
        return Optional.ofNullable(this.notifyContentFormat);
    }

    /**
     * The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: `BACKOFF_RETRY`. Valid values:
     * - `BACKOFF_RETRY`: retries with a fixed backoff interval.
     * - `EXPONENTIAL_DECAY_RETRY`: retries with exponential backoff.
     * 
     */
    @Import(name="notifyStrategy")
    private @Nullable Output notifyStrategy;

    /**
     * @return The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: `BACKOFF_RETRY`. Valid values:
     * - `BACKOFF_RETRY`: retries with a fixed backoff interval.
     * - `EXPONENTIAL_DECAY_RETRY`: retries with exponential backoff.
     * 
     */
    public Optional> notifyStrategy() {
        return Optional.ofNullable(this.notifyStrategy);
    }

    /**
     * The Push type of Subscription. The Valid values: `http`, `queue`, `mpush`, `alisms` and `email`.
     * 
     */
    @Import(name="pushType", required=true)
    private Output pushType;

    /**
     * @return The Push type of Subscription. The Valid values: `http`, `queue`, `mpush`, `alisms` and `email`.
     * 
     */
    public Output pushType() {
        return this.pushType;
    }

    /**
     * Two topics subscription on a single account in the same topic cannot have the same name. A topic subscription name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
     * 
     */
    @Import(name="subscriptionName", required=true)
    private Output subscriptionName;

    /**
     * @return Two topics subscription on a single account in the same topic cannot have the same name. A topic subscription name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
     * 
     */
    public Output subscriptionName() {
        return this.subscriptionName;
    }

    /**
     * The topic which The subscription belongs to was named with the name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
     * 
     */
    @Import(name="topicName", required=true)
    private Output topicName;

    /**
     * @return The topic which The subscription belongs to was named with the name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
     * 
     */
    public Output topicName() {
        return this.topicName;
    }

    private ServiceSubscriptionArgs() {}

    private ServiceSubscriptionArgs(ServiceSubscriptionArgs $) {
        this.endpoint = $.endpoint;
        this.filterTag = $.filterTag;
        this.notifyContentFormat = $.notifyContentFormat;
        this.notifyStrategy = $.notifyStrategy;
        this.pushType = $.pushType;
        this.subscriptionName = $.subscriptionName;
        this.topicName = $.topicName;
    }

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

    public static final class Builder {
        private ServiceSubscriptionArgs $;

        public Builder() {
            $ = new ServiceSubscriptionArgs();
        }

        public Builder(ServiceSubscriptionArgs defaults) {
            $ = new ServiceSubscriptionArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param endpoint The endpoint has three format. Available values format:
         * - `HTTP Format`: http://xxx.com/xxx
         * - `Queue Format`: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
         * - `Email Format`: mail:directmail:{MailAddress}
         * 
         * @return builder
         * 
         */
        public Builder endpoint(Output endpoint) {
            $.endpoint = endpoint;
            return this;
        }

        /**
         * @param endpoint The endpoint has three format. Available values format:
         * - `HTTP Format`: http://xxx.com/xxx
         * - `Queue Format`: acs:mns:{REGION}:{AccountID}:queues/{QueueName}
         * - `Email Format`: mail:directmail:{MailAddress}
         * 
         * @return builder
         * 
         */
        public Builder endpoint(String endpoint) {
            return endpoint(Output.of(endpoint));
        }

        /**
         * @param filterTag The tag that is used to filter messages. Only the messages that have the same tag can be pushed. A tag is a string that can be up to 16 characters in length. By default, no tag is specified to filter messages.
         * 
         * @return builder
         * 
         */
        public Builder filterTag(@Nullable Output filterTag) {
            $.filterTag = filterTag;
            return this;
        }

        /**
         * @param filterTag The tag that is used to filter messages. Only the messages that have the same tag can be pushed. A tag is a string that can be up to 16 characters in length. By default, no tag is specified to filter messages.
         * 
         * @return builder
         * 
         */
        public Builder filterTag(String filterTag) {
            return filterTag(Output.of(filterTag));
        }

        /**
         * @param notifyContentFormat The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users. Valid values: `XML`, `JSON` and `SIMPLIFIED`. Default value: `XML`.
         * 
         * @return builder
         * 
         */
        public Builder notifyContentFormat(@Nullable Output notifyContentFormat) {
            $.notifyContentFormat = notifyContentFormat;
            return this;
        }

        /**
         * @param notifyContentFormat The NotifyContentFormat attribute of Subscription. This attribute specifies the content format of the messages pushed to users. Valid values: `XML`, `JSON` and `SIMPLIFIED`. Default value: `XML`.
         * 
         * @return builder
         * 
         */
        public Builder notifyContentFormat(String notifyContentFormat) {
            return notifyContentFormat(Output.of(notifyContentFormat));
        }

        /**
         * @param notifyStrategy The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: `BACKOFF_RETRY`. Valid values:
         * - `BACKOFF_RETRY`: retries with a fixed backoff interval.
         * - `EXPONENTIAL_DECAY_RETRY`: retries with exponential backoff.
         * 
         * @return builder
         * 
         */
        public Builder notifyStrategy(@Nullable Output notifyStrategy) {
            $.notifyStrategy = notifyStrategy;
            return this;
        }

        /**
         * @param notifyStrategy The NotifyStrategy attribute of Subscription. This attribute specifies the retry strategy when message sending fails. Default value: `BACKOFF_RETRY`. Valid values:
         * - `BACKOFF_RETRY`: retries with a fixed backoff interval.
         * - `EXPONENTIAL_DECAY_RETRY`: retries with exponential backoff.
         * 
         * @return builder
         * 
         */
        public Builder notifyStrategy(String notifyStrategy) {
            return notifyStrategy(Output.of(notifyStrategy));
        }

        /**
         * @param pushType The Push type of Subscription. The Valid values: `http`, `queue`, `mpush`, `alisms` and `email`.
         * 
         * @return builder
         * 
         */
        public Builder pushType(Output pushType) {
            $.pushType = pushType;
            return this;
        }

        /**
         * @param pushType The Push type of Subscription. The Valid values: `http`, `queue`, `mpush`, `alisms` and `email`.
         * 
         * @return builder
         * 
         */
        public Builder pushType(String pushType) {
            return pushType(Output.of(pushType));
        }

        /**
         * @param subscriptionName Two topics subscription on a single account in the same topic cannot have the same name. A topic subscription name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionName(Output subscriptionName) {
            $.subscriptionName = subscriptionName;
            return this;
        }

        /**
         * @param subscriptionName Two topics subscription on a single account in the same topic cannot have the same name. A topic subscription name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionName(String subscriptionName) {
            return subscriptionName(Output.of(subscriptionName));
        }

        /**
         * @param topicName The topic which The subscription belongs to was named with the name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
         * 
         * @return builder
         * 
         */
        public Builder topicName(Output topicName) {
            $.topicName = topicName;
            return this;
        }

        /**
         * @param topicName The topic which The subscription belongs to was named with the name. A topic name must start with an English letter or a digit, and can contain English letters, digits, and hyphens, with the length not exceeding 255 characters.
         * 
         * @return builder
         * 
         */
        public Builder topicName(String topicName) {
            return topicName(Output.of(topicName));
        }

        public ServiceSubscriptionArgs build() {
            if ($.endpoint == null) {
                throw new MissingRequiredPropertyException("ServiceSubscriptionArgs", "endpoint");
            }
            if ($.pushType == null) {
                throw new MissingRequiredPropertyException("ServiceSubscriptionArgs", "pushType");
            }
            if ($.subscriptionName == null) {
                throw new MissingRequiredPropertyException("ServiceSubscriptionArgs", "subscriptionName");
            }
            if ($.topicName == null) {
                throw new MissingRequiredPropertyException("ServiceSubscriptionArgs", "topicName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy