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

com.pulumi.aws.iot.inputs.TopicRuleSnsArgs Maven / Gradle / Ivy

// *** 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.aws.iot.inputs;

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 TopicRuleSnsArgs extends com.pulumi.resources.ResourceArgs {

    public static final TopicRuleSnsArgs Empty = new TopicRuleSnsArgs();

    /**
     * The message format of the message to publish. Accepted values are "JSON" and "RAW".
     * 
     */
    @Import(name="messageFormat")
    private @Nullable Output messageFormat;

    /**
     * @return The message format of the message to publish. Accepted values are "JSON" and "RAW".
     * 
     */
    public Optional> messageFormat() {
        return Optional.ofNullable(this.messageFormat);
    }

    /**
     * The ARN of the IAM role that grants access.
     * 
     */
    @Import(name="roleArn", required=true)
    private Output roleArn;

    /**
     * @return The ARN of the IAM role that grants access.
     * 
     */
    public Output roleArn() {
        return this.roleArn;
    }

    /**
     * The ARN of the SNS topic.
     * 
     */
    @Import(name="targetArn", required=true)
    private Output targetArn;

    /**
     * @return The ARN of the SNS topic.
     * 
     */
    public Output targetArn() {
        return this.targetArn;
    }

    private TopicRuleSnsArgs() {}

    private TopicRuleSnsArgs(TopicRuleSnsArgs $) {
        this.messageFormat = $.messageFormat;
        this.roleArn = $.roleArn;
        this.targetArn = $.targetArn;
    }

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

    public static final class Builder {
        private TopicRuleSnsArgs $;

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

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

        /**
         * @param messageFormat The message format of the message to publish. Accepted values are "JSON" and "RAW".
         * 
         * @return builder
         * 
         */
        public Builder messageFormat(@Nullable Output messageFormat) {
            $.messageFormat = messageFormat;
            return this;
        }

        /**
         * @param messageFormat The message format of the message to publish. Accepted values are "JSON" and "RAW".
         * 
         * @return builder
         * 
         */
        public Builder messageFormat(String messageFormat) {
            return messageFormat(Output.of(messageFormat));
        }

        /**
         * @param roleArn The ARN of the IAM role that grants access.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(Output roleArn) {
            $.roleArn = roleArn;
            return this;
        }

        /**
         * @param roleArn The ARN of the IAM role that grants access.
         * 
         * @return builder
         * 
         */
        public Builder roleArn(String roleArn) {
            return roleArn(Output.of(roleArn));
        }

        /**
         * @param targetArn The ARN of the SNS topic.
         * 
         * @return builder
         * 
         */
        public Builder targetArn(Output targetArn) {
            $.targetArn = targetArn;
            return this;
        }

        /**
         * @param targetArn The ARN of the SNS topic.
         * 
         * @return builder
         * 
         */
        public Builder targetArn(String targetArn) {
            return targetArn(Output.of(targetArn));
        }

        public TopicRuleSnsArgs build() {
            if ($.roleArn == null) {
                throw new MissingRequiredPropertyException("TopicRuleSnsArgs", "roleArn");
            }
            if ($.targetArn == null) {
                throw new MissingRequiredPropertyException("TopicRuleSnsArgs", "targetArn");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy