alicloud.alb.Rule
Provides a Application Load Balancer (ALB) Rule resource.
For information about Application Load Balancer (ALB) Rule and how to use it, see What is Rule.
NOTE: Available since v1.133.0.
NOTE: This version only supports forwarding rules in the request direction.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as std from "@pulumi/std";
const config = new pulumi.Config();
const name = config.get("name") || "tf_example";
const _default = alicloud.alb.getZones({});
const defaultGetResourceGroups = alicloud.resourcemanager.getResourceGroups({});
const defaultNetwork = new alicloud.vpc.Network("default", {
    vpcName: name,
    cidrBlock: "10.4.0.0/16",
});
const defaultSwitch: alicloud.vpc.Switch[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
    defaultSwitch.push(new alicloud.vpc.Switch(`default-${range.value}`, {
        vpcId: defaultNetwork.id,
        cidrBlock: std.format({
            input: "10.4.%d.0/24",
            args: [range.value + 1],
        }).then(invoke => invoke.result),
        zoneId: _default.then(_default => _default.zones[range.value].id),
        vswitchName: std.format({
            input: `${name}_%d`,
            args: [range.value + 1],
        }).then(invoke => invoke.result),
    }));
}
const defaultLoadBalancer = new alicloud.alb.LoadBalancer("default", {
    vpcId: defaultNetwork.id,
    addressType: "Internet",
    addressAllocatedMode: "Fixed",
    loadBalancerName: name,
    loadBalancerEdition: "Standard",
    resourceGroupId: defaultGetResourceGroups.then(defaultGetResourceGroups => defaultGetResourceGroups.groups?.[0]?.id),
    loadBalancerBillingConfig: {
        payType: "PayAsYouGo",
    },
    tags: {
        Created: "TF",
    },
    zoneMappings: [
        {
            vswitchId: defaultSwitch[0].id,
            zoneId: _default.then(_default => _default.zones?.[0]?.id),
        },
        {
            vswitchId: defaultSwitch[1].id,
            zoneId: _default.then(_default => _default.zones?.[1]?.id),
        },
    ],
});
const defaultServerGroup = new alicloud.alb.ServerGroup("default", {
    protocol: "HTTP",
    vpcId: defaultNetwork.id,
    serverGroupName: name,
    resourceGroupId: defaultGetResourceGroups.then(defaultGetResourceGroups => defaultGetResourceGroups.groups?.[0]?.id),
    healthCheckConfig: {
        healthCheckEnabled: false,
    },
    stickySessionConfig: {
        stickySessionEnabled: false,
    },
    tags: {
        Created: "TF",
    },
});
const defaultListener = new alicloud.alb.Listener("default", {
    loadBalancerId: defaultLoadBalancer.id,
    listenerProtocol: "HTTP",
    listenerPort: 80,
    listenerDescription: name,
    defaultActions: [{
        type: "ForwardGroup",
        forwardGroupConfig: {
            serverGroupTuples: [{
                serverGroupId: defaultServerGroup.id,
            }],
        },
    }],
});
const defaultRule = new alicloud.alb.Rule("default", {
    ruleName: name,
    listenerId: defaultListener.id,
    priority: 555,
    ruleConditions: [{
        cookieConfig: {
            values: [{
                key: "created",
                value: "tf",
            }],
        },
        type: "Cookie",
    }],
    ruleActions: [{
        forwardGroupConfig: {
            serverGroupTuples: [{
                serverGroupId: defaultServerGroup.id,
            }],
        },
        order: 9,
        type: "ForwardGroup",
    }],
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_std as std
config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf_example"
default = alicloud.alb.get_zones()
default_get_resource_groups = alicloud.resourcemanager.get_resource_groups()
default_network = alicloud.vpc.Network("default",
    vpc_name=name,
    cidr_block="10.4.0.0/16")
default_switch = []
for range in [{"value": i} for i in range(0, 2)]:
    default_switch.append(alicloud.vpc.Switch(f"default-{range['value']}",
        vpc_id=default_network.id,
        cidr_block=std.format(input="10.4.%d.0/24",
            args=[range["value"] + 1]).result,
        zone_id=default.zones[range["value"]].id,
        vswitch_name=std.format(input=f"{name}_%d",
            args=[range["value"] + 1]).result))
default_load_balancer = alicloud.alb.LoadBalancer("default",
    vpc_id=default_network.id,
    address_type="Internet",
    address_allocated_mode="Fixed",
    load_balancer_name=name,
    load_balancer_edition="Standard",
    resource_group_id=default_get_resource_groups.groups[0].id,
    load_balancer_billing_config={
        "pay_type": "PayAsYouGo",
    },
    tags={
        "Created": "TF",
    },
    zone_mappings=[
        {
            "vswitch_id": default_switch[0].id,
            "zone_id": default.zones[0].id,
        },
        {
            "vswitch_id": default_switch[1].id,
            "zone_id": default.zones[1].id,
        },
    ])
default_server_group = alicloud.alb.ServerGroup("default",
    protocol="HTTP",
    vpc_id=default_network.id,
    server_group_name=name,
    resource_group_id=default_get_resource_groups.groups[0].id,
    health_check_config={
        "health_check_enabled": False,
    },
    sticky_session_config={
        "sticky_session_enabled": False,
    },
    tags={
        "Created": "TF",
    })
default_listener = alicloud.alb.Listener("default",
    load_balancer_id=default_load_balancer.id,
    listener_protocol="HTTP",
    listener_port=80,
    listener_description=name,
    default_actions=[{
        "type": "ForwardGroup",
        "forward_group_config": {
            "server_group_tuples": [{
                "server_group_id": default_server_group.id,
            }],
        },
    }])
default_rule = alicloud.alb.Rule("default",
    rule_name=name,
    listener_id=default_listener.id,
    priority=555,
    rule_conditions=[{
        "cookie_config": {
            "values": [{
                "key": "created",
                "value": "tf",
            }],
        },
        "type": "Cookie",
    }],
    rule_actions=[{
        "forward_group_config": {
            "server_group_tuples": [{
                "server_group_id": default_server_group.id,
            }],
        },
        "order": 9,
        "type": "ForwardGroup",
    }])
package main
import (
	"fmt"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tf_example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_default, err := alb.GetZones(ctx, &alb.GetZonesArgs{}, nil)
		if err != nil {
			return err
		}
		defaultGetResourceGroups, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{}, nil)
		if err != nil {
			return err
		}
		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
			VpcName:   pulumi.String(name),
			CidrBlock: pulumi.String("10.4.0.0/16"),
		})
		if err != nil {
			return err
		}
		invokeFormat, err := std.Format(ctx, &std.FormatArgs{
			Input: "10.4.%d.0/24",
			Args: []float64{
				val0 + 1,
			},
		}, nil)
		if err != nil {
			return err
		}
		invokeFormat1, err := std.Format(ctx, &std.FormatArgs{
			Input: fmt.Sprintf("%v%v", name, "_%d"),
			Args: []float64{
				val0 + 1,
			},
		}, nil)
		if err != nil {
			return err
		}
		var defaultSwitch []*vpc.Switch
		for index := 0; index < 2; index++ {
			key0 := index
			val0 := index
			__res, err := vpc.NewSwitch(ctx, fmt.Sprintf("default-%v", key0), &vpc.SwitchArgs{
				VpcId:       defaultNetwork.ID(),
				CidrBlock:   pulumi.String(invokeFormat.Result),
				ZoneId:      _default.Zones[val0].Id,
				VswitchName: pulumi.String(invokeFormat1.Result),
			})
			if err != nil {
				return err
			}
			defaultSwitch = append(defaultSwitch, __res)
		}
		defaultLoadBalancer, err := alb.NewLoadBalancer(ctx, "default", &alb.LoadBalancerArgs{
			VpcId:                defaultNetwork.ID(),
			AddressType:          pulumi.String("Internet"),
			AddressAllocatedMode: pulumi.String("Fixed"),
			LoadBalancerName:     pulumi.String(name),
			LoadBalancerEdition:  pulumi.String("Standard"),
			ResourceGroupId:      pulumi.String(defaultGetResourceGroups.Groups[0].Id),
			LoadBalancerBillingConfig: &alb.LoadBalancerLoadBalancerBillingConfigArgs{
				PayType: pulumi.String("PayAsYouGo"),
			},
			Tags: pulumi.StringMap{
				"Created": pulumi.String("TF"),
			},
			ZoneMappings: alb.LoadBalancerZoneMappingArray{
				&alb.LoadBalancerZoneMappingArgs{
					VswitchId: defaultSwitch[0].ID(),
					ZoneId:    pulumi.String(_default.Zones[0].Id),
				},
				&alb.LoadBalancerZoneMappingArgs{
					VswitchId: defaultSwitch[1].ID(),
					ZoneId:    pulumi.String(_default.Zones[1].Id),
				},
			},
		})
		if err != nil {
			return err
		}
		defaultServerGroup, err := alb.NewServerGroup(ctx, "default", &alb.ServerGroupArgs{
			Protocol:        pulumi.String("HTTP"),
			VpcId:           defaultNetwork.ID(),
			ServerGroupName: pulumi.String(name),
			ResourceGroupId: pulumi.String(defaultGetResourceGroups.Groups[0].Id),
			HealthCheckConfig: &alb.ServerGroupHealthCheckConfigArgs{
				HealthCheckEnabled: pulumi.Bool(false),
			},
			StickySessionConfig: &alb.ServerGroupStickySessionConfigArgs{
				StickySessionEnabled: pulumi.Bool(false),
			},
			Tags: pulumi.StringMap{
				"Created": pulumi.String("TF"),
			},
		})
		if err != nil {
			return err
		}
		defaultListener, err := alb.NewListener(ctx, "default", &alb.ListenerArgs{
			LoadBalancerId:      defaultLoadBalancer.ID(),
			ListenerProtocol:    pulumi.String("HTTP"),
			ListenerPort:        pulumi.Int(80),
			ListenerDescription: pulumi.String(name),
			DefaultActions: alb.ListenerDefaultActionArray{
				&alb.ListenerDefaultActionArgs{
					Type: pulumi.String("ForwardGroup"),
					ForwardGroupConfig: &alb.ListenerDefaultActionForwardGroupConfigArgs{
						ServerGroupTuples: alb.ListenerDefaultActionForwardGroupConfigServerGroupTupleArray{
							&alb.ListenerDefaultActionForwardGroupConfigServerGroupTupleArgs{
								ServerGroupId: defaultServerGroup.ID(),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = alb.NewRule(ctx, "default", &alb.RuleArgs{
			RuleName:   pulumi.String(name),
			ListenerId: defaultListener.ID(),
			Priority:   pulumi.Int(555),
			RuleConditions: alb.RuleRuleConditionArray{
				&alb.RuleRuleConditionArgs{
					CookieConfig: &alb.RuleRuleConditionCookieConfigArgs{
						Values: alb.RuleRuleConditionCookieConfigValueArray{
							&alb.RuleRuleConditionCookieConfigValueArgs{
								Key:   pulumi.String("created"),
								Value: pulumi.String("tf"),
							},
						},
					},
					Type: pulumi.String("Cookie"),
				},
			},
			RuleActions: alb.RuleRuleActionArray{
				&alb.RuleRuleActionArgs{
					ForwardGroupConfig: &alb.RuleRuleActionForwardGroupConfigArgs{
						ServerGroupTuples: alb.RuleRuleActionForwardGroupConfigServerGroupTupleArray{
							&alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs{
								ServerGroupId: defaultServerGroup.ID(),
							},
						},
					},
					Order: pulumi.Int(9),
					Type:  pulumi.String("ForwardGroup"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "tf_example";
    var @default = AliCloud.Alb.GetZones.Invoke();
    var defaultGetResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    var defaultNetwork = new AliCloud.Vpc.Network("default", new()
    {
        VpcName = name,
        CidrBlock = "10.4.0.0/16",
    });
    var defaultSwitch = new List<AliCloud.Vpc.Switch>();
    for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
    {
        var range = new { Value = rangeIndex };
        defaultSwitch.Add(new AliCloud.Vpc.Switch($"default-{range.Value}", new()
        {
            VpcId = defaultNetwork.Id,
            CidrBlock = Std.Format.Invoke(new()
            {
                Input = "10.4.%d.0/24",
                Args = new[]
                {
                    range.Value + 1,
                },
            }).Apply(invoke => invoke.Result),
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones)[range.Value].Id),
            VswitchName = Std.Format.Invoke(new()
            {
                Input = $"{name}_%d",
                Args = new[]
                {
                    range.Value + 1,
                },
            }).Apply(invoke => invoke.Result),
        }));
    }
    var defaultLoadBalancer = new AliCloud.Alb.LoadBalancer("default", new()
    {
        VpcId = defaultNetwork.Id,
        AddressType = "Internet",
        AddressAllocatedMode = "Fixed",
        LoadBalancerName = name,
        LoadBalancerEdition = "Standard",
        ResourceGroupId = defaultGetResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
        LoadBalancerBillingConfig = new AliCloud.Alb.Inputs.LoadBalancerLoadBalancerBillingConfigArgs
        {
            PayType = "PayAsYouGo",
        },
        Tags = 
        {
            { "Created", "TF" },
        },
        ZoneMappings = new[]
        {
            new AliCloud.Alb.Inputs.LoadBalancerZoneMappingArgs
            {
                VswitchId = defaultSwitch[0].Id,
                ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            },
            new AliCloud.Alb.Inputs.LoadBalancerZoneMappingArgs
            {
                VswitchId = defaultSwitch[1].Id,
                ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[1]?.Id)),
            },
        },
    });
    var defaultServerGroup = new AliCloud.Alb.ServerGroup("default", new()
    {
        Protocol = "HTTP",
        VpcId = defaultNetwork.Id,
        ServerGroupName = name,
        ResourceGroupId = defaultGetResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
        HealthCheckConfig = new AliCloud.Alb.Inputs.ServerGroupHealthCheckConfigArgs
        {
            HealthCheckEnabled = false,
        },
        StickySessionConfig = new AliCloud.Alb.Inputs.ServerGroupStickySessionConfigArgs
        {
            StickySessionEnabled = false,
        },
        Tags = 
        {
            { "Created", "TF" },
        },
    });
    var defaultListener = new AliCloud.Alb.Listener("default", new()
    {
        LoadBalancerId = defaultLoadBalancer.Id,
        ListenerProtocol = "HTTP",
        ListenerPort = 80,
        ListenerDescription = name,
        DefaultActions = new[]
        {
            new AliCloud.Alb.Inputs.ListenerDefaultActionArgs
            {
                Type = "ForwardGroup",
                ForwardGroupConfig = new AliCloud.Alb.Inputs.ListenerDefaultActionForwardGroupConfigArgs
                {
                    ServerGroupTuples = new[]
                    {
                        new AliCloud.Alb.Inputs.ListenerDefaultActionForwardGroupConfigServerGroupTupleArgs
                        {
                            ServerGroupId = defaultServerGroup.Id,
                        },
                    },
                },
            },
        },
    });
    var defaultRule = new AliCloud.Alb.Rule("default", new()
    {
        RuleName = name,
        ListenerId = defaultListener.Id,
        Priority = 555,
        RuleConditions = new[]
        {
            new AliCloud.Alb.Inputs.RuleRuleConditionArgs
            {
                CookieConfig = new AliCloud.Alb.Inputs.RuleRuleConditionCookieConfigArgs
                {
                    Values = new[]
                    {
                        new AliCloud.Alb.Inputs.RuleRuleConditionCookieConfigValueArgs
                        {
                            Key = "created",
                            Value = "tf",
                        },
                    },
                },
                Type = "Cookie",
            },
        },
        RuleActions = new[]
        {
            new AliCloud.Alb.Inputs.RuleRuleActionArgs
            {
                ForwardGroupConfig = new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigArgs
                {
                    ServerGroupTuples = new[]
                    {
                        new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupTupleArgs
                        {
                            ServerGroupId = defaultServerGroup.Id,
                        },
                    },
                },
                Order = 9,
                Type = "ForwardGroup",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.alb.AlbFunctions;
import com.pulumi.alicloud.alb.inputs.GetZonesArgs;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FormatArgs;
import com.pulumi.alicloud.alb.LoadBalancer;
import com.pulumi.alicloud.alb.LoadBalancerArgs;
import com.pulumi.alicloud.alb.inputs.LoadBalancerLoadBalancerBillingConfigArgs;
import com.pulumi.alicloud.alb.inputs.LoadBalancerZoneMappingArgs;
import com.pulumi.alicloud.alb.ServerGroup;
import com.pulumi.alicloud.alb.ServerGroupArgs;
import com.pulumi.alicloud.alb.inputs.ServerGroupHealthCheckConfigArgs;
import com.pulumi.alicloud.alb.inputs.ServerGroupStickySessionConfigArgs;
import com.pulumi.alicloud.alb.Listener;
import com.pulumi.alicloud.alb.ListenerArgs;
import com.pulumi.alicloud.alb.inputs.ListenerDefaultActionArgs;
import com.pulumi.alicloud.alb.inputs.ListenerDefaultActionForwardGroupConfigArgs;
import com.pulumi.alicloud.alb.Rule;
import com.pulumi.alicloud.alb.RuleArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleConditionArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleConditionCookieConfigArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionArgs;
import com.pulumi.alicloud.alb.inputs.RuleRuleActionForwardGroupConfigArgs;
import com.pulumi.codegen.internal.KeyedValue;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("tf_example");
        final var default = AlbFunctions.getZones(GetZonesArgs.builder()
            .build());
        final var defaultGetResourceGroups = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
            .build());
        var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .vpcName(name)
            .cidrBlock("10.4.0.0/16")
            .build());
        for (var i = 0; i < 2; i++) {
            new Switch("defaultSwitch-" + i, SwitchArgs.builder()
                .vpcId(defaultNetwork.id())
                .cidrBlock(StdFunctions.format(FormatArgs.builder()
                    .input("10.4.%d.0/24")
                    .args(range.value() + 1)
                    .build()).result())
                .zoneId(default_.zones()[range.value()].id())
                .vswitchName(StdFunctions.format(FormatArgs.builder()
                    .input(String.format("%s_%d", name))
                    .args(range.value() + 1)
                    .build()).result())
                .build());
        
}
        var defaultLoadBalancer = new LoadBalancer("defaultLoadBalancer", LoadBalancerArgs.builder()
            .vpcId(defaultNetwork.id())
            .addressType("Internet")
            .addressAllocatedMode("Fixed")
            .loadBalancerName(name)
            .loadBalancerEdition("Standard")
            .resourceGroupId(defaultGetResourceGroups.groups()[0].id())
            .loadBalancerBillingConfig(LoadBalancerLoadBalancerBillingConfigArgs.builder()
                .payType("PayAsYouGo")
                .build())
            .tags(Map.of("Created", "TF"))
            .zoneMappings(            
                LoadBalancerZoneMappingArgs.builder()
                    .vswitchId(defaultSwitch[0].id())
                    .zoneId(default_.zones()[0].id())
                    .build(),
                LoadBalancerZoneMappingArgs.builder()
                    .vswitchId(defaultSwitch[1].id())
                    .zoneId(default_.zones()[1].id())
                    .build())
            .build());
        var defaultServerGroup = new ServerGroup("defaultServerGroup", ServerGroupArgs.builder()
            .protocol("HTTP")
            .vpcId(defaultNetwork.id())
            .serverGroupName(name)
            .resourceGroupId(defaultGetResourceGroups.groups()[0].id())
            .healthCheckConfig(ServerGroupHealthCheckConfigArgs.builder()
                .healthCheckEnabled(false)
                .build())
            .stickySessionConfig(ServerGroupStickySessionConfigArgs.builder()
                .stickySessionEnabled(false)
                .build())
            .tags(Map.of("Created", "TF"))
            .build());
        var defaultListener = new Listener("defaultListener", ListenerArgs.builder()
            .loadBalancerId(defaultLoadBalancer.id())
            .listenerProtocol("HTTP")
            .listenerPort(80)
            .listenerDescription(name)
            .defaultActions(ListenerDefaultActionArgs.builder()
                .type("ForwardGroup")
                .forwardGroupConfig(ListenerDefaultActionForwardGroupConfigArgs.builder()
                    .serverGroupTuples(ListenerDefaultActionForwardGroupConfigServerGroupTupleArgs.builder()
                        .serverGroupId(defaultServerGroup.id())
                        .build())
                    .build())
                .build())
            .build());
        var defaultRule = new Rule("defaultRule", RuleArgs.builder()
            .ruleName(name)
            .listenerId(defaultListener.id())
            .priority(555)
            .ruleConditions(RuleRuleConditionArgs.builder()
                .cookieConfig(RuleRuleConditionCookieConfigArgs.builder()
                    .values(RuleRuleConditionCookieConfigValueArgs.builder()
                        .key("created")
                        .value("tf")
                        .build())
                    .build())
                .type("Cookie")
                .build())
            .ruleActions(RuleRuleActionArgs.builder()
                .forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs.builder()
                    .serverGroupTuples(RuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
                        .serverGroupId(defaultServerGroup.id())
                        .build())
                    .build())
                .order(9)
                .type("ForwardGroup")
                .build())
            .build());
    }
}
Example coming soon!
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);@overload
def Rule(resource_name: str,
         args: RuleArgs,
         opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         listener_id: Optional[str] = None,
         priority: Optional[int] = None,
         rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
         rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
         rule_name: Optional[str] = None,
         direction: Optional[str] = None,
         dry_run: Optional[bool] = None)func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)type: alicloud:alb:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var ruleResource = new AliCloud.Alb.Rule("ruleResource", new()
{
    ListenerId = "string",
    Priority = 0,
    RuleActions = new[]
    {
        new AliCloud.Alb.Inputs.RuleRuleActionArgs
        {
            Order = 0,
            Type = "string",
            CorsConfig = new AliCloud.Alb.Inputs.RuleRuleActionCorsConfigArgs
            {
                AllowCredentials = "string",
                AllowHeaders = new[]
                {
                    "string",
                },
                AllowMethods = new[]
                {
                    "string",
                },
                AllowOrigins = new[]
                {
                    "string",
                },
                ExposeHeaders = new[]
                {
                    "string",
                },
                MaxAge = 0,
            },
            FixedResponseConfig = new AliCloud.Alb.Inputs.RuleRuleActionFixedResponseConfigArgs
            {
                Content = "string",
                ContentType = "string",
                HttpCode = "string",
            },
            ForwardGroupConfig = new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigArgs
            {
                ServerGroupStickySession = new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
                {
                    Enabled = false,
                    Timeout = 0,
                },
                ServerGroupTuples = new[]
                {
                    new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupTupleArgs
                    {
                        ServerGroupId = "string",
                        Weight = 0,
                    },
                },
            },
            InsertHeaderConfig = new AliCloud.Alb.Inputs.RuleRuleActionInsertHeaderConfigArgs
            {
                Key = "string",
                Value = "string",
                ValueType = "string",
            },
            RedirectConfig = new AliCloud.Alb.Inputs.RuleRuleActionRedirectConfigArgs
            {
                Host = "string",
                HttpCode = "string",
                Path = "string",
                Port = "string",
                Protocol = "string",
                Query = "string",
            },
            RemoveHeaderConfig = new AliCloud.Alb.Inputs.RuleRuleActionRemoveHeaderConfigArgs
            {
                Key = "string",
            },
            RewriteConfig = new AliCloud.Alb.Inputs.RuleRuleActionRewriteConfigArgs
            {
                Host = "string",
                Path = "string",
                Query = "string",
            },
            TrafficLimitConfig = new AliCloud.Alb.Inputs.RuleRuleActionTrafficLimitConfigArgs
            {
                PerIpQps = 0,
                Qps = 0,
            },
            TrafficMirrorConfig = new AliCloud.Alb.Inputs.RuleRuleActionTrafficMirrorConfigArgs
            {
                MirrorGroupConfig = new AliCloud.Alb.Inputs.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs
                {
                    ServerGroupTuples = new[]
                    {
                        new AliCloud.Alb.Inputs.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs
                        {
                            ServerGroupId = "string",
                        },
                    },
                },
                TargetType = "string",
            },
        },
    },
    RuleConditions = new[]
    {
        new AliCloud.Alb.Inputs.RuleRuleConditionArgs
        {
            Type = "string",
            CookieConfig = new AliCloud.Alb.Inputs.RuleRuleConditionCookieConfigArgs
            {
                Values = new[]
                {
                    new AliCloud.Alb.Inputs.RuleRuleConditionCookieConfigValueArgs
                    {
                        Key = "string",
                        Value = "string",
                    },
                },
            },
            HeaderConfig = new AliCloud.Alb.Inputs.RuleRuleConditionHeaderConfigArgs
            {
                Key = "string",
                Values = new[]
                {
                    "string",
                },
            },
            HostConfig = new AliCloud.Alb.Inputs.RuleRuleConditionHostConfigArgs
            {
                Values = new[]
                {
                    "string",
                },
            },
            MethodConfig = new AliCloud.Alb.Inputs.RuleRuleConditionMethodConfigArgs
            {
                Values = new[]
                {
                    "string",
                },
            },
            PathConfig = new AliCloud.Alb.Inputs.RuleRuleConditionPathConfigArgs
            {
                Values = new[]
                {
                    "string",
                },
            },
            QueryStringConfig = new AliCloud.Alb.Inputs.RuleRuleConditionQueryStringConfigArgs
            {
                Values = new[]
                {
                    new AliCloud.Alb.Inputs.RuleRuleConditionQueryStringConfigValueArgs
                    {
                        Key = "string",
                        Value = "string",
                    },
                },
            },
            ResponseHeaderConfig = new AliCloud.Alb.Inputs.RuleRuleConditionResponseHeaderConfigArgs
            {
                Key = "string",
                Values = new[]
                {
                    "string",
                },
            },
            ResponseStatusCodeConfig = new AliCloud.Alb.Inputs.RuleRuleConditionResponseStatusCodeConfigArgs
            {
                Values = new[]
                {
                    "string",
                },
            },
            SourceIpConfig = new AliCloud.Alb.Inputs.RuleRuleConditionSourceIpConfigArgs
            {
                Values = new[]
                {
                    "string",
                },
            },
        },
    },
    RuleName = "string",
    Direction = "string",
    DryRun = false,
});
example, err := alb.NewRule(ctx, "ruleResource", &alb.RuleArgs{
	ListenerId: pulumi.String("string"),
	Priority:   pulumi.Int(0),
	RuleActions: alb.RuleRuleActionArray{
		&alb.RuleRuleActionArgs{
			Order: pulumi.Int(0),
			Type:  pulumi.String("string"),
			CorsConfig: &alb.RuleRuleActionCorsConfigArgs{
				AllowCredentials: pulumi.String("string"),
				AllowHeaders: pulumi.StringArray{
					pulumi.String("string"),
				},
				AllowMethods: pulumi.StringArray{
					pulumi.String("string"),
				},
				AllowOrigins: pulumi.StringArray{
					pulumi.String("string"),
				},
				ExposeHeaders: pulumi.StringArray{
					pulumi.String("string"),
				},
				MaxAge: pulumi.Int(0),
			},
			FixedResponseConfig: &alb.RuleRuleActionFixedResponseConfigArgs{
				Content:     pulumi.String("string"),
				ContentType: pulumi.String("string"),
				HttpCode:    pulumi.String("string"),
			},
			ForwardGroupConfig: &alb.RuleRuleActionForwardGroupConfigArgs{
				ServerGroupStickySession: &alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs{
					Enabled: pulumi.Bool(false),
					Timeout: pulumi.Int(0),
				},
				ServerGroupTuples: alb.RuleRuleActionForwardGroupConfigServerGroupTupleArray{
					&alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs{
						ServerGroupId: pulumi.String("string"),
						Weight:        pulumi.Int(0),
					},
				},
			},
			InsertHeaderConfig: &alb.RuleRuleActionInsertHeaderConfigArgs{
				Key:       pulumi.String("string"),
				Value:     pulumi.String("string"),
				ValueType: pulumi.String("string"),
			},
			RedirectConfig: &alb.RuleRuleActionRedirectConfigArgs{
				Host:     pulumi.String("string"),
				HttpCode: pulumi.String("string"),
				Path:     pulumi.String("string"),
				Port:     pulumi.String("string"),
				Protocol: pulumi.String("string"),
				Query:    pulumi.String("string"),
			},
			RemoveHeaderConfig: &alb.RuleRuleActionRemoveHeaderConfigArgs{
				Key: pulumi.String("string"),
			},
			RewriteConfig: &alb.RuleRuleActionRewriteConfigArgs{
				Host:  pulumi.String("string"),
				Path:  pulumi.String("string"),
				Query: pulumi.String("string"),
			},
			TrafficLimitConfig: &alb.RuleRuleActionTrafficLimitConfigArgs{
				PerIpQps: pulumi.Int(0),
				Qps:      pulumi.Int(0),
			},
			TrafficMirrorConfig: &alb.RuleRuleActionTrafficMirrorConfigArgs{
				MirrorGroupConfig: &alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs{
					ServerGroupTuples: alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArray{
						&alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs{
							ServerGroupId: pulumi.String("string"),
						},
					},
				},
				TargetType: pulumi.String("string"),
			},
		},
	},
	RuleConditions: alb.RuleRuleConditionArray{
		&alb.RuleRuleConditionArgs{
			Type: pulumi.String("string"),
			CookieConfig: &alb.RuleRuleConditionCookieConfigArgs{
				Values: alb.RuleRuleConditionCookieConfigValueArray{
					&alb.RuleRuleConditionCookieConfigValueArgs{
						Key:   pulumi.String("string"),
						Value: pulumi.String("string"),
					},
				},
			},
			HeaderConfig: &alb.RuleRuleConditionHeaderConfigArgs{
				Key: pulumi.String("string"),
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			HostConfig: &alb.RuleRuleConditionHostConfigArgs{
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			MethodConfig: &alb.RuleRuleConditionMethodConfigArgs{
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			PathConfig: &alb.RuleRuleConditionPathConfigArgs{
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			QueryStringConfig: &alb.RuleRuleConditionQueryStringConfigArgs{
				Values: alb.RuleRuleConditionQueryStringConfigValueArray{
					&alb.RuleRuleConditionQueryStringConfigValueArgs{
						Key:   pulumi.String("string"),
						Value: pulumi.String("string"),
					},
				},
			},
			ResponseHeaderConfig: &alb.RuleRuleConditionResponseHeaderConfigArgs{
				Key: pulumi.String("string"),
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			ResponseStatusCodeConfig: &alb.RuleRuleConditionResponseStatusCodeConfigArgs{
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			SourceIpConfig: &alb.RuleRuleConditionSourceIpConfigArgs{
				Values: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
	},
	RuleName:  pulumi.String("string"),
	Direction: pulumi.String("string"),
	DryRun:    pulumi.Bool(false),
})
var ruleResource = new com.pulumi.alicloud.alb.Rule("ruleResource", com.pulumi.alicloud.alb.RuleArgs.builder()
    .listenerId("string")
    .priority(0)
    .ruleActions(RuleRuleActionArgs.builder()
        .order(0)
        .type("string")
        .corsConfig(RuleRuleActionCorsConfigArgs.builder()
            .allowCredentials("string")
            .allowHeaders("string")
            .allowMethods("string")
            .allowOrigins("string")
            .exposeHeaders("string")
            .maxAge(0)
            .build())
        .fixedResponseConfig(RuleRuleActionFixedResponseConfigArgs.builder()
            .content("string")
            .contentType("string")
            .httpCode("string")
            .build())
        .forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs.builder()
            .serverGroupStickySession(RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs.builder()
                .enabled(false)
                .timeout(0)
                .build())
            .serverGroupTuples(RuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
                .serverGroupId("string")
                .weight(0)
                .build())
            .build())
        .insertHeaderConfig(RuleRuleActionInsertHeaderConfigArgs.builder()
            .key("string")
            .value("string")
            .valueType("string")
            .build())
        .redirectConfig(RuleRuleActionRedirectConfigArgs.builder()
            .host("string")
            .httpCode("string")
            .path("string")
            .port("string")
            .protocol("string")
            .query("string")
            .build())
        .removeHeaderConfig(RuleRuleActionRemoveHeaderConfigArgs.builder()
            .key("string")
            .build())
        .rewriteConfig(RuleRuleActionRewriteConfigArgs.builder()
            .host("string")
            .path("string")
            .query("string")
            .build())
        .trafficLimitConfig(RuleRuleActionTrafficLimitConfigArgs.builder()
            .perIpQps(0)
            .qps(0)
            .build())
        .trafficMirrorConfig(RuleRuleActionTrafficMirrorConfigArgs.builder()
            .mirrorGroupConfig(RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs.builder()
                .serverGroupTuples(RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs.builder()
                    .serverGroupId("string")
                    .build())
                .build())
            .targetType("string")
            .build())
        .build())
    .ruleConditions(RuleRuleConditionArgs.builder()
        .type("string")
        .cookieConfig(RuleRuleConditionCookieConfigArgs.builder()
            .values(RuleRuleConditionCookieConfigValueArgs.builder()
                .key("string")
                .value("string")
                .build())
            .build())
        .headerConfig(RuleRuleConditionHeaderConfigArgs.builder()
            .key("string")
            .values("string")
            .build())
        .hostConfig(RuleRuleConditionHostConfigArgs.builder()
            .values("string")
            .build())
        .methodConfig(RuleRuleConditionMethodConfigArgs.builder()
            .values("string")
            .build())
        .pathConfig(RuleRuleConditionPathConfigArgs.builder()
            .values("string")
            .build())
        .queryStringConfig(RuleRuleConditionQueryStringConfigArgs.builder()
            .values(RuleRuleConditionQueryStringConfigValueArgs.builder()
                .key("string")
                .value("string")
                .build())
            .build())
        .responseHeaderConfig(RuleRuleConditionResponseHeaderConfigArgs.builder()
            .key("string")
            .values("string")
            .build())
        .responseStatusCodeConfig(RuleRuleConditionResponseStatusCodeConfigArgs.builder()
            .values("string")
            .build())
        .sourceIpConfig(RuleRuleConditionSourceIpConfigArgs.builder()
            .values("string")
            .build())
        .build())
    .ruleName("string")
    .direction("string")
    .dryRun(false)
    .build());
rule_resource = alicloud.alb.Rule("ruleResource",
    listener_id="string",
    priority=0,
    rule_actions=[{
        "order": 0,
        "type": "string",
        "cors_config": {
            "allow_credentials": "string",
            "allow_headers": ["string"],
            "allow_methods": ["string"],
            "allow_origins": ["string"],
            "expose_headers": ["string"],
            "max_age": 0,
        },
        "fixed_response_config": {
            "content": "string",
            "content_type": "string",
            "http_code": "string",
        },
        "forward_group_config": {
            "server_group_sticky_session": {
                "enabled": False,
                "timeout": 0,
            },
            "server_group_tuples": [{
                "server_group_id": "string",
                "weight": 0,
            }],
        },
        "insert_header_config": {
            "key": "string",
            "value": "string",
            "value_type": "string",
        },
        "redirect_config": {
            "host": "string",
            "http_code": "string",
            "path": "string",
            "port": "string",
            "protocol": "string",
            "query": "string",
        },
        "remove_header_config": {
            "key": "string",
        },
        "rewrite_config": {
            "host": "string",
            "path": "string",
            "query": "string",
        },
        "traffic_limit_config": {
            "per_ip_qps": 0,
            "qps": 0,
        },
        "traffic_mirror_config": {
            "mirror_group_config": {
                "server_group_tuples": [{
                    "server_group_id": "string",
                }],
            },
            "target_type": "string",
        },
    }],
    rule_conditions=[{
        "type": "string",
        "cookie_config": {
            "values": [{
                "key": "string",
                "value": "string",
            }],
        },
        "header_config": {
            "key": "string",
            "values": ["string"],
        },
        "host_config": {
            "values": ["string"],
        },
        "method_config": {
            "values": ["string"],
        },
        "path_config": {
            "values": ["string"],
        },
        "query_string_config": {
            "values": [{
                "key": "string",
                "value": "string",
            }],
        },
        "response_header_config": {
            "key": "string",
            "values": ["string"],
        },
        "response_status_code_config": {
            "values": ["string"],
        },
        "source_ip_config": {
            "values": ["string"],
        },
    }],
    rule_name="string",
    direction="string",
    dry_run=False)
const ruleResource = new alicloud.alb.Rule("ruleResource", {
    listenerId: "string",
    priority: 0,
    ruleActions: [{
        order: 0,
        type: "string",
        corsConfig: {
            allowCredentials: "string",
            allowHeaders: ["string"],
            allowMethods: ["string"],
            allowOrigins: ["string"],
            exposeHeaders: ["string"],
            maxAge: 0,
        },
        fixedResponseConfig: {
            content: "string",
            contentType: "string",
            httpCode: "string",
        },
        forwardGroupConfig: {
            serverGroupStickySession: {
                enabled: false,
                timeout: 0,
            },
            serverGroupTuples: [{
                serverGroupId: "string",
                weight: 0,
            }],
        },
        insertHeaderConfig: {
            key: "string",
            value: "string",
            valueType: "string",
        },
        redirectConfig: {
            host: "string",
            httpCode: "string",
            path: "string",
            port: "string",
            protocol: "string",
            query: "string",
        },
        removeHeaderConfig: {
            key: "string",
        },
        rewriteConfig: {
            host: "string",
            path: "string",
            query: "string",
        },
        trafficLimitConfig: {
            perIpQps: 0,
            qps: 0,
        },
        trafficMirrorConfig: {
            mirrorGroupConfig: {
                serverGroupTuples: [{
                    serverGroupId: "string",
                }],
            },
            targetType: "string",
        },
    }],
    ruleConditions: [{
        type: "string",
        cookieConfig: {
            values: [{
                key: "string",
                value: "string",
            }],
        },
        headerConfig: {
            key: "string",
            values: ["string"],
        },
        hostConfig: {
            values: ["string"],
        },
        methodConfig: {
            values: ["string"],
        },
        pathConfig: {
            values: ["string"],
        },
        queryStringConfig: {
            values: [{
                key: "string",
                value: "string",
            }],
        },
        responseHeaderConfig: {
            key: "string",
            values: ["string"],
        },
        responseStatusCodeConfig: {
            values: ["string"],
        },
        sourceIpConfig: {
            values: ["string"],
        },
    }],
    ruleName: "string",
    direction: "string",
    dryRun: false,
});
type: alicloud:alb:Rule
properties:
    direction: string
    dryRun: false
    listenerId: string
    priority: 0
    ruleActions:
        - corsConfig:
            allowCredentials: string
            allowHeaders:
                - string
            allowMethods:
                - string
            allowOrigins:
                - string
            exposeHeaders:
                - string
            maxAge: 0
          fixedResponseConfig:
            content: string
            contentType: string
            httpCode: string
          forwardGroupConfig:
            serverGroupStickySession:
                enabled: false
                timeout: 0
            serverGroupTuples:
                - serverGroupId: string
                  weight: 0
          insertHeaderConfig:
            key: string
            value: string
            valueType: string
          order: 0
          redirectConfig:
            host: string
            httpCode: string
            path: string
            port: string
            protocol: string
            query: string
          removeHeaderConfig:
            key: string
          rewriteConfig:
            host: string
            path: string
            query: string
          trafficLimitConfig:
            perIpQps: 0
            qps: 0
          trafficMirrorConfig:
            mirrorGroupConfig:
                serverGroupTuples:
                    - serverGroupId: string
            targetType: string
          type: string
    ruleConditions:
        - cookieConfig:
            values:
                - key: string
                  value: string
          headerConfig:
            key: string
            values:
                - string
          hostConfig:
            values:
                - string
          methodConfig:
            values:
                - string
          pathConfig:
            values:
                - string
          queryStringConfig:
            values:
                - key: string
                  value: string
          responseHeaderConfig:
            key: string
            values:
                - string
          responseStatusCodeConfig:
            values:
                - string
          sourceIpConfig:
            values:
                - string
          type: string
    ruleName: string
Rule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Rule resource accepts the following input properties:
- ListenerId string
- The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- RuleActions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action> 
- The actions of the forwarding rules. See rule_actionsbelow.
- RuleConditions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition> 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- RuleName string
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Direction string
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- DryRun bool
- Specifies whether to precheck this request.
- ListenerId string
- The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- RuleActions []RuleRule Action Args 
- The actions of the forwarding rules. See rule_actionsbelow.
- RuleConditions []RuleRule Condition Args 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- RuleName string
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Direction string
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- DryRun bool
- Specifies whether to precheck this request.
- listenerId String
- The ID of the listener to which the forwarding rule belongs.
- priority Integer
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- ruleActions List<RuleRule Action> 
- The actions of the forwarding rules. See rule_actionsbelow.
- ruleConditions List<RuleRule Condition> 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- ruleName String
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction String
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dryRun Boolean
- Specifies whether to precheck this request.
- listenerId string
- The ID of the listener to which the forwarding rule belongs.
- priority number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- ruleActions RuleRule Action[] 
- The actions of the forwarding rules. See rule_actionsbelow.
- ruleConditions RuleRule Condition[] 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- ruleName string
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction string
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dryRun boolean
- Specifies whether to precheck this request.
- listener_id str
- The ID of the listener to which the forwarding rule belongs.
- priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule_actions Sequence[RuleRule Action Args] 
- The actions of the forwarding rules. See rule_actionsbelow.
- rule_conditions Sequence[RuleRule Condition Args] 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- rule_name str
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction str
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dry_run bool
- Specifies whether to precheck this request.
- listenerId String
- The ID of the listener to which the forwarding rule belongs.
- priority Number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- ruleActions List<Property Map>
- The actions of the forwarding rules. See rule_actionsbelow.
- ruleConditions List<Property Map>
- The conditions of the forwarding rule. See rule_conditionsbelow.
- ruleName String
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction String
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dryRun Boolean
- Specifies whether to precheck this request.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
Look up Existing Rule Resource
Get an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RuleState, opts?: CustomResourceOptions): Rule@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        direction: Optional[str] = None,
        dry_run: Optional[bool] = None,
        listener_id: Optional[str] = None,
        priority: Optional[int] = None,
        rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
        rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
        rule_name: Optional[str] = None,
        status: Optional[str] = None) -> Rulefunc GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)resources:  _:    type: alicloud:alb:Rule    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Direction string
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- DryRun bool
- Specifies whether to precheck this request.
- ListenerId string
- The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- RuleActions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action> 
- The actions of the forwarding rules. See rule_actionsbelow.
- RuleConditions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition> 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- RuleName string
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Status string
- The status of the resource.
- Direction string
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- DryRun bool
- Specifies whether to precheck this request.
- ListenerId string
- The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- RuleActions []RuleRule Action Args 
- The actions of the forwarding rules. See rule_actionsbelow.
- RuleConditions []RuleRule Condition Args 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- RuleName string
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Status string
- The status of the resource.
- direction String
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dryRun Boolean
- Specifies whether to precheck this request.
- listenerId String
- The ID of the listener to which the forwarding rule belongs.
- priority Integer
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- ruleActions List<RuleRule Action> 
- The actions of the forwarding rules. See rule_actionsbelow.
- ruleConditions List<RuleRule Condition> 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- ruleName String
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status String
- The status of the resource.
- direction string
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dryRun boolean
- Specifies whether to precheck this request.
- listenerId string
- The ID of the listener to which the forwarding rule belongs.
- priority number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- ruleActions RuleRule Action[] 
- The actions of the forwarding rules. See rule_actionsbelow.
- ruleConditions RuleRule Condition[] 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- ruleName string
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status string
- The status of the resource.
- direction str
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dry_run bool
- Specifies whether to precheck this request.
- listener_id str
- The ID of the listener to which the forwarding rule belongs.
- priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule_actions Sequence[RuleRule Action Args] 
- The actions of the forwarding rules. See rule_actionsbelow.
- rule_conditions Sequence[RuleRule Condition Args] 
- The conditions of the forwarding rule. See rule_conditionsbelow.
- rule_name str
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status str
- The status of the resource.
- direction String
- The direction to which the forwarding rule is applied. Default value: Request. Valid values:- Request: The forwarding rule is applied to the client requests received by ALB.
- Response: The forwarding rule is applied to the responses returned by backend servers.
 
- dryRun Boolean
- Specifies whether to precheck this request.
- listenerId String
- The ID of the listener to which the forwarding rule belongs.
- priority Number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- ruleActions List<Property Map>
- The actions of the forwarding rules. See rule_actionsbelow.
- ruleConditions List<Property Map>
- The conditions of the forwarding rule. See rule_conditionsbelow.
- ruleName String
- The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status String
- The status of the resource.
Supporting Types
RuleRuleAction, RuleRuleActionArgs      
- Order int
- The order of the forwarding rule actions. Valid values: 1to50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
- Type string
- The action type. Valid values: ForwardGroup,Redirect,FixedResponse,Rewrite,InsertHeader,RemoveHeader,TrafficLimit,TrafficMirrorandCors. Note: The preceding actions can be classified into two types:FinalType: A forwarding rule can contain only oneFinalTypeaction, which is executed last. This type of action can contain only oneForwardGroup,RedirectorFixedResponseaction.ExtType: A forwarding rule can contain one or moreExtTypeactions, which are executed beforeFinalTypeactions and need to coexist with theFinalTypeactions. This type of action can contain multipleInsertHeaderactions or oneRewriteaction. NOTE: TheTrafficLimitandTrafficMirroroption is available since 1.162.0. NOTE: From version 1.205.0,typecan be set toCors.
- CorsConfig Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action Cors Config 
- Request forwarding based on CORS. See cors_configbelow.
- FixedResponse Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Fixed Response Config 
- The configuration of the fixed response. See fixed_response_configbelow.
- ForwardGroup Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Forward Group Config 
- The forward response action within ALB. See forward_group_configbelow.
- InsertHeader Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Insert Header Config 
- The configuration of the inserted header field. See insert_header_configbelow.
- RedirectConfig Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action Redirect Config 
- The configuration of the external redirect action. See redirect_configbelow.
- RemoveHeader Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Remove Header Config 
- The configuration of the inserted header field. See remove_header_configbelow.
- RewriteConfig Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action Rewrite Config 
- The redirect action within ALB. See rewrite_configbelow.
- TrafficLimit Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Traffic Limit Config 
- The Flow speed limit. See traffic_limit_configbelow.
- TrafficMirror Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Traffic Mirror Config 
- The Traffic mirroring. See traffic_mirror_configbelow.
- Order int
- The order of the forwarding rule actions. Valid values: 1to50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
- Type string
- The action type. Valid values: ForwardGroup,Redirect,FixedResponse,Rewrite,InsertHeader,RemoveHeader,TrafficLimit,TrafficMirrorandCors. Note: The preceding actions can be classified into two types:FinalType: A forwarding rule can contain only oneFinalTypeaction, which is executed last. This type of action can contain only oneForwardGroup,RedirectorFixedResponseaction.ExtType: A forwarding rule can contain one or moreExtTypeactions, which are executed beforeFinalTypeactions and need to coexist with theFinalTypeactions. This type of action can contain multipleInsertHeaderactions or oneRewriteaction. NOTE: TheTrafficLimitandTrafficMirroroption is available since 1.162.0. NOTE: From version 1.205.0,typecan be set toCors.
- CorsConfig RuleRule Action Cors Config 
- Request forwarding based on CORS. See cors_configbelow.
- FixedResponse RuleConfig Rule Action Fixed Response Config 
- The configuration of the fixed response. See fixed_response_configbelow.
- ForwardGroup RuleConfig Rule Action Forward Group Config 
- The forward response action within ALB. See forward_group_configbelow.
- InsertHeader RuleConfig Rule Action Insert Header Config 
- The configuration of the inserted header field. See insert_header_configbelow.
- RedirectConfig RuleRule Action Redirect Config 
- The configuration of the external redirect action. See redirect_configbelow.
- RemoveHeader RuleConfig Rule Action Remove Header Config 
- The configuration of the inserted header field. See remove_header_configbelow.
- RewriteConfig RuleRule Action Rewrite Config 
- The redirect action within ALB. See rewrite_configbelow.
- TrafficLimit RuleConfig Rule Action Traffic Limit Config 
- The Flow speed limit. See traffic_limit_configbelow.
- TrafficMirror RuleConfig Rule Action Traffic Mirror Config 
- The Traffic mirroring. See traffic_mirror_configbelow.
- order Integer
- The order of the forwarding rule actions. Valid values: 1to50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
- type String
- The action type. Valid values: ForwardGroup,Redirect,FixedResponse,Rewrite,InsertHeader,RemoveHeader,TrafficLimit,TrafficMirrorandCors. Note: The preceding actions can be classified into two types:FinalType: A forwarding rule can contain only oneFinalTypeaction, which is executed last. This type of action can contain only oneForwardGroup,RedirectorFixedResponseaction.ExtType: A forwarding rule can contain one or moreExtTypeactions, which are executed beforeFinalTypeactions and need to coexist with theFinalTypeactions. This type of action can contain multipleInsertHeaderactions or oneRewriteaction. NOTE: TheTrafficLimitandTrafficMirroroption is available since 1.162.0. NOTE: From version 1.205.0,typecan be set toCors.
- corsConfig RuleRule Action Cors Config 
- Request forwarding based on CORS. See cors_configbelow.
- fixedResponse RuleConfig Rule Action Fixed Response Config 
- The configuration of the fixed response. See fixed_response_configbelow.
- forwardGroup RuleConfig Rule Action Forward Group Config 
- The forward response action within ALB. See forward_group_configbelow.
- insertHeader RuleConfig Rule Action Insert Header Config 
- The configuration of the inserted header field. See insert_header_configbelow.
- redirectConfig RuleRule Action Redirect Config 
- The configuration of the external redirect action. See redirect_configbelow.
- removeHeader RuleConfig Rule Action Remove Header Config 
- The configuration of the inserted header field. See remove_header_configbelow.
- rewriteConfig RuleRule Action Rewrite Config 
- The redirect action within ALB. See rewrite_configbelow.
- trafficLimit RuleConfig Rule Action Traffic Limit Config 
- The Flow speed limit. See traffic_limit_configbelow.
- trafficMirror RuleConfig Rule Action Traffic Mirror Config 
- The Traffic mirroring. See traffic_mirror_configbelow.
- order number
- The order of the forwarding rule actions. Valid values: 1to50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
- type string
- The action type. Valid values: ForwardGroup,Redirect,FixedResponse,Rewrite,InsertHeader,RemoveHeader,TrafficLimit,TrafficMirrorandCors. Note: The preceding actions can be classified into two types:FinalType: A forwarding rule can contain only oneFinalTypeaction, which is executed last. This type of action can contain only oneForwardGroup,RedirectorFixedResponseaction.ExtType: A forwarding rule can contain one or moreExtTypeactions, which are executed beforeFinalTypeactions and need to coexist with theFinalTypeactions. This type of action can contain multipleInsertHeaderactions or oneRewriteaction. NOTE: TheTrafficLimitandTrafficMirroroption is available since 1.162.0. NOTE: From version 1.205.0,typecan be set toCors.
- corsConfig RuleRule Action Cors Config 
- Request forwarding based on CORS. See cors_configbelow.
- fixedResponse RuleConfig Rule Action Fixed Response Config 
- The configuration of the fixed response. See fixed_response_configbelow.
- forwardGroup RuleConfig Rule Action Forward Group Config 
- The forward response action within ALB. See forward_group_configbelow.
- insertHeader RuleConfig Rule Action Insert Header Config 
- The configuration of the inserted header field. See insert_header_configbelow.
- redirectConfig RuleRule Action Redirect Config 
- The configuration of the external redirect action. See redirect_configbelow.
- removeHeader RuleConfig Rule Action Remove Header Config 
- The configuration of the inserted header field. See remove_header_configbelow.
- rewriteConfig RuleRule Action Rewrite Config 
- The redirect action within ALB. See rewrite_configbelow.
- trafficLimit RuleConfig Rule Action Traffic Limit Config 
- The Flow speed limit. See traffic_limit_configbelow.
- trafficMirror RuleConfig Rule Action Traffic Mirror Config 
- The Traffic mirroring. See traffic_mirror_configbelow.
- order int
- The order of the forwarding rule actions. Valid values: 1to50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
- type str
- The action type. Valid values: ForwardGroup,Redirect,FixedResponse,Rewrite,InsertHeader,RemoveHeader,TrafficLimit,TrafficMirrorandCors. Note: The preceding actions can be classified into two types:FinalType: A forwarding rule can contain only oneFinalTypeaction, which is executed last. This type of action can contain only oneForwardGroup,RedirectorFixedResponseaction.ExtType: A forwarding rule can contain one or moreExtTypeactions, which are executed beforeFinalTypeactions and need to coexist with theFinalTypeactions. This type of action can contain multipleInsertHeaderactions or oneRewriteaction. NOTE: TheTrafficLimitandTrafficMirroroption is available since 1.162.0. NOTE: From version 1.205.0,typecan be set toCors.
- cors_config RuleRule Action Cors Config 
- Request forwarding based on CORS. See cors_configbelow.
- fixed_response_ Ruleconfig Rule Action Fixed Response Config 
- The configuration of the fixed response. See fixed_response_configbelow.
- forward_group_ Ruleconfig Rule Action Forward Group Config 
- The forward response action within ALB. See forward_group_configbelow.
- insert_header_ Ruleconfig Rule Action Insert Header Config 
- The configuration of the inserted header field. See insert_header_configbelow.
- redirect_config RuleRule Action Redirect Config 
- The configuration of the external redirect action. See redirect_configbelow.
- remove_header_ Ruleconfig Rule Action Remove Header Config 
- The configuration of the inserted header field. See remove_header_configbelow.
- rewrite_config RuleRule Action Rewrite Config 
- The redirect action within ALB. See rewrite_configbelow.
- traffic_limit_ Ruleconfig Rule Action Traffic Limit Config 
- The Flow speed limit. See traffic_limit_configbelow.
- traffic_mirror_ Ruleconfig Rule Action Traffic Mirror Config 
- The Traffic mirroring. See traffic_mirror_configbelow.
- order Number
- The order of the forwarding rule actions. Valid values: 1to50000. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique.
- type String
- The action type. Valid values: ForwardGroup,Redirect,FixedResponse,Rewrite,InsertHeader,RemoveHeader,TrafficLimit,TrafficMirrorandCors. Note: The preceding actions can be classified into two types:FinalType: A forwarding rule can contain only oneFinalTypeaction, which is executed last. This type of action can contain only oneForwardGroup,RedirectorFixedResponseaction.ExtType: A forwarding rule can contain one or moreExtTypeactions, which are executed beforeFinalTypeactions and need to coexist with theFinalTypeactions. This type of action can contain multipleInsertHeaderactions or oneRewriteaction. NOTE: TheTrafficLimitandTrafficMirroroption is available since 1.162.0. NOTE: From version 1.205.0,typecan be set toCors.
- corsConfig Property Map
- Request forwarding based on CORS. See cors_configbelow.
- fixedResponse Property MapConfig 
- The configuration of the fixed response. See fixed_response_configbelow.
- forwardGroup Property MapConfig 
- The forward response action within ALB. See forward_group_configbelow.
- insertHeader Property MapConfig 
- The configuration of the inserted header field. See insert_header_configbelow.
- redirectConfig Property Map
- The configuration of the external redirect action. See redirect_configbelow.
- removeHeader Property MapConfig 
- The configuration of the inserted header field. See remove_header_configbelow.
- rewriteConfig Property Map
- The redirect action within ALB. See rewrite_configbelow.
- trafficLimit Property MapConfig 
- The Flow speed limit. See traffic_limit_configbelow.
- trafficMirror Property MapConfig 
- The Traffic mirroring. See traffic_mirror_configbelow.
RuleRuleActionCorsConfig, RuleRuleActionCorsConfigArgs          
- AllowCredentials string
- Specifies whether credentials can be passed during CORS operations. Valid values: on,off.
- AllowHeaders List<string>
- The allowed headers for CORS requests.
- AllowMethods List<string>
- The allowed HTTP methods for CORS requests. Valid values: GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH.
- AllowOrigins List<string>
- The allowed origins of CORS requests.
- ExposeHeaders List<string>
- The headers that can be exposed.
- MaxAge int
- The maximum cache time of preflight requests in the browser. Unit: seconds. Valid values: -1to172800.
- AllowCredentials string
- Specifies whether credentials can be passed during CORS operations. Valid values: on,off.
- AllowHeaders []string
- The allowed headers for CORS requests.
- AllowMethods []string
- The allowed HTTP methods for CORS requests. Valid values: GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH.
- AllowOrigins []string
- The allowed origins of CORS requests.
- ExposeHeaders []string
- The headers that can be exposed.
- MaxAge int
- The maximum cache time of preflight requests in the browser. Unit: seconds. Valid values: -1to172800.
- allowCredentials String
- Specifies whether credentials can be passed during CORS operations. Valid values: on,off.
- allowHeaders List<String>
- The allowed headers for CORS requests.
- allowMethods List<String>
- The allowed HTTP methods for CORS requests. Valid values: GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH.
- allowOrigins List<String>
- The allowed origins of CORS requests.
- exposeHeaders List<String>
- The headers that can be exposed.
- maxAge Integer
- The maximum cache time of preflight requests in the browser. Unit: seconds. Valid values: -1to172800.
- allowCredentials string
- Specifies whether credentials can be passed during CORS operations. Valid values: on,off.
- allowHeaders string[]
- The allowed headers for CORS requests.
- allowMethods string[]
- The allowed HTTP methods for CORS requests. Valid values: GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH.
- allowOrigins string[]
- The allowed origins of CORS requests.
- exposeHeaders string[]
- The headers that can be exposed.
- maxAge number
- The maximum cache time of preflight requests in the browser. Unit: seconds. Valid values: -1to172800.
- allow_credentials str
- Specifies whether credentials can be passed during CORS operations. Valid values: on,off.
- allow_headers Sequence[str]
- The allowed headers for CORS requests.
- allow_methods Sequence[str]
- The allowed HTTP methods for CORS requests. Valid values: GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH.
- allow_origins Sequence[str]
- The allowed origins of CORS requests.
- expose_headers Sequence[str]
- The headers that can be exposed.
- max_age int
- The maximum cache time of preflight requests in the browser. Unit: seconds. Valid values: -1to172800.
- allowCredentials String
- Specifies whether credentials can be passed during CORS operations. Valid values: on,off.
- allowHeaders List<String>
- The allowed headers for CORS requests.
- allowMethods List<String>
- The allowed HTTP methods for CORS requests. Valid values: GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH.
- allowOrigins List<String>
- The allowed origins of CORS requests.
- exposeHeaders List<String>
- The headers that can be exposed.
- maxAge Number
- The maximum cache time of preflight requests in the browser. Unit: seconds. Valid values: -1to172800.
RuleRuleActionFixedResponseConfig, RuleRuleActionFixedResponseConfigArgs            
- Content string
- The fixed response. The response cannot exceed 1 KB in size and can contain only ASCII characters.
- ContentType string
- The format of the fixed response. Valid values: text/plain,text/css,text/html,application/javascript, andapplication/json.
- HttpCode string
- The redirect method. Valid values: 301,302,303,307, and308.
- Content string
- The fixed response. The response cannot exceed 1 KB in size and can contain only ASCII characters.
- ContentType string
- The format of the fixed response. Valid values: text/plain,text/css,text/html,application/javascript, andapplication/json.
- HttpCode string
- The redirect method. Valid values: 301,302,303,307, and308.
- content String
- The fixed response. The response cannot exceed 1 KB in size and can contain only ASCII characters.
- contentType String
- The format of the fixed response. Valid values: text/plain,text/css,text/html,application/javascript, andapplication/json.
- httpCode String
- The redirect method. Valid values: 301,302,303,307, and308.
- content string
- The fixed response. The response cannot exceed 1 KB in size and can contain only ASCII characters.
- contentType string
- The format of the fixed response. Valid values: text/plain,text/css,text/html,application/javascript, andapplication/json.
- httpCode string
- The redirect method. Valid values: 301,302,303,307, and308.
- content str
- The fixed response. The response cannot exceed 1 KB in size and can contain only ASCII characters.
- content_type str
- The format of the fixed response. Valid values: text/plain,text/css,text/html,application/javascript, andapplication/json.
- http_code str
- The redirect method. Valid values: 301,302,303,307, and308.
- content String
- The fixed response. The response cannot exceed 1 KB in size and can contain only ASCII characters.
- contentType String
- The format of the fixed response. Valid values: text/plain,text/css,text/html,application/javascript, andapplication/json.
- httpCode String
- The redirect method. Valid values: 301,302,303,307, and308.
RuleRuleActionForwardGroupConfig, RuleRuleActionForwardGroupConfigArgs            
- ServerGroup Pulumi.Sticky Session Ali Cloud. Alb. Inputs. Rule Rule Action Forward Group Config Server Group Sticky Session 
- The configuration of session persistence for server groups. See server_group_sticky_sessionbelow.
- ServerGroup List<Pulumi.Tuples Ali Cloud. Alb. Inputs. Rule Rule Action Forward Group Config Server Group Tuple> 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- ServerGroup RuleSticky Session Rule Action Forward Group Config Server Group Sticky Session 
- The configuration of session persistence for server groups. See server_group_sticky_sessionbelow.
- ServerGroup []RuleTuples Rule Action Forward Group Config Server Group Tuple 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- serverGroup RuleSticky Session Rule Action Forward Group Config Server Group Sticky Session 
- The configuration of session persistence for server groups. See server_group_sticky_sessionbelow.
- serverGroup List<RuleTuples Rule Action Forward Group Config Server Group Tuple> 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- serverGroup RuleSticky Session Rule Action Forward Group Config Server Group Sticky Session 
- The configuration of session persistence for server groups. See server_group_sticky_sessionbelow.
- serverGroup RuleTuples Rule Action Forward Group Config Server Group Tuple[] 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- server_group_ Rulesticky_ session Rule Action Forward Group Config Server Group Sticky Session 
- The configuration of session persistence for server groups. See server_group_sticky_sessionbelow.
- server_group_ Sequence[Ruletuples Rule Action Forward Group Config Server Group Tuple] 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- serverGroup Property MapSticky Session 
- The configuration of session persistence for server groups. See server_group_sticky_sessionbelow.
- serverGroup List<Property Map>Tuples 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
RuleRuleActionForwardGroupConfigServerGroupStickySession, RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs                    
RuleRuleActionForwardGroupConfigServerGroupTuple, RuleRuleActionForwardGroupConfigServerGroupTupleArgs                  
- ServerGroup stringId 
- The ID of the destination server group to which requests are forwarded.
- Weight int
- The Weight of server group. Default value: 100. NOTE: This attribute is required when the number ofserver_group_tuplesis greater than 2.
- ServerGroup stringId 
- The ID of the destination server group to which requests are forwarded.
- Weight int
- The Weight of server group. Default value: 100. NOTE: This attribute is required when the number ofserver_group_tuplesis greater than 2.
- serverGroup StringId 
- The ID of the destination server group to which requests are forwarded.
- weight Integer
- The Weight of server group. Default value: 100. NOTE: This attribute is required when the number ofserver_group_tuplesis greater than 2.
- serverGroup stringId 
- The ID of the destination server group to which requests are forwarded.
- weight number
- The Weight of server group. Default value: 100. NOTE: This attribute is required when the number ofserver_group_tuplesis greater than 2.
- server_group_ strid 
- The ID of the destination server group to which requests are forwarded.
- weight int
- The Weight of server group. Default value: 100. NOTE: This attribute is required when the number ofserver_group_tuplesis greater than 2.
- serverGroup StringId 
- The ID of the destination server group to which requests are forwarded.
- weight Number
- The Weight of server group. Default value: 100. NOTE: This attribute is required when the number ofserver_group_tuplesis greater than 2.
RuleRuleActionInsertHeaderConfig, RuleRuleActionInsertHeaderConfigArgs            
- key str
- value str
- value_type str
- The value type of the inserted header field. Valid values:- UserDefined: a custom value
- ReferenceHeader: uses a field of the user request header.
- SystemDefined: a system value.
 
RuleRuleActionRedirectConfig, RuleRuleActionRedirectConfigArgs          
- Host string
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- HttpCode string
- The redirect method. Valid values: 301,302,303,307, and308.
- Path string
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- Port string
- The port of the destination to which requests are redirected. Valid values: 1 to 63335. Default value: ${port}. You cannot use this value together with other characters at the same time.
- Protocol string
- The protocol of the requests to be redirected. Valid values: HTTPandHTTPS. Default value:${protocol}. You cannot use this value together with other characters at the same time. Note HTTPS listeners can redirect only HTTPS requests.
- Query string
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- Host string
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- HttpCode string
- The redirect method. Valid values: 301,302,303,307, and308.
- Path string
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- Port string
- The port of the destination to which requests are redirected. Valid values: 1 to 63335. Default value: ${port}. You cannot use this value together with other characters at the same time.
- Protocol string
- The protocol of the requests to be redirected. Valid values: HTTPandHTTPS. Default value:${protocol}. You cannot use this value together with other characters at the same time. Note HTTPS listeners can redirect only HTTPS requests.
- Query string
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host String
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- httpCode String
- The redirect method. Valid values: 301,302,303,307, and308.
- path String
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- port String
- The port of the destination to which requests are redirected. Valid values: 1 to 63335. Default value: ${port}. You cannot use this value together with other characters at the same time.
- protocol String
- The protocol of the requests to be redirected. Valid values: HTTPandHTTPS. Default value:${protocol}. You cannot use this value together with other characters at the same time. Note HTTPS listeners can redirect only HTTPS requests.
- query String
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host string
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- httpCode string
- The redirect method. Valid values: 301,302,303,307, and308.
- path string
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- port string
- The port of the destination to which requests are redirected. Valid values: 1 to 63335. Default value: ${port}. You cannot use this value together with other characters at the same time.
- protocol string
- The protocol of the requests to be redirected. Valid values: HTTPandHTTPS. Default value:${protocol}. You cannot use this value together with other characters at the same time. Note HTTPS listeners can redirect only HTTPS requests.
- query string
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host str
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- http_code str
- The redirect method. Valid values: 301,302,303,307, and308.
- path str
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- port str
- The port of the destination to which requests are redirected. Valid values: 1 to 63335. Default value: ${port}. You cannot use this value together with other characters at the same time.
- protocol str
- The protocol of the requests to be redirected. Valid values: HTTPandHTTPS. Default value:${protocol}. You cannot use this value together with other characters at the same time. Note HTTPS listeners can redirect only HTTPS requests.
- query str
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host String
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- httpCode String
- The redirect method. Valid values: 301,302,303,307, and308.
- path String
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- port String
- The port of the destination to which requests are redirected. Valid values: 1 to 63335. Default value: ${port}. You cannot use this value together with other characters at the same time.
- protocol String
- The protocol of the requests to be redirected. Valid values: HTTPandHTTPS. Default value:${protocol}. You cannot use this value together with other characters at the same time. Note HTTPS listeners can redirect only HTTPS requests.
- query String
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
RuleRuleActionRemoveHeaderConfig, RuleRuleActionRemoveHeaderConfigArgs            
- Key string
- Key string
- key String
- key string
- key str
- key String
RuleRuleActionRewriteConfig, RuleRuleActionRewriteConfigArgs          
- Host string
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- Path string
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- Query string
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- Host string
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- Path string
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- Query string
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host String
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- path String
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- query String
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host string
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- path string
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- query string
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host str
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- path str
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- query str
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
- host String
- The host name of the destination to which requests are redirected within ALB. Valid values: The host name must be 3 to 128 characters in length, and can contain letters, digits, hyphens (-), periods (.), asterisks (), and question marks (?). The host name must contain at least one period (.), and cannot start or end with a period (.). The rightmost domain label can contain only letters, asterisks () and question marks (?) and cannot contain digits or hyphens (-). Other domain labels cannot start or end with a hyphen (-). You can include asterisks (*) and question marks (?) anywhere in a domain label. Default value: ${host}. You cannot use this value with other characters at the same time.
- path String
- The path to which requests are to be redirected within ALB. Valid values: The path must be 1 to 128 characters in length, and start with a forward slash (/). The path can contain letters, digits, asterisks (*), question marks (?)and the following special characters: $ - _ . + / & ~ @ :. It cannot contain the following special characters: " % # ; ! ( ) [ ] ^ , ”. The path is case-sensitive. Default value: ${path}. This value can be used only once. You can use it with a valid string.
- query String
- The query string of the request to be redirected within ALB. The query string must be 1 to 128 characters in length, can contain letters and printable characters. It cannot contain the following special characters: # [ ] { } \ | < > &. Default value: ${query}. This value can be used only once. You can use it with a valid string.
RuleRuleActionTrafficLimitConfig, RuleRuleActionTrafficLimitConfigArgs            
- perIp IntegerQps 
- The number of requests per second for a single IP address. Value range: 1~1000000. Note: If the QPS parameter is also configured, the value of the PerIpQps parameter must be smaller than the value of the QPS parameter.
- qps Integer
- The Number of requests per second. Valid values: 1to100000.
- perIp numberQps 
- The number of requests per second for a single IP address. Value range: 1~1000000. Note: If the QPS parameter is also configured, the value of the PerIpQps parameter must be smaller than the value of the QPS parameter.
- qps number
- The Number of requests per second. Valid values: 1to100000.
- per_ip_ intqps 
- The number of requests per second for a single IP address. Value range: 1~1000000. Note: If the QPS parameter is also configured, the value of the PerIpQps parameter must be smaller than the value of the QPS parameter.
- qps int
- The Number of requests per second. Valid values: 1to100000.
- perIp NumberQps 
- The number of requests per second for a single IP address. Value range: 1~1000000. Note: If the QPS parameter is also configured, the value of the PerIpQps parameter must be smaller than the value of the QPS parameter.
- qps Number
- The Number of requests per second. Valid values: 1to100000.
RuleRuleActionTrafficMirrorConfig, RuleRuleActionTrafficMirrorConfigArgs            
- MirrorGroup Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Traffic Mirror Config Mirror Group Config 
- The Traffic is mirrored to the server group. See mirror_group_configbelow.
- TargetType string
- The Mirror target type.
- MirrorGroup RuleConfig Rule Action Traffic Mirror Config Mirror Group Config 
- The Traffic is mirrored to the server group. See mirror_group_configbelow.
- TargetType string
- The Mirror target type.
- mirrorGroup RuleConfig Rule Action Traffic Mirror Config Mirror Group Config 
- The Traffic is mirrored to the server group. See mirror_group_configbelow.
- targetType String
- The Mirror target type.
- mirrorGroup RuleConfig Rule Action Traffic Mirror Config Mirror Group Config 
- The Traffic is mirrored to the server group. See mirror_group_configbelow.
- targetType string
- The Mirror target type.
- mirror_group_ Ruleconfig Rule Action Traffic Mirror Config Mirror Group Config 
- The Traffic is mirrored to the server group. See mirror_group_configbelow.
- target_type str
- The Mirror target type.
- mirrorGroup Property MapConfig 
- The Traffic is mirrored to the server group. See mirror_group_configbelow.
- targetType String
- The Mirror target type.
RuleRuleActionTrafficMirrorConfigMirrorGroupConfig, RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs                  
- ServerGroup List<Pulumi.Tuples Ali Cloud. Alb. Inputs. Rule Rule Action Traffic Mirror Config Mirror Group Config Server Group Tuple> 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- ServerGroup []RuleTuples Rule Action Traffic Mirror Config Mirror Group Config Server Group Tuple 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- serverGroup List<RuleTuples Rule Action Traffic Mirror Config Mirror Group Config Server Group Tuple> 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- serverGroup RuleTuples Rule Action Traffic Mirror Config Mirror Group Config Server Group Tuple[] 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- server_group_ Sequence[Ruletuples Rule Action Traffic Mirror Config Mirror Group Config Server Group Tuple] 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
- serverGroup List<Property Map>Tuples 
- The destination server group to which requests are forwarded. See server_group_tuplesbelow.
RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTuple, RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs                        
- ServerGroup stringId 
- The ID of the destination server group to which requests are forwarded.
- ServerGroup stringId 
- The ID of the destination server group to which requests are forwarded.
- serverGroup StringId 
- The ID of the destination server group to which requests are forwarded.
- serverGroup stringId 
- The ID of the destination server group to which requests are forwarded.
- server_group_ strid 
- The ID of the destination server group to which requests are forwarded.
- serverGroup StringId 
- The ID of the destination server group to which requests are forwarded.
RuleRuleCondition, RuleRuleConditionArgs      
- Type string
- The type of the forwarding rule. Valid values:- Host: Requests are forwarded based on hosts.
- Path: Requests are forwarded based on the path.
- Header: Requests are forwarded based on the HTTP header field.
- QueryString: Requests are forwarded based on the query string.
- Method: Request are forwarded based on the request method.
- Cookie: Requests are forwarded based on the cookie.
- SourceIp: Requests are forwarded based on the source ip. NOTE: The- SourceIpoption is available since 1.162.0.
- ResponseHeader: Response header. NOTE: The- SourceIpoption is available since 1.213.1.
- ResponseStatusCode: Response status code. NOTE: The- SourceIpoption is available since 1.213.1.
 
- 
Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Cookie Config 
- The configuration of the cookie. See See cookie_configbelow.
- HeaderConfig Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Header Config 
- The configuration of the header field. See header_configbelow.
- HostConfig Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Host Config 
- The configuration of the host field. See host_configbelow.
- MethodConfig Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Method Config 
- The configuration of the request method. See method_configbelow.
- PathConfig Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Path Config 
- The configuration of the path for the request to be forwarded. See path_configbelow.
- QueryString Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Condition Query String Config 
- The configuration of the query string. See query_string_configbelow.
- ResponseHeader Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Condition Response Header Config 
- The configuration of the header field. See response_header_configbelow.
- ResponseStatus Pulumi.Code Config Ali Cloud. Alb. Inputs. Rule Rule Condition Response Status Code Config 
- The configuration of the header field. See response_status_code_configbelow.
- SourceIp Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Condition Source Ip Config 
- The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_configbelow.
- Type string
- The type of the forwarding rule. Valid values:- Host: Requests are forwarded based on hosts.
- Path: Requests are forwarded based on the path.
- Header: Requests are forwarded based on the HTTP header field.
- QueryString: Requests are forwarded based on the query string.
- Method: Request are forwarded based on the request method.
- Cookie: Requests are forwarded based on the cookie.
- SourceIp: Requests are forwarded based on the source ip. NOTE: The- SourceIpoption is available since 1.162.0.
- ResponseHeader: Response header. NOTE: The- SourceIpoption is available since 1.213.1.
- ResponseStatusCode: Response status code. NOTE: The- SourceIpoption is available since 1.213.1.
 
- 
RuleRule Condition Cookie Config 
- The configuration of the cookie. See See cookie_configbelow.
- HeaderConfig RuleRule Condition Header Config 
- The configuration of the header field. See header_configbelow.
- HostConfig RuleRule Condition Host Config 
- The configuration of the host field. See host_configbelow.
- MethodConfig RuleRule Condition Method Config 
- The configuration of the request method. See method_configbelow.
- PathConfig RuleRule Condition Path Config 
- The configuration of the path for the request to be forwarded. See path_configbelow.
- QueryString RuleConfig Rule Condition Query String Config 
- The configuration of the query string. See query_string_configbelow.
- ResponseHeader RuleConfig Rule Condition Response Header Config 
- The configuration of the header field. See response_header_configbelow.
- ResponseStatus RuleCode Config Rule Condition Response Status Code Config 
- The configuration of the header field. See response_status_code_configbelow.
- SourceIp RuleConfig Rule Condition Source Ip Config 
- The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_configbelow.
- type String
- The type of the forwarding rule. Valid values:- Host: Requests are forwarded based on hosts.
- Path: Requests are forwarded based on the path.
- Header: Requests are forwarded based on the HTTP header field.
- QueryString: Requests are forwarded based on the query string.
- Method: Request are forwarded based on the request method.
- Cookie: Requests are forwarded based on the cookie.
- SourceIp: Requests are forwarded based on the source ip. NOTE: The- SourceIpoption is available since 1.162.0.
- ResponseHeader: Response header. NOTE: The- SourceIpoption is available since 1.213.1.
- ResponseStatusCode: Response status code. NOTE: The- SourceIpoption is available since 1.213.1.
 
- 
RuleRule Condition Cookie Config 
- The configuration of the cookie. See See cookie_configbelow.
- headerConfig RuleRule Condition Header Config 
- The configuration of the header field. See header_configbelow.
- hostConfig RuleRule Condition Host Config 
- The configuration of the host field. See host_configbelow.
- methodConfig RuleRule Condition Method Config 
- The configuration of the request method. See method_configbelow.
- pathConfig RuleRule Condition Path Config 
- The configuration of the path for the request to be forwarded. See path_configbelow.
- queryString RuleConfig Rule Condition Query String Config 
- The configuration of the query string. See query_string_configbelow.
- responseHeader RuleConfig Rule Condition Response Header Config 
- The configuration of the header field. See response_header_configbelow.
- responseStatus RuleCode Config Rule Condition Response Status Code Config 
- The configuration of the header field. See response_status_code_configbelow.
- sourceIp RuleConfig Rule Condition Source Ip Config 
- The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_configbelow.
- type string
- The type of the forwarding rule. Valid values:- Host: Requests are forwarded based on hosts.
- Path: Requests are forwarded based on the path.
- Header: Requests are forwarded based on the HTTP header field.
- QueryString: Requests are forwarded based on the query string.
- Method: Request are forwarded based on the request method.
- Cookie: Requests are forwarded based on the cookie.
- SourceIp: Requests are forwarded based on the source ip. NOTE: The- SourceIpoption is available since 1.162.0.
- ResponseHeader: Response header. NOTE: The- SourceIpoption is available since 1.213.1.
- ResponseStatusCode: Response status code. NOTE: The- SourceIpoption is available since 1.213.1.
 
- 
RuleRule Condition Cookie Config 
- The configuration of the cookie. See See cookie_configbelow.
- headerConfig RuleRule Condition Header Config 
- The configuration of the header field. See header_configbelow.
- hostConfig RuleRule Condition Host Config 
- The configuration of the host field. See host_configbelow.
- methodConfig RuleRule Condition Method Config 
- The configuration of the request method. See method_configbelow.
- pathConfig RuleRule Condition Path Config 
- The configuration of the path for the request to be forwarded. See path_configbelow.
- queryString RuleConfig Rule Condition Query String Config 
- The configuration of the query string. See query_string_configbelow.
- responseHeader RuleConfig Rule Condition Response Header Config 
- The configuration of the header field. See response_header_configbelow.
- responseStatus RuleCode Config Rule Condition Response Status Code Config 
- The configuration of the header field. See response_status_code_configbelow.
- sourceIp RuleConfig Rule Condition Source Ip Config 
- The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_configbelow.
- type str
- The type of the forwarding rule. Valid values:- Host: Requests are forwarded based on hosts.
- Path: Requests are forwarded based on the path.
- Header: Requests are forwarded based on the HTTP header field.
- QueryString: Requests are forwarded based on the query string.
- Method: Request are forwarded based on the request method.
- Cookie: Requests are forwarded based on the cookie.
- SourceIp: Requests are forwarded based on the source ip. NOTE: The- SourceIpoption is available since 1.162.0.
- ResponseHeader: Response header. NOTE: The- SourceIpoption is available since 1.213.1.
- ResponseStatusCode: Response status code. NOTE: The- SourceIpoption is available since 1.213.1.
 
- 
RuleRule Condition Cookie Config 
- The configuration of the cookie. See See cookie_configbelow.
- header_config RuleRule Condition Header Config 
- The configuration of the header field. See header_configbelow.
- host_config RuleRule Condition Host Config 
- The configuration of the host field. See host_configbelow.
- method_config RuleRule Condition Method Config 
- The configuration of the request method. See method_configbelow.
- path_config RuleRule Condition Path Config 
- The configuration of the path for the request to be forwarded. See path_configbelow.
- query_string_ Ruleconfig Rule Condition Query String Config 
- The configuration of the query string. See query_string_configbelow.
- response_header_ Ruleconfig Rule Condition Response Header Config 
- The configuration of the header field. See response_header_configbelow.
- response_status_ Rulecode_ config Rule Condition Response Status Code Config 
- The configuration of the header field. See response_status_code_configbelow.
- source_ip_ Ruleconfig Rule Condition Source Ip Config 
- The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_configbelow.
- type String
- The type of the forwarding rule. Valid values:- Host: Requests are forwarded based on hosts.
- Path: Requests are forwarded based on the path.
- Header: Requests are forwarded based on the HTTP header field.
- QueryString: Requests are forwarded based on the query string.
- Method: Request are forwarded based on the request method.
- Cookie: Requests are forwarded based on the cookie.
- SourceIp: Requests are forwarded based on the source ip. NOTE: The- SourceIpoption is available since 1.162.0.
- ResponseHeader: Response header. NOTE: The- SourceIpoption is available since 1.213.1.
- ResponseStatusCode: Response status code. NOTE: The- SourceIpoption is available since 1.213.1.
 
- Property Map
- The configuration of the cookie. See See cookie_configbelow.
- headerConfig Property Map
- The configuration of the header field. See header_configbelow.
- hostConfig Property Map
- The configuration of the host field. See host_configbelow.
- methodConfig Property Map
- The configuration of the request method. See method_configbelow.
- pathConfig Property Map
- The configuration of the path for the request to be forwarded. See path_configbelow.
- queryString Property MapConfig 
- The configuration of the query string. See query_string_configbelow.
- responseHeader Property MapConfig 
- The configuration of the header field. See response_header_configbelow.
- responseStatus Property MapCode Config 
- The configuration of the header field. See response_status_code_configbelow.
- sourceIp Property MapConfig 
- The Based on source IP traffic matching. Required and valid when Type is SourceIP. See source_ip_configbelow.
RuleRuleConditionCookieConfig, RuleRuleConditionCookieConfigArgs          
- Values
List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Cookie Config Value> 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- Values
[]RuleRule Condition Cookie Config Value 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values
List<RuleRule Condition Cookie Config Value> 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values
RuleRule Condition Cookie Config Value[] 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values
Sequence[RuleRule Condition Cookie Config Value] 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<Property Map>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
RuleRuleConditionCookieConfigValue, RuleRuleConditionCookieConfigValueArgs            
RuleRuleConditionHeaderConfig, RuleRuleConditionHeaderConfigArgs          
RuleRuleConditionHostConfig, RuleRuleConditionHostConfigArgs          
- Values List<string>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- Values []string
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values string[]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values Sequence[str]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
RuleRuleConditionMethodConfig, RuleRuleConditionMethodConfigArgs          
- Values List<string>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- Values []string
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values string[]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values Sequence[str]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
RuleRuleConditionPathConfig, RuleRuleConditionPathConfigArgs          
- Values List<string>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- Values []string
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values string[]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values Sequence[str]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
RuleRuleConditionQueryStringConfig, RuleRuleConditionQueryStringConfigArgs            
- Values
List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Query String Config Value> 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- Values
[]RuleRule Condition Query String Config Value 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values
List<RuleRule Condition Query String Config Value> 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values
RuleRule Condition Query String Config Value[] 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values
Sequence[RuleRule Condition Query String Config Value] 
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<Property Map>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
RuleRuleConditionQueryStringConfigValue, RuleRuleConditionQueryStringConfigValueArgs              
RuleRuleConditionResponseHeaderConfig, RuleRuleConditionResponseHeaderConfigArgs            
RuleRuleConditionResponseStatusCodeConfig, RuleRuleConditionResponseStatusCodeConfigArgs              
- Values List<string>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- Values []string
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values string[]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values Sequence[str]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
RuleRuleConditionSourceIpConfig, RuleRuleConditionSourceIpConfigArgs            
- Values List<string>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- Values []string
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values string[]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values Sequence[str]
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
- values List<String>
- Add one or more IP addresses or IP address segments. You can add up to 5 forwarding rules in a SourceIp.
Import
Application Load Balancer (ALB) Rule can be imported using the id, e.g.
$ pulumi import alicloud:alb/rule:Rule example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.
