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

com.pulumi.aws.dms.EventSubscriptionArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The 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.aws.dms;

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


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

    public static final EventSubscriptionArgs Empty = new EventSubscriptionArgs();

    /**
     * Whether the event subscription should be enabled.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Whether the event subscription should be enabled.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * List of event categories to listen for, see `DescribeEventCategories` for a canonical list.
     * 
     */
    @Import(name="eventCategories", required=true)
    private Output> eventCategories;

    /**
     * @return List of event categories to listen for, see `DescribeEventCategories` for a canonical list.
     * 
     */
    public Output> eventCategories() {
        return this.eventCategories;
    }

    /**
     * Name of event subscription.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of event subscription.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * SNS topic arn to send events on.
     * 
     */
    @Import(name="snsTopicArn", required=true)
    private Output snsTopicArn;

    /**
     * @return SNS topic arn to send events on.
     * 
     */
    public Output snsTopicArn() {
        return this.snsTopicArn;
    }

    /**
     * Ids of sources to listen to. If you don't specify a value, notifications are provided for all sources.
     * 
     */
    @Import(name="sourceIds")
    private @Nullable Output> sourceIds;

    /**
     * @return Ids of sources to listen to. If you don't specify a value, notifications are provided for all sources.
     * 
     */
    public Optional>> sourceIds() {
        return Optional.ofNullable(this.sourceIds);
    }

    /**
     * Type of source for events. Valid values: `replication-instance` or `replication-task`
     * 
     */
    @Import(name="sourceType", required=true)
    private Output sourceType;

    /**
     * @return Type of source for events. Valid values: `replication-instance` or `replication-task`
     * 
     */
    public Output sourceType() {
        return this.sourceType;
    }

    /**
     * Map of resource tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Map of resource tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(this.tags);
    }

    private EventSubscriptionArgs() {}

    private EventSubscriptionArgs(EventSubscriptionArgs $) {
        this.enabled = $.enabled;
        this.eventCategories = $.eventCategories;
        this.name = $.name;
        this.snsTopicArn = $.snsTopicArn;
        this.sourceIds = $.sourceIds;
        this.sourceType = $.sourceType;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private EventSubscriptionArgs $;

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

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

        /**
         * @param enabled Whether the event subscription should be enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Whether the event subscription should be enabled.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param eventCategories List of event categories to listen for, see `DescribeEventCategories` for a canonical list.
         * 
         * @return builder
         * 
         */
        public Builder eventCategories(Output> eventCategories) {
            $.eventCategories = eventCategories;
            return this;
        }

        /**
         * @param eventCategories List of event categories to listen for, see `DescribeEventCategories` for a canonical list.
         * 
         * @return builder
         * 
         */
        public Builder eventCategories(List eventCategories) {
            return eventCategories(Output.of(eventCategories));
        }

        /**
         * @param eventCategories List of event categories to listen for, see `DescribeEventCategories` for a canonical list.
         * 
         * @return builder
         * 
         */
        public Builder eventCategories(String... eventCategories) {
            return eventCategories(List.of(eventCategories));
        }

        /**
         * @param name Name of event subscription.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of event subscription.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param snsTopicArn SNS topic arn to send events on.
         * 
         * @return builder
         * 
         */
        public Builder snsTopicArn(Output snsTopicArn) {
            $.snsTopicArn = snsTopicArn;
            return this;
        }

        /**
         * @param snsTopicArn SNS topic arn to send events on.
         * 
         * @return builder
         * 
         */
        public Builder snsTopicArn(String snsTopicArn) {
            return snsTopicArn(Output.of(snsTopicArn));
        }

        /**
         * @param sourceIds Ids of sources to listen to. If you don't specify a value, notifications are provided for all sources.
         * 
         * @return builder
         * 
         */
        public Builder sourceIds(@Nullable Output> sourceIds) {
            $.sourceIds = sourceIds;
            return this;
        }

        /**
         * @param sourceIds Ids of sources to listen to. If you don't specify a value, notifications are provided for all sources.
         * 
         * @return builder
         * 
         */
        public Builder sourceIds(List sourceIds) {
            return sourceIds(Output.of(sourceIds));
        }

        /**
         * @param sourceIds Ids of sources to listen to. If you don't specify a value, notifications are provided for all sources.
         * 
         * @return builder
         * 
         */
        public Builder sourceIds(String... sourceIds) {
            return sourceIds(List.of(sourceIds));
        }

        /**
         * @param sourceType Type of source for events. Valid values: `replication-instance` or `replication-task`
         * 
         * @return builder
         * 
         */
        public Builder sourceType(Output sourceType) {
            $.sourceType = sourceType;
            return this;
        }

        /**
         * @param sourceType Type of source for events. Valid values: `replication-instance` or `replication-task`
         * 
         * @return builder
         * 
         */
        public Builder sourceType(String sourceType) {
            return sourceType(Output.of(sourceType));
        }

        /**
         * @param tags Map of resource tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Map of resource tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        public EventSubscriptionArgs build() {
            if ($.eventCategories == null) {
                throw new MissingRequiredPropertyException("EventSubscriptionArgs", "eventCategories");
            }
            if ($.snsTopicArn == null) {
                throw new MissingRequiredPropertyException("EventSubscriptionArgs", "snsTopicArn");
            }
            if ($.sourceType == null) {
                throw new MissingRequiredPropertyException("EventSubscriptionArgs", "sourceType");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy