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

com.pulumi.aws.cfg.RuleArgs 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.cfg;

import com.pulumi.aws.cfg.inputs.RuleEvaluationModeArgs;
import com.pulumi.aws.cfg.inputs.RuleScopeArgs;
import com.pulumi.aws.cfg.inputs.RuleSourceArgs;
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 RuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final RuleArgs Empty = new RuleArgs();

    /**
     * Description of the rule
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Description of the rule
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
     * 
     */
    @Import(name="evaluationModes")
    private @Nullable Output> evaluationModes;

    /**
     * @return The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
     * 
     */
    public Optional>> evaluationModes() {
        return Optional.ofNullable(this.evaluationModes);
    }

    /**
     * A string in JSON format that is passed to the AWS Config rule Lambda function.
     * 
     */
    @Import(name="inputParameters")
    private @Nullable Output inputParameters;

    /**
     * @return A string in JSON format that is passed to the AWS Config rule Lambda function.
     * 
     */
    public Optional> inputParameters() {
        return Optional.ofNullable(this.inputParameters);
    }

    /**
     * The maximum frequency with which AWS Config runs evaluations for a rule.
     * 
     */
    @Import(name="maximumExecutionFrequency")
    private @Nullable Output maximumExecutionFrequency;

    /**
     * @return The maximum frequency with which AWS Config runs evaluations for a rule.
     * 
     */
    public Optional> maximumExecutionFrequency() {
        return Optional.ofNullable(this.maximumExecutionFrequency);
    }

    /**
     * The name of the rule
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

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

    /**
     * Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
     * 
     */
    @Import(name="scope")
    private @Nullable Output scope;

    /**
     * @return Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
     * 
     */
    public Optional> scope() {
        return Optional.ofNullable(this.scope);
    }

    /**
     * Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
     * 
     */
    @Import(name="source", required=true)
    private Output source;

    /**
     * @return Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
     * 
     */
    public Output source() {
        return this.source;
    }

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

    private RuleArgs() {}

    private RuleArgs(RuleArgs $) {
        this.description = $.description;
        this.evaluationModes = $.evaluationModes;
        this.inputParameters = $.inputParameters;
        this.maximumExecutionFrequency = $.maximumExecutionFrequency;
        this.name = $.name;
        this.scope = $.scope;
        this.source = $.source;
        this.tags = $.tags;
    }

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

    public static final class Builder {
        private RuleArgs $;

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

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

        /**
         * @param description Description of the rule
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Description of the rule
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param evaluationModes The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
         * 
         * @return builder
         * 
         */
        public Builder evaluationModes(@Nullable Output> evaluationModes) {
            $.evaluationModes = evaluationModes;
            return this;
        }

        /**
         * @param evaluationModes The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
         * 
         * @return builder
         * 
         */
        public Builder evaluationModes(List evaluationModes) {
            return evaluationModes(Output.of(evaluationModes));
        }

        /**
         * @param evaluationModes The modes the Config rule can be evaluated in. See Evaluation Mode for more details.
         * 
         * @return builder
         * 
         */
        public Builder evaluationModes(RuleEvaluationModeArgs... evaluationModes) {
            return evaluationModes(List.of(evaluationModes));
        }

        /**
         * @param inputParameters A string in JSON format that is passed to the AWS Config rule Lambda function.
         * 
         * @return builder
         * 
         */
        public Builder inputParameters(@Nullable Output inputParameters) {
            $.inputParameters = inputParameters;
            return this;
        }

        /**
         * @param inputParameters A string in JSON format that is passed to the AWS Config rule Lambda function.
         * 
         * @return builder
         * 
         */
        public Builder inputParameters(String inputParameters) {
            return inputParameters(Output.of(inputParameters));
        }

        /**
         * @param maximumExecutionFrequency The maximum frequency with which AWS Config runs evaluations for a rule.
         * 
         * @return builder
         * 
         */
        public Builder maximumExecutionFrequency(@Nullable Output maximumExecutionFrequency) {
            $.maximumExecutionFrequency = maximumExecutionFrequency;
            return this;
        }

        /**
         * @param maximumExecutionFrequency The maximum frequency with which AWS Config runs evaluations for a rule.
         * 
         * @return builder
         * 
         */
        public Builder maximumExecutionFrequency(String maximumExecutionFrequency) {
            return maximumExecutionFrequency(Output.of(maximumExecutionFrequency));
        }

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

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

        /**
         * @param scope Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
         * 
         * @return builder
         * 
         */
        public Builder scope(@Nullable Output scope) {
            $.scope = scope;
            return this;
        }

        /**
         * @param scope Scope defines which resources can trigger an evaluation for the rule. See Scope Below.
         * 
         * @return builder
         * 
         */
        public Builder scope(RuleScopeArgs scope) {
            return scope(Output.of(scope));
        }

        /**
         * @param source Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
         * 
         * @return builder
         * 
         */
        public Builder source(Output source) {
            $.source = source;
            return this;
        }

        /**
         * @param source Source specifies the rule owner, the rule identifier, and the notifications that cause the function to evaluate your AWS resources. See Source Below.
         * 
         * @return builder
         * 
         */
        public Builder source(RuleSourceArgs source) {
            return source(Output.of(source));
        }

        /**
         * @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));
        }

        public RuleArgs build() {
            if ($.source == null) {
                throw new MissingRequiredPropertyException("RuleArgs", "source");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy