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

com.pulumi.aws.costexplorer.AnomalySubscriptionArgs Maven / Gradle / Ivy

Go to download

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

There is a newer version: 6.60.0-alpha.1731982519
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.aws.costexplorer;

import com.pulumi.aws.costexplorer.inputs.AnomalySubscriptionSubscriberArgs;
import com.pulumi.aws.costexplorer.inputs.AnomalySubscriptionThresholdExpressionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
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 AnomalySubscriptionArgs extends com.pulumi.resources.ResourceArgs {

    public static final AnomalySubscriptionArgs Empty = new AnomalySubscriptionArgs();

    /**
     * The unique identifier for the AWS account in which the anomaly subscription ought to be created.
     * 
     */
    @Import(name="accountId")
    private @Nullable Output accountId;

    /**
     * @return The unique identifier for the AWS account in which the anomaly subscription ought to be created.
     * 
     */
    public Optional> accountId() {
        return Optional.ofNullable(this.accountId);
    }

    /**
     * The frequency that anomaly reports are sent. Valid Values: `DAILY` | `IMMEDIATE` | `WEEKLY`.
     * 
     */
    @Import(name="frequency", required=true)
    private Output frequency;

    /**
     * @return The frequency that anomaly reports are sent. Valid Values: `DAILY` | `IMMEDIATE` | `WEEKLY`.
     * 
     */
    public Output frequency() {
        return this.frequency;
    }

    /**
     * A list of cost anomaly monitors.
     * 
     */
    @Import(name="monitorArnLists", required=true)
    private Output> monitorArnLists;

    /**
     * @return A list of cost anomaly monitors.
     * 
     */
    public Output> monitorArnLists() {
        return this.monitorArnLists;
    }

    /**
     * The name for the subscription.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name for the subscription.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * A subscriber configuration. Multiple subscribers can be defined.
     * 
     */
    @Import(name="subscribers", required=true)
    private Output> subscribers;

    /**
     * @return A subscriber configuration. Multiple subscribers can be defined.
     * 
     */
    public Output> subscribers() {
        return this.subscribers;
    }

    /**
     * A map of 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 A map of 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);
    }

    /**
     * An Expression object used to specify the anomalies that you want to generate alerts for. See Threshold Expression.
     * 
     */
    @Import(name="thresholdExpression")
    private @Nullable Output thresholdExpression;

    /**
     * @return An Expression object used to specify the anomalies that you want to generate alerts for. See Threshold Expression.
     * 
     */
    public Optional> thresholdExpression() {
        return Optional.ofNullable(this.thresholdExpression);
    }

    private AnomalySubscriptionArgs() {}

    private AnomalySubscriptionArgs(AnomalySubscriptionArgs $) {
        this.accountId = $.accountId;
        this.frequency = $.frequency;
        this.monitorArnLists = $.monitorArnLists;
        this.name = $.name;
        this.subscribers = $.subscribers;
        this.tags = $.tags;
        this.thresholdExpression = $.thresholdExpression;
    }

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

    public static final class Builder {
        private AnomalySubscriptionArgs $;

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

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

        /**
         * @param accountId The unique identifier for the AWS account in which the anomaly subscription ought to be created.
         * 
         * @return builder
         * 
         */
        public Builder accountId(@Nullable Output accountId) {
            $.accountId = accountId;
            return this;
        }

        /**
         * @param accountId The unique identifier for the AWS account in which the anomaly subscription ought to be created.
         * 
         * @return builder
         * 
         */
        public Builder accountId(String accountId) {
            return accountId(Output.of(accountId));
        }

        /**
         * @param frequency The frequency that anomaly reports are sent. Valid Values: `DAILY` | `IMMEDIATE` | `WEEKLY`.
         * 
         * @return builder
         * 
         */
        public Builder frequency(Output frequency) {
            $.frequency = frequency;
            return this;
        }

        /**
         * @param frequency The frequency that anomaly reports are sent. Valid Values: `DAILY` | `IMMEDIATE` | `WEEKLY`.
         * 
         * @return builder
         * 
         */
        public Builder frequency(String frequency) {
            return frequency(Output.of(frequency));
        }

        /**
         * @param monitorArnLists A list of cost anomaly monitors.
         * 
         * @return builder
         * 
         */
        public Builder monitorArnLists(Output> monitorArnLists) {
            $.monitorArnLists = monitorArnLists;
            return this;
        }

        /**
         * @param monitorArnLists A list of cost anomaly monitors.
         * 
         * @return builder
         * 
         */
        public Builder monitorArnLists(List monitorArnLists) {
            return monitorArnLists(Output.of(monitorArnLists));
        }

        /**
         * @param monitorArnLists A list of cost anomaly monitors.
         * 
         * @return builder
         * 
         */
        public Builder monitorArnLists(String... monitorArnLists) {
            return monitorArnLists(List.of(monitorArnLists));
        }

        /**
         * @param name The name for the subscription.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name for the subscription.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param subscribers A subscriber configuration. Multiple subscribers can be defined.
         * 
         * @return builder
         * 
         */
        public Builder subscribers(Output> subscribers) {
            $.subscribers = subscribers;
            return this;
        }

        /**
         * @param subscribers A subscriber configuration. Multiple subscribers can be defined.
         * 
         * @return builder
         * 
         */
        public Builder subscribers(List subscribers) {
            return subscribers(Output.of(subscribers));
        }

        /**
         * @param subscribers A subscriber configuration. Multiple subscribers can be defined.
         * 
         * @return builder
         * 
         */
        public Builder subscribers(AnomalySubscriptionSubscriberArgs... subscribers) {
            return subscribers(List.of(subscribers));
        }

        /**
         * @param tags A map of 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 A map of 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));
        }

        /**
         * @param thresholdExpression An Expression object used to specify the anomalies that you want to generate alerts for. See Threshold Expression.
         * 
         * @return builder
         * 
         */
        public Builder thresholdExpression(@Nullable Output thresholdExpression) {
            $.thresholdExpression = thresholdExpression;
            return this;
        }

        /**
         * @param thresholdExpression An Expression object used to specify the anomalies that you want to generate alerts for. See Threshold Expression.
         * 
         * @return builder
         * 
         */
        public Builder thresholdExpression(AnomalySubscriptionThresholdExpressionArgs thresholdExpression) {
            return thresholdExpression(Output.of(thresholdExpression));
        }

        public AnomalySubscriptionArgs build() {
            if ($.frequency == null) {
                throw new MissingRequiredPropertyException("AnomalySubscriptionArgs", "frequency");
            }
            if ($.monitorArnLists == null) {
                throw new MissingRequiredPropertyException("AnomalySubscriptionArgs", "monitorArnLists");
            }
            if ($.subscribers == null) {
                throw new MissingRequiredPropertyException("AnomalySubscriptionArgs", "subscribers");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy