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

com.pulumi.alicloud.alb.inputs.RuleRuleActionArgs 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.alb.inputs;

import com.pulumi.alicloud.alb.inputs.RuleRuleActionCorsConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionFixedResponseConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionForwardGroupConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionInsertHeaderConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionRedirectConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionRemoveHeaderConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionRewriteConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionTrafficLimitConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionTrafficMirrorConfigArgs;
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 RuleRuleActionArgs extends com.pulumi.resources.ResourceArgs {

    public static final RuleRuleActionArgs Empty = new RuleRuleActionArgs();

    /**
     * Request forwarding based on CORS. See `cors_config` below.
     * 
     */
    @Import(name="corsConfig")
    private @Nullable Output corsConfig;

    /**
     * @return Request forwarding based on CORS. See `cors_config` below.
     * 
     */
    public Optional> corsConfig() {
        return Optional.ofNullable(this.corsConfig);
    }

    /**
     * The configuration of the fixed response. See `fixed_response_config` below.
     * 
     */
    @Import(name="fixedResponseConfig")
    private @Nullable Output fixedResponseConfig;

    /**
     * @return The configuration of the fixed response. See `fixed_response_config` below.
     * 
     */
    public Optional> fixedResponseConfig() {
        return Optional.ofNullable(this.fixedResponseConfig);
    }

    /**
     * The forward response action within ALB. See `forward_group_config` below.
     * 
     */
    @Import(name="forwardGroupConfig")
    private @Nullable Output forwardGroupConfig;

    /**
     * @return The forward response action within ALB. See `forward_group_config` below.
     * 
     */
    public Optional> forwardGroupConfig() {
        return Optional.ofNullable(this.forwardGroupConfig);
    }

    /**
     * The configuration of the inserted header field. See `insert_header_config` below.
     * 
     */
    @Import(name="insertHeaderConfig")
    private @Nullable Output insertHeaderConfig;

    /**
     * @return The configuration of the inserted header field. See `insert_header_config` below.
     * 
     */
    public Optional> insertHeaderConfig() {
        return Optional.ofNullable(this.insertHeaderConfig);
    }

    /**
     * The order of the forwarding rule actions. Valid values: `1` to `50000`. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
     * 
     */
    @Import(name="order", required=true)
    private Output order;

    /**
     * @return The order of the forwarding rule actions. Valid values: `1` to `50000`. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
     * 
     */
    public Output order() {
        return this.order;
    }

    /**
     * The configuration of the external redirect action. See `redirect_config` below.
     * 
     */
    @Import(name="redirectConfig")
    private @Nullable Output redirectConfig;

    /**
     * @return The configuration of the external redirect action. See `redirect_config` below.
     * 
     */
    public Optional> redirectConfig() {
        return Optional.ofNullable(this.redirectConfig);
    }

    /**
     * The configuration of the inserted header field. See `remove_header_config` below.
     * 
     */
    @Import(name="removeHeaderConfig")
    private @Nullable Output removeHeaderConfig;

    /**
     * @return The configuration of the inserted header field. See `remove_header_config` below.
     * 
     */
    public Optional> removeHeaderConfig() {
        return Optional.ofNullable(this.removeHeaderConfig);
    }

    /**
     * The redirect action within ALB. See `rewrite_config` below.
     * 
     */
    @Import(name="rewriteConfig")
    private @Nullable Output rewriteConfig;

    /**
     * @return The redirect action within ALB. See `rewrite_config` below.
     * 
     */
    public Optional> rewriteConfig() {
        return Optional.ofNullable(this.rewriteConfig);
    }

    /**
     * The Flow speed limit. See `traffic_limit_config` below.
     * 
     */
    @Import(name="trafficLimitConfig")
    private @Nullable Output trafficLimitConfig;

    /**
     * @return The Flow speed limit. See `traffic_limit_config` below.
     * 
     */
    public Optional> trafficLimitConfig() {
        return Optional.ofNullable(this.trafficLimitConfig);
    }

    /**
     * The Traffic mirroring. See `traffic_mirror_config` below.
     * 
     */
    @Import(name="trafficMirrorConfig")
    private @Nullable Output trafficMirrorConfig;

    /**
     * @return The Traffic mirroring. See `traffic_mirror_config` below.
     * 
     */
    public Optional> trafficMirrorConfig() {
        return Optional.ofNullable(this.trafficMirrorConfig);
    }

    /**
     * The action type. Valid values: `ForwardGroup`, `Redirect`, `FixedResponse`, `Rewrite`, `InsertHeader`, `RemoveHeader`, `TrafficLimit`, `TrafficMirror` and `Cors`.
     * **Note:** The preceding actions can be classified into two types:  `FinalType`: A forwarding rule can contain only one `FinalType` action, which is executed last. This type of action can contain only one `ForwardGroup`, `Redirect` or `FixedResponse` action. `ExtType`: A forwarding rule can contain one or more `ExtType` actions, which are executed before `FinalType` actions and need to coexist with the `FinalType` actions. This type of action can contain multiple `InsertHeader` actions or one `Rewrite` action.
     * **NOTE:** The `TrafficLimit` and `TrafficMirror` option is available since 1.162.0.
     * **NOTE:** From version 1.205.0, `type` can be set to `Cors`.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The action type. Valid values: `ForwardGroup`, `Redirect`, `FixedResponse`, `Rewrite`, `InsertHeader`, `RemoveHeader`, `TrafficLimit`, `TrafficMirror` and `Cors`.
     * **Note:** The preceding actions can be classified into two types:  `FinalType`: A forwarding rule can contain only one `FinalType` action, which is executed last. This type of action can contain only one `ForwardGroup`, `Redirect` or `FixedResponse` action. `ExtType`: A forwarding rule can contain one or more `ExtType` actions, which are executed before `FinalType` actions and need to coexist with the `FinalType` actions. This type of action can contain multiple `InsertHeader` actions or one `Rewrite` action.
     * **NOTE:** The `TrafficLimit` and `TrafficMirror` option is available since 1.162.0.
     * **NOTE:** From version 1.205.0, `type` can be set to `Cors`.
     * 
     */
    public Output type() {
        return this.type;
    }

    private RuleRuleActionArgs() {}

    private RuleRuleActionArgs(RuleRuleActionArgs $) {
        this.corsConfig = $.corsConfig;
        this.fixedResponseConfig = $.fixedResponseConfig;
        this.forwardGroupConfig = $.forwardGroupConfig;
        this.insertHeaderConfig = $.insertHeaderConfig;
        this.order = $.order;
        this.redirectConfig = $.redirectConfig;
        this.removeHeaderConfig = $.removeHeaderConfig;
        this.rewriteConfig = $.rewriteConfig;
        this.trafficLimitConfig = $.trafficLimitConfig;
        this.trafficMirrorConfig = $.trafficMirrorConfig;
        this.type = $.type;
    }

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

    public static final class Builder {
        private RuleRuleActionArgs $;

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

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

        /**
         * @param corsConfig Request forwarding based on CORS. See `cors_config` below.
         * 
         * @return builder
         * 
         */
        public Builder corsConfig(@Nullable Output corsConfig) {
            $.corsConfig = corsConfig;
            return this;
        }

        /**
         * @param corsConfig Request forwarding based on CORS. See `cors_config` below.
         * 
         * @return builder
         * 
         */
        public Builder corsConfig(RuleRuleActionCorsConfigArgs corsConfig) {
            return corsConfig(Output.of(corsConfig));
        }

        /**
         * @param fixedResponseConfig The configuration of the fixed response. See `fixed_response_config` below.
         * 
         * @return builder
         * 
         */
        public Builder fixedResponseConfig(@Nullable Output fixedResponseConfig) {
            $.fixedResponseConfig = fixedResponseConfig;
            return this;
        }

        /**
         * @param fixedResponseConfig The configuration of the fixed response. See `fixed_response_config` below.
         * 
         * @return builder
         * 
         */
        public Builder fixedResponseConfig(RuleRuleActionFixedResponseConfigArgs fixedResponseConfig) {
            return fixedResponseConfig(Output.of(fixedResponseConfig));
        }

        /**
         * @param forwardGroupConfig The forward response action within ALB. See `forward_group_config` below.
         * 
         * @return builder
         * 
         */
        public Builder forwardGroupConfig(@Nullable Output forwardGroupConfig) {
            $.forwardGroupConfig = forwardGroupConfig;
            return this;
        }

        /**
         * @param forwardGroupConfig The forward response action within ALB. See `forward_group_config` below.
         * 
         * @return builder
         * 
         */
        public Builder forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs forwardGroupConfig) {
            return forwardGroupConfig(Output.of(forwardGroupConfig));
        }

        /**
         * @param insertHeaderConfig The configuration of the inserted header field. See `insert_header_config` below.
         * 
         * @return builder
         * 
         */
        public Builder insertHeaderConfig(@Nullable Output insertHeaderConfig) {
            $.insertHeaderConfig = insertHeaderConfig;
            return this;
        }

        /**
         * @param insertHeaderConfig The configuration of the inserted header field. See `insert_header_config` below.
         * 
         * @return builder
         * 
         */
        public Builder insertHeaderConfig(RuleRuleActionInsertHeaderConfigArgs insertHeaderConfig) {
            return insertHeaderConfig(Output.of(insertHeaderConfig));
        }

        /**
         * @param order The order of the forwarding rule actions. Valid values: `1` to `50000`. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
         * 
         * @return builder
         * 
         */
        public Builder order(Output order) {
            $.order = order;
            return this;
        }

        /**
         * @param order The order of the forwarding rule actions. Valid values: `1` to `50000`. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
         * 
         * @return builder
         * 
         */
        public Builder order(Integer order) {
            return order(Output.of(order));
        }

        /**
         * @param redirectConfig The configuration of the external redirect action. See `redirect_config` below.
         * 
         * @return builder
         * 
         */
        public Builder redirectConfig(@Nullable Output redirectConfig) {
            $.redirectConfig = redirectConfig;
            return this;
        }

        /**
         * @param redirectConfig The configuration of the external redirect action. See `redirect_config` below.
         * 
         * @return builder
         * 
         */
        public Builder redirectConfig(RuleRuleActionRedirectConfigArgs redirectConfig) {
            return redirectConfig(Output.of(redirectConfig));
        }

        /**
         * @param removeHeaderConfig The configuration of the inserted header field. See `remove_header_config` below.
         * 
         * @return builder
         * 
         */
        public Builder removeHeaderConfig(@Nullable Output removeHeaderConfig) {
            $.removeHeaderConfig = removeHeaderConfig;
            return this;
        }

        /**
         * @param removeHeaderConfig The configuration of the inserted header field. See `remove_header_config` below.
         * 
         * @return builder
         * 
         */
        public Builder removeHeaderConfig(RuleRuleActionRemoveHeaderConfigArgs removeHeaderConfig) {
            return removeHeaderConfig(Output.of(removeHeaderConfig));
        }

        /**
         * @param rewriteConfig The redirect action within ALB. See `rewrite_config` below.
         * 
         * @return builder
         * 
         */
        public Builder rewriteConfig(@Nullable Output rewriteConfig) {
            $.rewriteConfig = rewriteConfig;
            return this;
        }

        /**
         * @param rewriteConfig The redirect action within ALB. See `rewrite_config` below.
         * 
         * @return builder
         * 
         */
        public Builder rewriteConfig(RuleRuleActionRewriteConfigArgs rewriteConfig) {
            return rewriteConfig(Output.of(rewriteConfig));
        }

        /**
         * @param trafficLimitConfig The Flow speed limit. See `traffic_limit_config` below.
         * 
         * @return builder
         * 
         */
        public Builder trafficLimitConfig(@Nullable Output trafficLimitConfig) {
            $.trafficLimitConfig = trafficLimitConfig;
            return this;
        }

        /**
         * @param trafficLimitConfig The Flow speed limit. See `traffic_limit_config` below.
         * 
         * @return builder
         * 
         */
        public Builder trafficLimitConfig(RuleRuleActionTrafficLimitConfigArgs trafficLimitConfig) {
            return trafficLimitConfig(Output.of(trafficLimitConfig));
        }

        /**
         * @param trafficMirrorConfig The Traffic mirroring. See `traffic_mirror_config` below.
         * 
         * @return builder
         * 
         */
        public Builder trafficMirrorConfig(@Nullable Output trafficMirrorConfig) {
            $.trafficMirrorConfig = trafficMirrorConfig;
            return this;
        }

        /**
         * @param trafficMirrorConfig The Traffic mirroring. See `traffic_mirror_config` below.
         * 
         * @return builder
         * 
         */
        public Builder trafficMirrorConfig(RuleRuleActionTrafficMirrorConfigArgs trafficMirrorConfig) {
            return trafficMirrorConfig(Output.of(trafficMirrorConfig));
        }

        /**
         * @param type The action type. Valid values: `ForwardGroup`, `Redirect`, `FixedResponse`, `Rewrite`, `InsertHeader`, `RemoveHeader`, `TrafficLimit`, `TrafficMirror` and `Cors`.
         * **Note:** The preceding actions can be classified into two types:  `FinalType`: A forwarding rule can contain only one `FinalType` action, which is executed last. This type of action can contain only one `ForwardGroup`, `Redirect` or `FixedResponse` action. `ExtType`: A forwarding rule can contain one or more `ExtType` actions, which are executed before `FinalType` actions and need to coexist with the `FinalType` actions. This type of action can contain multiple `InsertHeader` actions or one `Rewrite` action.
         * **NOTE:** The `TrafficLimit` and `TrafficMirror` option is available since 1.162.0.
         * **NOTE:** From version 1.205.0, `type` can be set to `Cors`.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The action type. Valid values: `ForwardGroup`, `Redirect`, `FixedResponse`, `Rewrite`, `InsertHeader`, `RemoveHeader`, `TrafficLimit`, `TrafficMirror` and `Cors`.
         * **Note:** The preceding actions can be classified into two types:  `FinalType`: A forwarding rule can contain only one `FinalType` action, which is executed last. This type of action can contain only one `ForwardGroup`, `Redirect` or `FixedResponse` action. `ExtType`: A forwarding rule can contain one or more `ExtType` actions, which are executed before `FinalType` actions and need to coexist with the `FinalType` actions. This type of action can contain multiple `InsertHeader` actions or one `Rewrite` action.
         * **NOTE:** The `TrafficLimit` and `TrafficMirror` option is available since 1.162.0.
         * **NOTE:** From version 1.205.0, `type` can be set to `Cors`.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public RuleRuleActionArgs build() {
            if ($.order == null) {
                throw new MissingRequiredPropertyException("RuleRuleActionArgs", "order");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("RuleRuleActionArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy