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

com.pulumi.alicloud.waf.ProtectionModuleArgs Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.waf;

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


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

    public static final ProtectionModuleArgs Empty = new ProtectionModuleArgs();

    /**
     * The Protection Module. Valid values: `ac_cc`, `antifraud`, `dld`, `normalized`, `waf`.
     * 
     */
    @Import(name="defenseType", required=true)
    private Output defenseType;

    /**
     * @return The Protection Module. Valid values: `ac_cc`, `antifraud`, `dld`, `normalized`, `waf`.
     * 
     */
    public Output defenseType() {
        return this.defenseType;
    }

    /**
     * The domain name that is added to WAF.
     * 
     */
    @Import(name="domain", required=true)
    private Output domain;

    /**
     * @return The domain name that is added to WAF.
     * 
     */
    public Output domain() {
        return this.domain;
    }

    /**
     * The ID of the WAF instance.
     * 
     */
    @Import(name="instanceId", required=true)
    private Output instanceId;

    /**
     * @return The ID of the WAF instance.
     * 
     */
    public Output instanceId() {
        return this.instanceId;
    }

    /**
     * The protection mode of the specified protection module. **NOTE:** The value of the Mode parameter varies based on the value of the `defense_type` parameter.
     * * The `defense_type` is `waf`. `0`: block mode. `1`: warn mode.
     * * The `defense_type` is `dld`. `0`: warn mode. `1`: block mode.
     * * The `defense_type` is `ac_cc`. `0`: prevention mode. `1`: protection-emergency mode.
     * * The `defense_type` is `antifraud`. `0`: warn mode. `1`: block mode. `2`: strict interception mode.
     * * The `defense_type` is `normalized`. `0`: warn mode. `1`: block mode.
     * 
     */
    @Import(name="mode", required=true)
    private Output mode;

    /**
     * @return The protection mode of the specified protection module. **NOTE:** The value of the Mode parameter varies based on the value of the `defense_type` parameter.
     * * The `defense_type` is `waf`. `0`: block mode. `1`: warn mode.
     * * The `defense_type` is `dld`. `0`: warn mode. `1`: block mode.
     * * The `defense_type` is `ac_cc`. `0`: prevention mode. `1`: protection-emergency mode.
     * * The `defense_type` is `antifraud`. `0`: warn mode. `1`: block mode. `2`: strict interception mode.
     * * The `defense_type` is `normalized`. `0`: warn mode. `1`: block mode.
     * 
     */
    public Output mode() {
        return this.mode;
    }

    /**
     * The status of the resource. Valid values: `0`, `1`.
     * 
     */
    @Import(name="status")
    private @Nullable Output status;

    /**
     * @return The status of the resource. Valid values: `0`, `1`.
     * 
     */
    public Optional> status() {
        return Optional.ofNullable(this.status);
    }

    private ProtectionModuleArgs() {}

    private ProtectionModuleArgs(ProtectionModuleArgs $) {
        this.defenseType = $.defenseType;
        this.domain = $.domain;
        this.instanceId = $.instanceId;
        this.mode = $.mode;
        this.status = $.status;
    }

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

    public static final class Builder {
        private ProtectionModuleArgs $;

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

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

        /**
         * @param defenseType The Protection Module. Valid values: `ac_cc`, `antifraud`, `dld`, `normalized`, `waf`.
         * 
         * @return builder
         * 
         */
        public Builder defenseType(Output defenseType) {
            $.defenseType = defenseType;
            return this;
        }

        /**
         * @param defenseType The Protection Module. Valid values: `ac_cc`, `antifraud`, `dld`, `normalized`, `waf`.
         * 
         * @return builder
         * 
         */
        public Builder defenseType(String defenseType) {
            return defenseType(Output.of(defenseType));
        }

        /**
         * @param domain The domain name that is added to WAF.
         * 
         * @return builder
         * 
         */
        public Builder domain(Output domain) {
            $.domain = domain;
            return this;
        }

        /**
         * @param domain The domain name that is added to WAF.
         * 
         * @return builder
         * 
         */
        public Builder domain(String domain) {
            return domain(Output.of(domain));
        }

        /**
         * @param instanceId The ID of the WAF instance.
         * 
         * @return builder
         * 
         */
        public Builder instanceId(Output instanceId) {
            $.instanceId = instanceId;
            return this;
        }

        /**
         * @param instanceId The ID of the WAF instance.
         * 
         * @return builder
         * 
         */
        public Builder instanceId(String instanceId) {
            return instanceId(Output.of(instanceId));
        }

        /**
         * @param mode The protection mode of the specified protection module. **NOTE:** The value of the Mode parameter varies based on the value of the `defense_type` parameter.
         * * The `defense_type` is `waf`. `0`: block mode. `1`: warn mode.
         * * The `defense_type` is `dld`. `0`: warn mode. `1`: block mode.
         * * The `defense_type` is `ac_cc`. `0`: prevention mode. `1`: protection-emergency mode.
         * * The `defense_type` is `antifraud`. `0`: warn mode. `1`: block mode. `2`: strict interception mode.
         * * The `defense_type` is `normalized`. `0`: warn mode. `1`: block mode.
         * 
         * @return builder
         * 
         */
        public Builder mode(Output mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode The protection mode of the specified protection module. **NOTE:** The value of the Mode parameter varies based on the value of the `defense_type` parameter.
         * * The `defense_type` is `waf`. `0`: block mode. `1`: warn mode.
         * * The `defense_type` is `dld`. `0`: warn mode. `1`: block mode.
         * * The `defense_type` is `ac_cc`. `0`: prevention mode. `1`: protection-emergency mode.
         * * The `defense_type` is `antifraud`. `0`: warn mode. `1`: block mode. `2`: strict interception mode.
         * * The `defense_type` is `normalized`. `0`: warn mode. `1`: block mode.
         * 
         * @return builder
         * 
         */
        public Builder mode(Integer mode) {
            return mode(Output.of(mode));
        }

        /**
         * @param status The status of the resource. Valid values: `0`, `1`.
         * 
         * @return builder
         * 
         */
        public Builder status(@Nullable Output status) {
            $.status = status;
            return this;
        }

        /**
         * @param status The status of the resource. Valid values: `0`, `1`.
         * 
         * @return builder
         * 
         */
        public Builder status(Integer status) {
            return status(Output.of(status));
        }

        public ProtectionModuleArgs build() {
            if ($.defenseType == null) {
                throw new MissingRequiredPropertyException("ProtectionModuleArgs", "defenseType");
            }
            if ($.domain == null) {
                throw new MissingRequiredPropertyException("ProtectionModuleArgs", "domain");
            }
            if ($.instanceId == null) {
                throw new MissingRequiredPropertyException("ProtectionModuleArgs", "instanceId");
            }
            if ($.mode == null) {
                throw new MissingRequiredPropertyException("ProtectionModuleArgs", "mode");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy