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

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

import com.pulumi.aws.wafregional.inputs.RulePredicateArgs;
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();

    /**
     * The name or description for the Amazon CloudWatch metric of this rule.
     * 
     */
    @Import(name="metricName", required=true)
    private Output metricName;

    /**
     * @return The name or description for the Amazon CloudWatch metric of this rule.
     * 
     */
    public Output metricName() {
        return this.metricName;
    }

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

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

    /**
     * The objects to include in a rule (documented below).
     * 
     */
    @Import(name="predicates")
    private @Nullable Output> predicates;

    /**
     * @return The objects to include in a rule (documented below).
     * 
     */
    public Optional>> predicates() {
        return Optional.ofNullable(this.predicates);
    }

    /**
     * Key-value map of resource tags. .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 Key-value map of resource tags. .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.metricName = $.metricName;
        this.name = $.name;
        this.predicates = $.predicates;
        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 metricName The name or description for the Amazon CloudWatch metric of this rule.
         * 
         * @return builder
         * 
         */
        public Builder metricName(Output metricName) {
            $.metricName = metricName;
            return this;
        }

        /**
         * @param metricName The name or description for the Amazon CloudWatch metric of this rule.
         * 
         * @return builder
         * 
         */
        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

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

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

        /**
         * @param predicates The objects to include in a rule (documented below).
         * 
         * @return builder
         * 
         */
        public Builder predicates(@Nullable Output> predicates) {
            $.predicates = predicates;
            return this;
        }

        /**
         * @param predicates The objects to include in a rule (documented below).
         * 
         * @return builder
         * 
         */
        public Builder predicates(List predicates) {
            return predicates(Output.of(predicates));
        }

        /**
         * @param predicates The objects to include in a rule (documented below).
         * 
         * @return builder
         * 
         */
        public Builder predicates(RulePredicateArgs... predicates) {
            return predicates(List.of(predicates));
        }

        /**
         * @param tags Key-value map of resource tags. .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 Key-value map of resource tags. .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 ($.metricName == null) {
                throw new MissingRequiredPropertyException("RuleArgs", "metricName");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy